Skip to content

docs(mcp): framework-neutral quickstart example (Phase 3)#27

Merged
suleimansh merged 1 commit into
mainfrom
docs/mcp-quickstart-example
Jun 26, 2026
Merged

docs(mcp): framework-neutral quickstart example (Phase 3)#27
suleimansh merged 1 commit into
mainfrom
docs/mcp-quickstart-example

Conversation

@suleimansh

Copy link
Copy Markdown
Member

Closes #21 (Phase 3 of the @gemstack/mcp graduation; 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-quickstart workspace package:

File Shows
src/server.ts one tool + resource + prompt; @Handle DI via createResolver (no container); a hand-supplied verifyToken.
src/node-http.ts served over raw node:http, OAuth 2.1-protected via a ~10-line res adapter.
src/hono.ts the same server on Hono via the Fetch-style createWebRequestHandler.
src/quickstart.test.ts CI smoke: authenticated round-trip, 401 without 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)

  • Runnable quickstart: tool/resource/prompt served via createMcpHttpHandler on raw node:http and Hono.
  • @Handle with createResolver().register (no container) + a third-party-container adapter documented.
  • OAuth 2.1 with a hand-supplied verifyToken.
  • The "which MCP do I use?" line vs @gemstack/ai-mcp (already in the README).
  • A reader can stand up a protected MCP server with zero @rudderjs/* installed.
  • The quickstart runs in CI (pnpm test) and via a documented node/tsx one-liner.

Verification

  • Full turbo build (5/5) + typecheck (8/8) + test (8/8) green.
  • Example smoke 3/3 (node:http authed + 401, Hono mount).
  • pnpm install --frozen-lockfile clean.
  • tsx src/node-http.ts boots and returns 401 without a bearer token.

Example is private and excluded from build/publish (no changeset; docs/example only).

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.
@suleimansh suleimansh added documentation Improvements or additions to documentation enhancement New feature or request priority: low Nice to have / latent labels Jun 26, 2026
@suleimansh suleimansh self-assigned this Jun 26, 2026
@suleimansh suleimansh merged commit e02e0ed into main Jun 26, 2026
1 check passed
@suleimansh suleimansh deleted the docs/mcp-quickstart-example branch June 26, 2026 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request priority: low Nice to have / latent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build: @gemstack/mcp Phase 3 — framework-neutral quickstart/docs (optional)

1 participant