Skip to content

Guard tools on the official MCP SDK and ActionMCP - #39

Merged
vicmaster merged 9 commits into
mainfrom
006-framework-adapters
Nov 11, 2026
Merged

vicmaster merged 9 commits into
mainfrom
006-framework-adapters

Conversation

@vicmaster

Copy link
Copy Markdown
Owner

Changes

Reeve now guards tools on two more MCP libraries: the official Ruby SDK and ActionMCP. Each is opt-in with one require. Once required, every tool of that library is denied, allowed, scoped and recorded the same way fast-mcp tools already are, and an unguarded tool is refused under the default setting. Nothing changes for a host that requires neither.

On both libraries Reeve allows or refuses a tool's output as a whole rather than narrowing it, because these tools return finished responses instead of records. The README says so, along with the one weakness of that check and how a tool author closes it.

What identifies the user (a server context, a token, a session) can now reach the principal resolver without ever being written to the ledger.

The testing kit, matchers and compliance suite now work unchanged on tools from all three libraries.

  • Fix: a fast-mcp call made inside an already open check (the testing kit, or a host wrapping the call) was refused and recorded twice; it is now recorded once.
  • Known limitation: fast-mcp and the official SDK cannot run in the same process; Reeve says so at load time.
  • CI gains a job that runs the adapter tests on the oldest supported version of each library.

Testing

Full suite green at every commit on SQLite and on PostgreSQL at the tip, rubocop clean, adapter tests pass on the oldest and newest supported versions of both libraries, and the built gem contains the new adapter files.

  1. Read the two new README sections ("On the official MCP SDK", "On ActionMCP") and confirm a host could set up either from them alone.
  2. Read the Unreleased CHANGELOG entry and confirm the warning about unguarded tools being refused is clear before upgrading.
  3. Confirm the new CI floor job runs and passes on this PR.

The resolver needs what identifies the human (server context, token, session). That must not land in
an append-only ledger, so it travels as request:, apart from metadata:, and is cleared when the call
ends.
Records no session id: on some transports the id alone resumes a session, and the ledger is
append-only.
Under the testing kit, or a host wrapping Reeve.invoke around the call, the wrapper opened a second
envelope with no principal, so the call was refused and recorded twice.
@vicmaster
vicmaster merged commit ee06e7f into main Nov 11, 2026
14 checks passed
@vicmaster
vicmaster deleted the 006-framework-adapters branch November 11, 2026 18:11
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