Skip to content

Expose MCP resources: per-spec OpenAPI document and tool index - #43

Merged
haasonsaas merged 1 commit into
mainfrom
feat/mcp-resources
Aug 4, 2026
Merged

Expose MCP resources: per-spec OpenAPI document and tool index#43
haasonsaas merged 1 commit into
mainfrom
feat/mcp-resources

Conversation

@haasonsaas

Copy link
Copy Markdown
Collaborator

Adds the MCP resources capability. Per loaded spec:

  • openapi://<name>/spec — the full dereferenced OpenAPI document (JSON), letting clients read exact schemas beyond what tool inputSchemas carry.
  • openapi://<name>/tools[{ name, method, path, description, tags }] for every compiled tool. The index applies isToolAllowed, so tools hidden by --deny-tools/--allow-methods/path-prefix policy do not appear in the resource either.

<name> is the --spec name= label or the spec file basename. --watch-spec reloads refresh resource content. Unknown URIs return InvalidParams.

Tests: 5 new (52 total) — list shape, document read round-trip, policy filtering of the index, unknown-URI rejection, and per-spec resources in multi-spec mode.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LqBsGC7xLvihtBxhCdWKz5

Adds the resources capability with two read-only resources per loaded
spec: openapi://<name>/spec (the dereferenced document) and
openapi://<name>/tools (name/method/path/description/tags for each
compiled tool, filtered by the active tool policy so deny-listed tools
do not leak). Resource names follow the --spec name= value or the file
basename; --watch-spec reloads refresh resource content.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqBsGC7xLvihtBxhCdWKz5
@haasonsaas
haasonsaas merged commit 539809e into main Aug 4, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant