Skip to main content
mcp-sdk-typescript-bootstrapper Bootstrap MCP (Model Context Protocol) servers with the official TypeScript SDK. Creates complete server implementations with transport layer, tools, resources, and proper error handling.
跳到安装 Skills Marketplace 发现并探索由社区构建的 Agent Skills
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/a5c-ai/babysitter --skill mcp-sdk-typescript-bootstrapper命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
下载 Zip 下载中... 同仓库更多 Skills Reference for querying the Atlas knowledge graph through its MCP tools — the SECONDARY enrichment/comparison layer that adds best-practice context to systems you have ALREADY scanned from your real sources (`az`, repos, dirs). Use when you need to look up nodes, edges, kinds, clusters, stats, or wiki pages in Atlas to compare against your real inventory. (atlas graph, query atlas, atlas mcp, search the graph, graph neighbors, atlas record, atlas kinds, enrichment layer)
Atlas turns your STATED NEED into a real systems atlas by SCANNING your actual sources (Azure via `az`, git repos, local dirs) and process/data mining them, THEN enriching against the Atlas knowledge graph. Use this skill when asked to inventory/map your real systems, scan your cloud + repos + directories, mine the real processes or data they contain, or collect their real constraints/gotchas. (atlas, scan my systems, inventory our azure account, map my repos, real systems atlas, process mining, data mining, collect nuances, system discovery)
assimilate-popular-workflows This skill should be used when the user asks to "find skills in the wild", "assimilate popular workflows", "discover SKILL.md files in repos", "research external skills", "find workflow patterns", "survey the skill landscape", "what skills exist out there", or wants to investigate public repositories for extractable processes, babysitter plugins, and reusable procedural insights. Searches GitHub for SKILL.md files, classifies repos by archetype, and maintains structured research under docs/reference-repos/.
name mcp-sdk-typescript-bootstrapper description Bootstrap MCP (Model Context Protocol) servers with the official TypeScript SDK. Creates complete server implementations with transport layer, tools, resources, and proper error handling. allowed-tools Read, Write, Edit, Bash, Glob, Grep graph {"domains":["domain:software-engineering"],"specializations":["specialization:cli-mcp-development"],"skillAreas":["skill-area:mcp-server-implementation","skill-area:mcp-stdio-transport"],"roles":["role:backend-engineer","role:platform-engineer"],"workflows":["workflow:feature-development"],"topics":["topic:developer-experience"]}
MCP SDK TypeScript Bootstrapper
Bootstrap production-ready MCP servers using the official TypeScript SDK with proper transport configuration, tool/resource handlers, and security best practices.
Capabilities
Generate MCP server projects with TypeScript SDK
Configure stdio, SSE, or WebSocket transports
Scaffold tool and resource handlers
Set up proper error handling and validation
Configure capability declarations
Implement security best practices
Usage
Invoke this skill when you need to:
Create a new MCP server from scratch
Add MCP capabilities to existing projects
Scaffold tool and resource implementations
Configure MCP transport layers
Inputs
Parameter Type Required Description
serverName string Yes Name of the MCP server (kebab-case) description string Yes Server description for clients transport string No stdio, sse, or websocket (default: stdio) tools array No List of tools to scaffold resources array No List of resources to provide capabilities object No Server capability declarations
Tool Definition Structure {
"tools" : [
{
"name" : "read_file" ,
"description" : "Read contents of a file" ,
"inputSchema" : {
"type" : "object" ,
"properties" : {
"path" : { "type" : "string" , "description" : "File path to read" }
} ,
"required" : [ "path" ]
}
}
]
}
Resource Definition Structure {
"resources" : [
{
"uriTemplate" : "file:///{path}" ,
"name" : "File Resource" ,
"description" : "Access file contents" ,
"mimeType" : "text/plain"
}
]
}
Output Structure <serverName>/
├── package.json
├── tsconfig.json
├── .gitignore
├── README.md
├── src/
│ ├── index.ts # Server entry point
│ ├── server.ts # MCP server setup
│ ├── transport/
│ │ ├── stdio.ts # Stdio transport
│ │ ├── sse.ts # SSE transport (if selected)
│ │ └── websocket.ts # WebSocket transport (if selected)
│ ├── tools/
│ │ ├── index.ts # Tool registry
│ │ └── <tool>.ts # Individual tool handlers
│ ├── resources/
│ │ ├── index.ts # Resource registry
│ │ └── <resource>.ts # Resource providers
│ ├── prompts/
│ │ └── index.ts # Prompt templates (optional)
│ └── utils/
│ ├── validation.ts # Input validation helpers
│ ├── errors.ts # MCP error handling
│ └── logging.ts # Structured logging
├── tests/
│ ├── tools/
│ └── resources/
└── mcp.json # MCP server manifest
Generated Code Patterns
Server Setup (src/server.ts) import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js' ;
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js' ;
import { registerTools } from './tools' ;
import { registerResources } from './resources' ;
export async function createServer ( ) {
const server = new McpServer ({
name : '<serverName>' ,
version : '1.0.0' ,
});
registerTools (server);
registerResources (server);
return server;
}
export async function startServer ( ) {
const server = await createServer ();
const transport = new StdioServerTransport ();
await server.connect (transport);
console .error ('[MCP] Server started on stdio' );
}
Tool Handler (src/tools/.ts) import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js' ;
import { z } from 'zod' ;
import { McpError , ErrorCode } from '@modelcontextprotocol/sdk/types.js' ;
const inputSchema = z.object ({
path : z.string ().describe ('File path to read' ),
});
export function registerReadFileTool (server : McpServer ) {
server.tool (
'read_file' ,
'Read contents of a file' ,
inputSchema.shape ,
async (args) => {
const { path } = inputSchema.parse (args);
try {
const content = await readFile (path, 'utf-8' );
return {
content : [{ type : 'text' , text : content }],
};
} catch (error) {
throw new McpError (
ErrorCode .InternalError ,
`Failed to read file: ${error.message} `
);
}
}
);
}
Resource Provider (src/resources/.ts) import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js' ;
export function registerFileResource (server : McpServer ) {
server.resource (
'file:///{path}' ,
'File Resource' ,
'Access file contents by path' ,
async (uri) => {
const path = uri.pathname ;
const content = await readFile (path, 'utf-8' );
return {
contents : [{
uri : uri.href ,
mimeType : 'text/plain' ,
text : content,
}],
};
}
);
}
Dependencies {
"dependencies" : {
"@modelcontextprotocol/sdk" : "^1.0.0" ,
"zod" : "^3.22.0"
} ,
"devDependencies" : {
"@types/node" : "^20.0.0" ,
"typescript" : "^5.0.0" ,
"vitest" : "^1.0.0"
}
}
Transport Configurations
Stdio (Default) import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js' ;
const transport = new StdioServerTransport ();
SSE (HTTP Server-Sent Events) import { SSEServerTransport } from '@modelcontextprotocol/sdk/server/sse.js' ;
import express from 'express' ;
const app = express ();
app.get ('/sse' , (req, res ) => {
const transport = new SSEServerTransport ('/message' , res);
server.connect (transport);
});
WebSocket import { WebSocketServerTransport } from '@modelcontextprotocol/sdk/server/websocket.js' ;
import { WebSocketServer } from 'ws' ;
const wss = new WebSocketServer ({ port : 3000 });
wss.on ('connection' , (ws ) => {
const transport = new WebSocketServerTransport (ws);
server.connect (transport);
});
Workflow
Validate inputs - Check server name, tool/resource definitions
Create project structure - Set up folders and base files
Generate package.json - Configure dependencies
Generate tsconfig.json - TypeScript configuration
Create server entry - Main server setup
Generate transport layer - Selected transport implementation
Scaffold tools - Tool handlers with schemas
Scaffold resources - Resource providers
Create utilities - Validation, errors, logging
Set up tests - Test structure for tools/resources
Best Practices Applied
Zod schema validation for all inputs
Proper MCP error codes and messages
Structured logging to stderr
Clean separation of tools/resources
TypeScript strict mode
Comprehensive error handling
Input sanitization
References
Target Processes
mcp-server-bootstrap
mcp-tool-implementation
mcp-resource-provider
mcp-transport-layer