MCP SDK — Model Context Protocol for AI Tools
You are an expert in MCP (Model Context Protocol), the open standard by Anthropic for connecting AI models to external tools and data sources. You help developers build MCP servers that expose tools, resources, and prompts to any MCP-compatible client (Claude Desktop, Cursor, Windsurf, Cline, Continue) — creating a universal plugin system for AI assistants.
Best use case
MCP SDK — Model Context Protocol for AI Tools is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
You are an expert in MCP (Model Context Protocol), the open standard by Anthropic for connecting AI models to external tools and data sources. You help developers build MCP servers that expose tools, resources, and prompts to any MCP-compatible client (Claude Desktop, Cursor, Windsurf, Cline, Continue) — creating a universal plugin system for AI assistants.
Teams using MCP SDK — Model Context Protocol for AI Tools should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/mcp-sdk/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How MCP SDK — Model Context Protocol for AI Tools Compares
| Feature / Agent | MCP SDK — Model Context Protocol for AI Tools | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
You are an expert in MCP (Model Context Protocol), the open standard by Anthropic for connecting AI models to external tools and data sources. You help developers build MCP servers that expose tools, resources, and prompts to any MCP-compatible client (Claude Desktop, Cursor, Windsurf, Cline, Continue) — creating a universal plugin system for AI assistants.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# MCP SDK — Model Context Protocol for AI Tools
You are an expert in MCP (Model Context Protocol), the open standard by Anthropic for connecting AI models to external tools and data sources. You help developers build MCP servers that expose tools, resources, and prompts to any MCP-compatible client (Claude Desktop, Cursor, Windsurf, Cline, Continue) — creating a universal plugin system for AI assistants.
## Core Capabilities
### MCP Server (TypeScript)
```typescript
// src/server.ts — MCP server exposing tools to AI clients
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import {
CallToolRequestSchema,
ListToolsRequestSchema,
ListResourcesRequestSchema,
ReadResourceRequestSchema,
} from "@modelcontextprotocol/sdk/types.js";
const server = new Server(
{ name: "project-manager", version: "1.0.0" },
{ capabilities: { tools: {}, resources: {} } },
);
// Define tools
server.setRequestHandler(ListToolsRequestSchema, async () => ({
tools: [
{
name: "create_task",
description: "Create a new task in the project management system",
inputSchema: {
type: "object",
properties: {
title: { type: "string", description: "Task title" },
description: { type: "string", description: "Task description" },
priority: { type: "string", enum: ["low", "medium", "high", "urgent"] },
assignee: { type: "string", description: "Email of the assignee" },
},
required: ["title"],
},
},
{
name: "list_tasks",
description: "List tasks with optional filters",
inputSchema: {
type: "object",
properties: {
status: { type: "string", enum: ["todo", "in_progress", "done"] },
assignee: { type: "string" },
priority: { type: "string", enum: ["low", "medium", "high", "urgent"] },
},
},
},
{
name: "search_docs",
description: "Search project documentation",
inputSchema: {
type: "object",
properties: {
query: { type: "string", description: "Search query" },
},
required: ["query"],
},
},
],
}));
// Handle tool calls
server.setRequestHandler(CallToolRequestSchema, async (request) => {
const { name, arguments: args } = request.params;
switch (name) {
case "create_task": {
const task = await db.tasks.create({
title: args.title,
description: args.description,
priority: args.priority || "medium",
assignee: args.assignee,
status: "todo",
});
return {
content: [{ type: "text", text: `Created task #${task.id}: ${task.title}` }],
};
}
case "list_tasks": {
const tasks = await db.tasks.find(args);
const formatted = tasks.map(t => `- [${t.status}] #${t.id}: ${t.title} (${t.priority})`).join("\n");
return {
content: [{ type: "text", text: formatted || "No tasks found." }],
};
}
case "search_docs": {
const results = await vectorSearch(args.query, { topK: 5 });
const formatted = results.map(r => `## ${r.title}\n${r.excerpt}`).join("\n\n");
return {
content: [{ type: "text", text: formatted || "No results found." }],
};
}
default:
throw new Error(`Unknown tool: ${name}`);
}
});
// Expose resources (data the AI can read)
server.setRequestHandler(ListResourcesRequestSchema, async () => ({
resources: [
{
uri: "project://readme",
name: "Project README",
description: "Main project documentation",
mimeType: "text/markdown",
},
{
uri: "project://changelog",
name: "Changelog",
description: "Recent changes and releases",
mimeType: "text/markdown",
},
],
}));
server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
const { uri } = request.params;
switch (uri) {
case "project://readme":
return { contents: [{ uri, mimeType: "text/markdown", text: await fs.readFile("README.md", "utf-8") }] };
case "project://changelog":
return { contents: [{ uri, mimeType: "text/markdown", text: await fs.readFile("CHANGELOG.md", "utf-8") }] };
default:
throw new Error(`Unknown resource: ${uri}`);
}
});
// Start server
const transport = new StdioServerTransport();
await server.connect(transport);
```
### Client Configuration
```json
// Claude Desktop: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"project-manager": {
"command": "node",
"args": ["path/to/server.js"],
"env": { "DATABASE_URL": "postgres://..." }
},
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/me/projects"]
}
}
}
```
### Python Server
```python
# server.py — MCP server in Python
from mcp.server import Server
from mcp.server.stdio import stdio_server
from mcp.types import Tool, TextContent
server = Server("analytics-server")
@server.list_tools()
async def list_tools():
return [
Tool(
name="run_query",
description="Run a SQL query against the analytics database",
inputSchema={
"type": "object",
"properties": {
"query": {"type": "string", "description": "SQL query to execute"},
},
"required": ["query"],
},
),
]
@server.call_tool()
async def call_tool(name: str, arguments: dict):
if name == "run_query":
results = await db.execute(arguments["query"])
return [TextContent(type="text", text=format_results(results))]
async def main():
async with stdio_server() as (read, write):
await server.run(read, write, server.create_initialization_options())
```
## Installation
```bash
npm install @modelcontextprotocol/sdk # TypeScript
pip install mcp # Python
```
## Best Practices
1. **Tools for actions** — Expose write operations as tools (create, update, delete); AI calls them with structured input
2. **Resources for context** — Expose read-only data as resources; AI reads them for background context
3. **Prompts for workflows** — Define prompt templates for common tasks; users select them from the client
4. **Clear descriptions** — Write detailed tool descriptions and parameter docs; the AI reads these to decide when to use tools
5. **Input validation** — Define JSON Schema for tool inputs; clients validate before calling your server
6. **Error handling** — Return clear error messages; the AI uses error text to retry or adjust its approach
7. **Stdio transport** — Use stdio for local servers (Claude Desktop, Cursor); SSE transport for remote/hosted servers
8. **Composable servers** — Each MCP server is focused (database, files, APIs); users combine multiple servers in their clientRelated Skills
adapting-transfer-learning-models
This skill automates the adaptation of pre-trained machine learning models using transfer learning techniques. It is triggered when the user requests assistance with fine-tuning a model, adapting a pre-trained model to a new dataset, or performing transfer learning. It analyzes the user's requirements, generates code for adapting the model, includes data validation and error handling, provides performance metrics, and saves artifacts with documentation. Use this skill when you need to leverage existing models for new tasks or datasets, optimizing for performance and efficiency.
training-machine-learning-models
Build train machine learning models with automated workflows. Analyzes datasets, selects model types (classification, regression), configures parameters, trains with cross-validation, and saves model artifacts. Use when asked to "train model" or "evalua... Trigger with relevant phrases based on skill purpose.
tracking-model-versions
Build this skill enables AI assistant to track and manage ai/ml model versions using the model-versioning-tracker plugin. it should be used when the user asks to manage model versions, track model lineage, log model performance, or implement version control f... Use when appropriate context detected. Trigger with relevant phrases based on skill purpose.
threat-model-creator
Threat Model Creator - Auto-activating skill for Security Advanced. Triggers on: threat model creator, threat model creator Part of the Security Advanced skill category.
tensorflow-savedmodel-creator
Tensorflow Savedmodel Creator - Auto-activating skill for ML Deployment. Triggers on: tensorflow savedmodel creator, tensorflow savedmodel creator Part of the ML Deployment skill category.
tensorflow-model-trainer
Tensorflow Model Trainer - Auto-activating skill for ML Training. Triggers on: tensorflow model trainer, tensorflow model trainer Part of the ML Training skill category.
sequelize-model-creator
Sequelize Model Creator - Auto-activating skill for Backend Development. Triggers on: sequelize model creator, sequelize model creator Part of the Backend Development skill category.
react-context-setup
React Context Setup - Auto-activating skill for Frontend Development. Triggers on: react context setup, react context setup Part of the Frontend Development skill category.
pytorch-model-trainer
Pytorch Model Trainer - Auto-activating skill for ML Training. Triggers on: pytorch model trainer, pytorch model trainer Part of the ML Training skill category.
modeling-nosql-data
This skill enables Claude to design NoSQL data models. It activates when the user requests assistance with NoSQL database design, including schema creation, data modeling for MongoDB or DynamoDB, or defining document structures. Use this skill when the user mentions "NoSQL data model", "design MongoDB schema", "create DynamoDB table", or similar phrases related to NoSQL database architecture. It assists in understanding NoSQL modeling principles like embedding vs. referencing, access pattern optimization, and sharding key selection.
model-versioning-manager
Model Versioning Manager - Auto-activating skill for ML Deployment. Triggers on: model versioning manager, model versioning manager Part of the ML Deployment skill category.
model-registry-manager
Model Registry Manager - Auto-activating skill for ML Deployment. Triggers on: model registry manager, model registry manager Part of the ML Deployment skill category.