Builds production-quality MCP servers in TypeScript or Python that expose tools, resources, and prompts to AI clients like Claude Desktop, Claude Code, and Cursor.
Ships in mcp-mastery. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Build MCP servers in TypeScript or Python that any MCP-compatible client can consume.
An MCP server exposes three primitives:
| Primitive | Purpose | Side effects |
|---|---|---|
| Tool | Action the agent calls | May have side effects (writes, network calls) |
| Resource | Data the agent reads | Read-only, addressed by URI |
| Prompt | Reusable prompt template | No side effects; user-invocable |
Pick the right primitive — exposing read operations as tools wastes context when they should be resources.
npm init -y
npm i @modelcontextprotocol/sdk zod
npm i -D typescript tsx @types/node
// src/server.ts
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: "weather-server",
version: "1.0.0",
});
server.tool(
"get_forecast",
"Get a weather forecast for a location",
{
location: z.string().describe("City name or lat,lng"),
days: z.number().int().min(1).max(14).default(3),
},
async ({ location, days }) => {
const data = await fetchForecast(location, days);
return {
content: [{ type: "text", text: JSON.stringify(data) }],
};
},
);
server.resource(
"station",
"weather://stations/{id}",
async (uri) => {
const id = uri.pathname.split("/").pop()!;
const station = await fetchStation(id);
return {
contents: [{ uri: uri.href, mimeType: "application/json", text: JSON.stringify(station) }],
};
},
);
const transport = new StdioServerTransport();
await server.connect(transport);
Run it and register in the client's mcp.json:
{
"mcpServers": {
"weather": {
"command": "npx",
"args": ["-y", "tsx", "src/server.ts"]
}
}
}
uv add "mcp[cli]"
# server.py
from mcp.server.fastmcp import FastMCP
mcp = FastMCP("weather-server")
@mcp.tool()
async def get_forecast(location: str, days: int = 3) -> dict:
"""Get a weather forecast for a location."""
return await fetch_forecast(location, days)
@mcp.resource("weather://stations/{id}")
async def station(id: str) -> dict:
return await fetch_station(id)
if __name__ == "__main__":
mcp.run()
search_issues, not IssueSearcher).describe() on every field{ content: [{ type: "text", text: ... }] } — wrap JSON as textisError: true. Include remediation in the messageidempotency_key when possibleDon't dump 40 tools on the client. Expose a small stable surface and let tools return follow-up handles:
server.tool("list_projects", "List accessible projects", {}, async () => {
const projects = await api.listProjects();
return {
content: [{
type: "text",
text: `Found ${projects.length} projects. Use get_project with id to read one:\n` +
projects.map(p => `- ${p.id}: ${p.name}`).join("\n"),
}],
};
});
Use the MCP Inspector during development:
npx @modelcontextprotocol/inspector tsx src/server.ts
It gives you a UI to call every tool, inspect every resource, and replay prompts. Run it in CI against a mock backend to catch schema regressions.
bin entry so users run npx your-mcp-serversmithery.yaml with config schema for one-click installcommand at docker runserver.sendNotification progress eventsname suffix (github-v2) when making breaking changesWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/mcp-mastery:mcp-server-authoringfrom mcp-mastery
npx claudepluginhub latestaiagents/agent-skills --plugin mcp-mastery7 skills in this plugin
/mcp-auth-oauthImplement OAuth 2.1 + PKCE authentication for remote MCP servers, including dynamic client registration, token refresh, and scope design. Covers the 2025 MCP auth spec that Claude Desktop, Claude Code, and ChatGPT use.
Use this skill when building a remote MCP server that needs per-user auth, debugging OAuth flows for MCP, or migrating a bearer-token MCP server to OAuth.
Activate when: MCP OAuth, remote MCP auth, MCP authorization, PKCE, dynamic client registration, MCP 401.
/mcp-client-integrationConnect MCP servers to AI clients — Claude Desktop, Claude Code, Cursor, the Claude Agent SDK, and custom apps — including config file locations, auth, and debugging connection failures.
Use this skill when the user wants to wire an MCP server into a client, troubleshoot "server not connecting" errors, or build a custom MCP client with the SDK.
Activate when: MCP client, mcp.json, claude_desktop_config.json, connect MCP, MCP not working, list MCP tools, programmatic MCP client.
/mcp-resource-patternsUse MCP Resources correctly — the read-only, URI-addressable data primitive — and know when to pick resources, tools, or prompts. Covers templated URIs, subscriptions, and common mistakes.
Use this skill when designing MCP servers that expose data, deciding between tool vs resource, or implementing resource subscriptions for live data.
Activate when: MCP resource, resource template, resource vs tool, subscribe resource, MCP URI schema.
/mcp-security-sandboxingSecure MCP servers against prompt injection, tool abuse, excessive permission, and data exfiltration. Covers per-tool scopes, rate limiting, audit logging, and sandbox patterns for shell-adjacent tools.
Use this skill when deploying an MCP server to production, handling untrusted agents, or reviewing an MCP server for security issues.
Activate when: MCP security, MCP prompt injection, tool sandbox, MCP audit log, MCP rate limit, tool abuse, MCP threat model.
/mcp-tool-designDesign MCP tool schemas, names, and descriptions that AI agents actually pick correctly and use without hand-holding. Covers the anti-patterns that make agents loop, pick wrong tools, or hallucinate arguments.
Use this skill when designing or reviewing MCP tools, debugging "the agent isn't using my tool", or pruning a bloated tool surface.
Activate when: MCP tool design, tool description, agent picks wrong tool, too many tools, tool schema, tool naming.
/mcp-transport-stdio-httpChoose between MCP transports — stdio for local processes, Streamable HTTP for remote servers, SSE for legacy — and implement each correctly with reconnection, backpressure, and session handling.
Use this skill when deciding transport for a new MCP server, migrating SSE to Streamable HTTP, or debugging transport-level issues (connection drops, buffering, session loss).
Activate when: MCP transport, stdio vs HTTP, Streamable HTTP, MCP SSE, MCP reconnection, MCP session.
2 plugins in one repository ship this exact skill · first indexed Oct 20, 2026
Other plugins' skills for the same job