MCP Server (TypeScript)
Scaffolds a Model Context Protocol server in TypeScript using the official @modelcontextprotocol/sdk. Produces a working server with example tools and optional resource endpoints, configurable for stdio or streamable-http transport. Includes MCP Inspector integration for interactive debugging during development.
| Name | mcp-server-ts |
| Version | 0.1.0 |
| Category | ai-systems |
| License | Apache-2.0 |
| Persona | engineering |
| Tags | mcp, typescript, ai, tools, server |
| Source | templates/mcp-server-ts |
Render it
Three front doors, one catalog. Pick whichever suits the caller.
# CLI
npx @nanohype/sdk render mcp-server-ts --out ./my-app
# SDK
import { LocalSource, renderTemplate } from "@nanohype/sdk";
const result = await renderTemplate(source, "mcp-server-ts", variables);
# MCP — from an agent
get_template({ name: "mcp-server-ts" })Prerequisites
| Tool | Version | Why |
|---|---|---|
node | >=22 | Node.js runtime for the MCP server |
npm | — | Package management and script execution |
Variables
Required
ProjectNamestring- Kebab-case project name, used as package name and directory Must be lowercase kebab-case starting with a letter.
ServerNamestring- Human-readable server name displayed in MCP client UIs
Optional
Descriptionstring — defaults toAn MCP server- Short project description for package.json and README
Transportenum — defaults tostdio- Server transport protocol One of:
stdiostreamable-http. IncludeResourcesbool — defaults totrue- Include example MCP resource endpoints
What it produces
18 files. Placeholder names such as __APP_NAME__ are what the renderer substitutes into.
.env.example
.gitignore
biome.json
package.json
README.md
src/__tests__/server.test.ts
src/__tests__/tools.test.ts
src/bootstrap.ts
src/index.ts
src/logger.ts
src/resources/example.ts
src/server.ts
src/tools/example.ts
src/transports/index.ts
src/transports/stdio.ts
src/transports/streamable-http.ts
tsconfig.json
vitest.config.tsComposes with
- Pairs with
agentic-loop - Pairs with
eval-harness - Nests inside
monorepo
Composites that use it
- Agent Team — Multi-agent system with a central orchestrator, specialized agents for research and writing, an evaluation harness, and MCP tool server.
- Chrome AI Extension — Chrome extension with AI sidepanel backed by MCP tool servers and optional prompt library..
- Enterprise AI Infrastructure — Full enterprise AI stack with agents, tool servers, safety guardrails, evaluation, prompt management, observability, and Kubernetes deployment..
- Internal Tool — CLI tool or browser extension backed by MCP servers for internal team use..
- MCP Toolkit — MCP server with evaluation harness, prompt library, and deployment.
- Multi-Agent System — Multi-agent architecture with A2A protocol peers, MCP tool servers, and an orchestrating agent.
- VS Code AI Extension — VS Code extension with AI provider integration, MCP tool servers, and versioned prompt management..