Loading...
Loading...
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
npx skill4agent add skillcreatorai/ai-agent-skills mcp-buildergithub_create_issuehttps://modelcontextprotocol.io/sitemap.xmlmy-mcp-server/
├── src/
│ ├── index.ts # Server entry point
│ ├── tools/ # Tool implementations
│ └── utils/ # Shared utilities
├── package.json
└── tsconfig.jsonserver.registerTool({
name: "github_create_issue",
description: "Create a new GitHub issue",
inputSchema: z.object({
repo: z.string().describe("Repository name (owner/repo)"),
title: z.string().describe("Issue title"),
body: z.string().optional().describe("Issue body")
}),
outputSchema: z.object({
id: z.number(),
url: z.string()
}),
annotations: {
readOnlyHint: false,
destructiveHint: false,
idempotentHint: false
},
handler: async (input) => {
// Implementation
return { id: 123, url: "https://..." };
}
});# TypeScript
npm run build
npx @modelcontextprotocol/inspector
# Python
python -m py_compile your_server.py<evaluation>
<qa_pair>
<question>Find all open issues labeled 'bug' in the repo</question>
<answer>5</answer>
</qa_pair>
</evaluation>outputSchema