feat(with-agent-permissions): drive MCP over HTTP - #21
Merged
Conversation
Both ship behind --enable-dynamic-client-registration and --enable-client-id-metadata-document. The note predated them and told readers the browser OAuth path was unreachable.
/mcp accepts RFC 8693 delegated tokens now, so the demo drops the deprecated `authorizer mcp` stdio subcommand and the second database connection it opened. The exchange binds the token to <url>/mcp, not <url>. The audience selects the surface, so a token minted for the bare URL is refused at /mcp — the most common way this is misconfigured. The control run moves to /graphql because the user's ordinary login token is, correctly, rejected at /mcp. Same operation either way.
lakhansamani
force-pushed
the
feat/mcp-http-agent-example
branch
from
August 15, 2026 08:10
a8c8d72 to
7402774
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
/mcpaccepts RFC 8693 delegated tokens as of authorizerdev/authorizer#773, so this demo drops the deprecatedauthorizer mcpstdio subcommand and the second database connection it opened.What changed
mcp-agent.mjsspeaks Streamable HTTP to the running server instead of spawning a subprocess. Nogo build, no duplicate provider stack, no--mcp-bearer.<url>/mcp, not<url>. The audience selects the surface, so a token minted for the bare URL is refused at/mcp— the most common way this gets misconfigured, and now called out in the README's gotchas.run-server.shpasses--mcp-enabled./graphql, because the user's ordinary login token is — correctly — rejected at/mcp. The run now asserts that rejection explicitly, so the transport difference demonstrates the audience boundary instead of being an awkward footnote. Same operation either way: the MCP tool dispatches to what the GraphQL query calls.Also fixes a stale claim in
with-mcp/README.mdthat Authorizer has neither DCR nor CIMD. Both ship behind--enable-dynamic-client-registration/--enable-client-id-metadata-document; the note predated them and told readers the browser OAuth path was unreachable.Verification
Run live against a local server on the feature branch:
The minted token decodes to
aud=http://localhost:8098/mcp,iss=http://localhost:8098— audience is the MCP resource, issuer the bare URL.Requires authorizerdev/authorizer#773. Against a server without it, the exchange still succeeds but
/mcpreturns 401.