docs(mcp): framework-neutral quickstart example (Phase 3)#27
Merged
Conversation
Closes #21. A runnable, CI-verified quickstart proving @gemstack/mcp stands alone with zero @rudderjs/* packages: one tool + resource + prompt, @handle DI via createResolver (no container), and OAuth 2.1, served over both raw node:http and Hono. - examples/mcp-quickstart: server.ts (definitions + DI + verifyToken), node-http.ts (OAuth-protected raw node:http + a small res adapter), hono.ts (same server on the Fetch handler), quickstart.test.ts (CI smoke: authed round-trip, 401 without token, Hono mount). Private, not published. - Wire examples/* into the workspace; example is in turbo typecheck+test but excluded from build/publish. - README: Hono mounting snippet, an Awilix resolver-adapter snippet, and a pointer to the runnable example. Verified: full turbo build/typecheck/test green; example smoke 3/3; frozen lockfile clean; tsx entry boots and returns 401 without a token.
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.
Closes #21 (Phase 3 of the
@gemstack/mcpgraduation; design #18, epic #1).Goal
Prove the "agent-agnostic, standalone" claim is demonstrable, not just asserted: a runnable MCP server authored and served with zero
@rudderjs/*packages.What's here
A new private
examples/mcp-quickstartworkspace package:src/server.ts@HandleDI viacreateResolver(no container); a hand-suppliedverifyToken.src/node-http.tsnode:http, OAuth 2.1-protected via a ~10-lineresadapter.src/hono.tscreateWebRequestHandler.src/quickstart.test.ts401without a token, and the Hono mount.Plus README updates on the package: a Hono mounting snippet, an Awilix resolver-adapter snippet, and a pointer to the example.
Acceptance (from #21)
createMcpHttpHandleron rawnode:httpand Hono.@HandlewithcreateResolver().register(no container) + a third-party-container adapter documented.verifyToken.@gemstack/ai-mcp(already in the README).@rudderjs/*installed.pnpm test) and via a documentednode/tsxone-liner.Verification
build(5/5) +typecheck(8/8) +test(8/8) green.pnpm install --frozen-lockfileclean.tsx src/node-http.tsboots and returns401without a bearer token.Example is private and excluded from build/publish (no changeset; docs/example only).