Skip to content

examples: add with-mcp-servers#12997

Open
Nishant-Chaudhary5338 wants to merge 1 commit into
vercel:mainfrom
Nishant-Chaudhary5338:examples/with-mcp-servers
Open

examples: add with-mcp-servers#12997
Nishant-Chaudhary5338 wants to merge 1 commit into
vercel:mainfrom
Nishant-Chaudhary5338:examples/with-mcp-servers

Conversation

@Nishant-Chaudhary5338
Copy link
Copy Markdown

Summary

  • Adds examples/with-mcp-servers — a pnpm Turborepo monorepo showing how to structure multiple Model Context Protocol (MCP) servers as isolated workspace packages
  • Two MCP server packages: @repo/mcp-calculator (add, subtract, multiply, divide) and @repo/mcp-file-reader (read_file, list_directory), each using the official @modelcontextprotocol/sdk with stdio transport
  • One client app: mcp-client — a Node.js CLI that spawns both servers and runs demo tool calls
  • Turbo's ^build pipeline ensures server packages compile before the client; demonstrates cache hits on unchanged packages
  • Zero dependencies beyond @modelcontextprotocol/sdk, typescript, and shared @repo/eslint-config / @repo/typescript-config

Closes #12938 (approved by @anthonyshew)

Test plan

npx create-turbo@latest --example with-mcp-servers
cd my-turborepo
pnpm install
pnpm build        # all 3 packages compile cleanly
pnpm check-types  # zero TypeScript errors
pnpm lint         # zero lint errors
node apps/mcp-client/dist/index.js
# 5 + 3 = 8
# 6 × 7 = 42
# Root directory: [...]
pnpm build        # second run → FULL TURBO (all tasks cached)

Adds a new community example showing how to structure multiple MCP
(Model Context Protocol) servers as isolated workspace packages in a
Turborepo monorepo.

Closes vercel#12938
@Nishant-Chaudhary5338 Nishant-Chaudhary5338 requested a review from a team as a code owner June 1, 2026 14:59
@Nishant-Chaudhary5338 Nishant-Chaudhary5338 requested review from tknickman and removed request for a team June 1, 2026 14:59
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Jun 1, 2026

@Nishant-Chaudhary5338 is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

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