Skip to main content
Glama
yigitkonur

example-mcp-server-stdio

by yigitkonur

example-mcp-stdio

production-ready, learning-focused starter for MCP servers over STDIO using TypeScript SDK v2.

part of a series: stdio (you are here) · stateless · stateful · sse

what it does

  • runs an MCP server that communicates exclusively over STDIO (stdin/stdout JSON-RPC, stderr for logs)

  • ships two tools (echo, sum_numbers), two resources (starter-checklist, starter-lesson), and one prompt (scaffold-plan)

  • loads features automatically from src/features/ using a file-based registrar pattern

  • includes a scaffold CLI to generate new tools, resources, and prompts from templates

  • enforces quality with a full pipeline: typecheck, lint, format, build, smoke test

Related MCP server: mcp-serverTest

quick start

git clone https://github.com/yigitkonur/example-mcp-stdio.git
cd example-mcp-stdio
npm ci

run in development mode:

npm run dev

or build and run:

npm run build && npm start

validate everything:

npm run pipeline

scaffold cli

generate new feature modules with a single command:

node dist/index.js create tool my-tool
node dist/index.js create resource my-resource --uri my://resource
node dist/index.js create prompt my-prompt

generated files land in src/features/<kind>/ and are picked up automatically on next server start.

full reference: docs/03-scaffold-cli.md

documentation

doc

what it covers

docs/README.md

reading order and audience guide

docs/01-getting-started.md

prerequisites, install, first run, Docker

docs/02-architecture.md

module layout, registrar pattern, STDIO transport model

docs/03-scaffold-cli.md

serve and create commands, options, naming conventions

docs/04-sdk-v2-notes.md

vendoring strategy, v2 patterns, migration notes

docs/05-validation.md

pipeline breakdown, smoke test, mcp-cli verification

sdk v2 context

this repo targets the TypeScript SDK v2 pre-release (@modelcontextprotocol/server). because v2 is not yet published to npm, the package is vendored as a tarball in vendor/. refresh it with npm run vendor:sdk:update. see docs/04-sdk-v2-notes.md for details.

license

MIT

Install Server
A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/yigitkonur/example-mcp-server-stdio'

If you have feedback or need assistance with the MCP directory API, please join our Discord server