---
name: "mcp-server-typescript-scaffold"
description: "Scaffold and deploy standard Model Context Protocol servers in TypeScript."
metadata:
  author: "Model Context Protocol"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "build mcp server typescript"
  - "register mcp tool"
  - "setup stdio transport mcp"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# Model Context Protocol (MCP) TypeScript SDK Scaffold

Builds production MCP servers using @modelcontextprotocol/sdk: Server class initialization, StdioServerTransport, tool registration with ListToolsRequestSchema, and CallToolRequestSchema.

## When to Invoke
Invoke this skill whenever you need to:
- build mcp server typescript
- register mcp tool
- setup stdio transport mcp

## Execution SOP & Rules
1. Initialize server with new Server({ name: 'my-mcp-server', version: '1.0.0' }, { capabilities: { tools: {} } }).
2. Handle tool listing requests by returning tools matching standard JSON Schema specifications.
3. Handle CallToolRequestSchema by validating input parameters and returning structured content blocks.
4. Connect via StdioServerTransport: const transport = new StdioServerTransport(); await server.connect(transport).

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
