Langsung ke konten
Skillpedia
Konektor (MCP)12k Β· #11436

mcp-developer

Fungsinya

Skill ini memandu agent AI untuk membangun server dan klien Model Context Protocol yang menghubungkan sistem AI ke alat dan sumber data. Skill ini untuk pengembang yang ingin aplikasi AI mereka memakai layanan luar.

Kapan dipakai

  • βœ“Saat Anda ingin membangun server MCP yang memberi alat AI akses ke data Anda.
  • βœ“Saat server MCP gagal pemeriksaan protokol atau mengembalikan respons yang rusak.
  • βœ“Saat Anda perlu mengatur transport stdio, HTTP, atau SSE untuk server MCP.

Link skill

https://github.com/Jeffallan/claude-skills/blob/main/skills/mcp-developer/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/Jeffallan/claude-skills/blob/main/skills/mcp-developer/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œBangun server MCP yang memungkinkan asisten AI saya mencari pesanan dari database kami.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent membuat kerangka proyek dengan SDK TypeScript atau Python, mendefinisikan skema alat dengan Zod atau Pydantic, lalu mendaftarkan handler-nya. Setelah itu agent menguji server dengan MCP inspector.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

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:

Topic Reference Load When
Protocol references/protocol.md Message types, lifecycle, JSON-RPC 2.0
TypeScript SDK references/typescript-sdk.md Building servers/clients in Node.js
Python SDK references/python-sdk.md Building servers/clients in Python
Tools references/tools.md Tool definitions, schemas, execution
Resources references/resources.md Resource 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
Pertanyaan umum

SDK apa yang dipakai?

Skill ini memakai SDK MCP untuk TypeScript dan Python.

Bagaimana skill ini menguji server MCP?

Skill ini menjalankan MCP inspector untuk memastikan alat muncul, skema menerima input yang valid, dan error dikembalikan dengan benar.

Transport apa saja yang didukung?

Skill ini mendukung transport stdio, HTTP, dan SSE.

Detail

Deskripsi asli dari pembuat

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.

repo: Jeffallan/claude-skills

Popularitas

Bintang GitHub
12k
Peringkat
#11436
Lisensi
MIT
Diperbarui
30/10/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa