跳到正文
cccskills
免费在 GitHub 公开

mcp-developer

Build MCP servers and clients that connect AI systems to external tools and data. The skill defines validated inputs, implements tool and resource handlers, configures communication methods, and checks protocol behavior with the MCP Inspector.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

Use when building, debugging, or extending MCP servers or clients that connect AI systems with external tools and data sources. Invoke to implement tool handlers, configure resource providers, set up stdio/HTTP/SSE transport layers, validate schemas with Zod or Pydantic, debug protocol compliance issues, or scaffold complete MCP server/client projects using TypeScript or Python SDKs.

查看安装方法

适用场景

  • Expose external tools and data to AI systems through MCP
  • Start an MCP project in TypeScript or Python
  • Validate inputs and investigate protocol errors
  • Configure communication, authentication, and request limits

包含的文件(6)

  • SKILL.md5.8 KB
  • references/protocol.md4.9 KB
  • references/python-sdk.md9.6 KB
  • references/resources.md11.9 KB
  • references/tools.md10.2 KB
  • references/typescript-sdk.md7.8 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

MCP Developer

Senior MCP (Model Context Protocol) developer with deep expertise in building servers and clients that connect AI systems with external tools and data sources.

Core Workflow

  1. Analyze requirements — Identify data sources, tools needed, and client apps
  2. Initialize project — npx @modelcontextprotocol/create-server my-server (TypeScript) or pip install mcp + scaffold (Python)
  3. Design protocol — Define resource URIs, tool schemas (Zod/Pydantic), and prompt templates
  4. Implement — Register tools and resource handlers; configure transport (stdio/SSE/HTTP)
  5. Test — Run npx @modelcontextprotocol/inspector to verify protocol compliance interactively; confirm tools appear, schemas accept valid inputs, and error responses are well-formed JSON-RPC 2.0. Feedback loop: if schema validation fails → inspect Zod/Pydantic error output → fix schema definition → re-run inspector. If a tool call returns a malformed response → check transport serialisation → fix handler → re-test.
  6. Deploy — Package, add auth/rate-limiting, configure env vars, monitor

Reference Guide

Load detailed guidance based on context:

TopicReferenceLoad When
Protocolreferences/protocol.mdMessage types, lifecycle, JSON-RPC 2.0
TypeScript SDKreferences/typescript-sdk.mdBuilding servers/clients in Node.js
Python SDKreferences/python-sdk.mdBuilding servers/clients in Python
Toolsreferences/tools.mdTool definitions, schemas, execution
Resourcesreferences/resources.mdResource providers, URIs, templates

Minimal Working Example

TypeScript — Tool with Zod Validation

import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { z } from "zod";

const server = new McpServer({ name: "my-server", version: "1.1.0" });

// Register a tool with validated input schema
server.tool(
  "get_weather",
  "Fetch current weather for a location",
  {
    location: z.string().min(1).describe("City name or coordinates"),
    units: z.enum(["celsius", "fahrenheit"]).default("celsius"),
  },
  async ({ location, units }) => {
    // Implementation: call external API, transform response
    const data = await fetchWeather(location, units); // your fetch logic
    return {
      content: [{ type: "text", text: JSON.stringify(data) }],
    };
  }
);

// Register a resource provider
server.resource(
  "config://app",
  "Application configuration",
  async (uri) => ({
    contents: [{ uri: uri.href, text: JSON.stringify(getConfig()), mimeType: "application/json" }],
  })
);

const transport = new StdioServerTransport();
await server.connect(transport);

Python — Tool with Pydantic Validation

from mcp.server.fastmcp import FastMCP
from pydantic import BaseModel, Field

mcp = FastMCP("my-server")

class WeatherInput(BaseModel):
    location: str = Field(..., min_length=1, description="City name or coordinates")
    units: str = Field("celsius", pattern="^(celsius|fahrenheit)$")

@mcp.tool()
async def get_weather(location: str, units: str = "celsius") -> str:
    """Fetch current weather for a location."""
    data = await fetch_weather(location, units)  # your fetch logic
    return str(data)

@mcp.resource("config://app")
async def app_config() -> str:
    """Expose application configuration as a resource."""
    return json.dumps(get_config())

if __name__ == "__main__":
    mcp.run()  # defaults to stdio transport

Expected tool call flow:

Client → { "method": "tools/call", "params": { "name": "get_weather", "arguments": { "location": "Berlin" } } }
Server → { "result": { "content": [{ "type": "text", "text": "{\"temp\": 18, \"units\": \"celsius\"}" }] } }

Constraints

MUST DO

  • Implement JSON-RPC 2.0 protocol correctly
  • Validate all inputs with schemas (Zod/Pydantic)
  • Use proper transport mechanisms (stdio/HTTP/SSE)
  • Implement comprehensive error handling
  • Add authentication and authorization
  • Log protocol messages for debugging
  • Test protocol compliance thoroughly
  • Document server capabilities

MUST NOT DO

  • Skip input validation on tool inputs
  • Expose sensitive data in resource content
  • Ignore protocol version compatibility
  • Mix synchronous code with async transports
  • Hardcode credentials or secrets
  • Return unstructured errors to clients
  • Deploy without rate limiting
  • Skip security controls

Output Templates

When implementing MCP features, provide:

  1. Server/client implementation file
  2. Schema definitions (tools, resources, prompts)
  3. Configuration file (transport, auth, etc.)
  4. Brief explanation of design decisions

Maintained by @jeffallan, Principal Consultant at Synergetic Solutions

Documentation

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Build Angular 17+ applications with standalone components, routing, and shared application state. Covers reactive data handling with RxJS, performance improvements, and unit and integration tests, with code and explanations of architecture choices.

中文简介正在准备中。当前显示英语简介。

  • Building Angular screens with standalone components
  • Managing shared application state with NgRx
  • Configuring lazy-loaded routes and access guards
Jeffallan/claude-skills1.2万2026年10月17日 更新

Design REST or GraphQL APIs by defining data relationships, requests, responses, and authentication. Produce OpenAPI specifications, machine-readable API descriptions, with consistent errors, pagination, and versioning plans, then validate contracts using a mock server.

中文简介正在准备中。当前显示英语简介。

  • Designing a new API from business requirements
  • Creating and validating OpenAPI specifications
  • Standardizing errors and paginated responses
Jeffallan/claude-skills1.2万2026年10月17日 更新

Design or review a system’s overall structure, compare technology choices, and plan for growth and failures. Produce architecture diagrams and Architecture Decision Records, documents that explain key choices, alternatives, and their consequences.

中文简介正在准备中。当前显示英语简介。

  • Designing the overall structure of a new system
  • Comparing monolith and microservices architectures
  • Recording technology decisions and alternatives
Jeffallan/claude-skills1.2万2026年10月17日 更新

Connect AI agents to Jira and Confluence through MCP, a protocol for accessing external tools. This skill guides issue searches and updates, page management, sprint workflows, authentication setup, and troubleshooting of Atlassian integrations.

中文简介正在准备中。当前显示英语简介。

  • Find Jira issues by assignee or status
  • Search and update Confluence pages
  • Turn meeting notes into Jira ticket updates
Jeffallan/claude-skills1.2万2026年10月17日 更新

Design controlled failure experiments for distributed systems to examine how services recover. Produce failure injection scripts, monitoring plans, rollback procedures, and exercise guides, then turn findings into documented improvements.

中文简介正在准备中。当前显示英语简介。

  • Planning controlled failure experiments
  • Testing recovery after Kubernetes Pod failures
  • Checking service behavior under network delays
Jeffallan/claude-skills1.2万2026年10月17日 更新

Design and implement command-line tools with subcommands, options, interactive prompts, and progress indicators. Get command structures, configuration handling, clear error messages, and shell completion scripts, with guidance for automated use and testing across operating systems.

中文简介正在准备中。当前显示英语简介。

  • Build a command-line tool with subcommands and options
  • Add interactive prompts and progress indicators
  • Provide bash, zsh, and fish command completion
Jeffallan/claude-skills1.2万2026年10月17日 更新

查看 Jeffallan 的全部技能

报告此技能的问题