Skip to content

[pull] main from czlonkowski:main - #68

Merged
pull[bot] merged 1 commit into
5474312:mainfrom
czlonkowski:main
May 18, 2026
Merged

[pull] main from czlonkowski:main#68
pull[bot] merged 1 commit into
5474312:mainfrom
czlonkowski:main

Conversation

@pull

@pull pull Bot commented May 18, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

* feat(mcp): serve n8n-skills markdown via MCP Resources

Add a SkillResourceRegistry that mirrors UIAppRegistry to expose the
seven n8n-mcp skill bundles (~36 markdown files from the n8n-skills
repo) under a new skill://n8n-mcp/{name}/{file} URI scheme. The MCP
host already wired ListResources/ReadResource for ui://n8n-mcp/{id}
UI apps; both schemes now coexist in the same handlers.

The skill markdown is brought in via npm run sync:skills, which
copies from a sibling n8n-skills/skills/ checkout (overridable via
N8N_SKILLS_SOURCE) into data/skills/. The copy is committed so npm
and Docker artifacts ship the skills without requiring the sibling
repo on the build host. Dockerfile copies data/skills/ alongside
data/nodes.db; package.json files field ships data/skills/**/*.md.
data/skills/ is added to .secretlintignore because the upstream
markdown contains placeholder credentials in code examples — same
treatment as the n8n-docs clone.

A bare skill://n8n-mcp/{name} URI resolves to that skill's SKILL.md
as a convenience. A new resources/templates/list handler advertises
both URI templates so capable clients can construct URIs directly.
text/markdown is used as the mime type throughout. Description for
SKILL.md is parsed from frontmatter; supporting files fall back to
the first heading.

Claude Code users still get the better UX through the existing
n8n-mcp-skills plugin (auto-loaded SKILL frontmatter, description-
based triggering via the Skill tool). MCP Resources reach the
clients that lack a skill system: Cursor, Claude Desktop without
plugins, the OpenAI Agents SDK, and other custom agents — so
the same skill content now reaches every n8n-mcp consumer.

- 15 unit tests cover registry init, frontmatter parsing, URI
  resolution (bare and explicit), template listing, and reset
- Live smoke test against the running MCP server: resources/list
  returns 38 entries (2 UI apps + 36 skill files); resources/read
  resolves bare skill URI to SKILL.md and a specific file URI to
  its body; ui://n8n-mcp/operation-result still returns the
  operation-result HTML unchanged

Conceived by Romuald Członkowski - https://www.aiadvisors.pl/en

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(skills): CRLF frontmatter + traversal regression tests

Address code-reviewer feedback on PR #793:

- parseFrontmatter now normalizes \r\n → \n before checking the leading
  fence, so a Windows checkout of n8n-skills does not silently lose all
  SKILL.md metadata (previously content.startsWith('---\\n') returned
  false against '---\\r\\n', dropping name + description).
- Inline the getByUri simplification — a single Map.get + truthy
  check replaces the has/get! pattern, no behavior change.
- New test for CRLF frontmatter exercises the normalization above.
- New traversal test locks the security guarantee on the bare-URI
  fallback: skill://n8n-mcp/../../../etc/passwd and
  skill://n8n-mcp/a/../b/SKILL.md both resolve to null, because
  the bare-name path refuses any remainder containing '/' and the
  explicit-file path requires an exact Map key match.

17/17 registry tests pass.

Conceived by Romuald Członkowski - https://www.aiadvisors.pl/en

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@pull pull Bot locked and limited conversation to collaborators May 18, 2026
@pull pull Bot added the ⤵️ pull label May 18, 2026
@pull
pull Bot merged commit f1edbc9 into 5474312:main May 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant