Guides designing MCP servers with correct resource patterns: static/templated URIs, subscriptions, and tool-vs-resource decisions.
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.
Resources are read-only, URI-addressable data. Get them right and your server feels like a filesystem the agent can browse.
| Aspect | Tool | Resource | Prompt |
|---|---|---|---|
| Invocation | Agent calls it | Agent reads it | User selects it |
| Side effects | Allowed | No | No |
| Addressing | Name + args | URI | Name |
| Result | Agent-chosen | User/agent-attached | Template expansion |
| Example | create_issue | github://issues/123 | /summarize-pr |
Rule of thumb: if the agent needs to decide whether to read it, it's a tool. If the user or agent needs to attach specific known data to context, it's a resource.
server.resource(
"changelog",
"file://changelog.md",
async () => ({
contents: [{
uri: "file://changelog.md",
mimeType: "text/markdown",
text: await fs.readFile("CHANGELOG.md", "utf-8"),
}],
}),
);
Use URI templates (RFC 6570) for addressable collections:
server.resource(
"issue",
"github://repos/{owner}/{repo}/issues/{number}",
async (uri, { owner, repo, number }) => {
const issue = await gh.issues.get({ owner, repo, issue_number: +number });
return {
contents: [{
uri: uri.href,
mimeType: "application/json",
text: JSON.stringify(issue.data),
}],
};
},
);
The client auto-discovers the template and can fetch any matching URI.
server.setRequestHandler(ListResourcesRequestSchema, async () => ({
resources: [
{ uri: "github://repos/acme/api/issues", name: "Open issues", mimeType: "application/json" },
{ uri: "github://repos/acme/api/prs", name: "Open PRs", mimeType: "application/json" },
],
}));
Keep the list short — this is what the user sees in the resource picker.
For data that changes (logs, metrics, ticket state), support subscriptions so the client re-reads on update:
server.resource(
"live-log",
"logs://app/{stream}",
{ subscribe: true },
async (uri, { stream }) => ({ contents: [{ uri: uri.href, text: await tail(stream) }] }),
);
// When data changes:
logStream.on("update", (stream) => {
server.sendResourceUpdated({ uri: `logs://app/${stream}` });
});
The client listens for notifications/resources/updated and re-fetches.
A good scheme is:
github://repos/{owner}/{repo}/issues/{number}, not github://issue?id=123&repo=...github://repos/acme/api/issues/5, it can guess .../issues/6github://, not resource://)mimeType so the client renders correctlyAvoid opaque IDs in URIs when human-readable keys exist — linear://issues/ENG-42 beats linear://issues/a3f8c21d.
return {
contents: [{
uri: uri.href,
mimeType: "image/png",
blob: base64Encode(pngBytes),
}],
};
Clients that support vision models will attach PNGs directly. Text-only clients will skip binary resources.
MCP has no native pagination. Two conventions:
github://issues?page=2 as a distinct URInextPageUri and let the agent fetch itPrefer (1) — clients cache per-URI.
get_issue should be github://issues/{number} so the user can attach it as contextmimeType — breaks rich clients and model understandinggithub://issues/123 points to different data tomorrow, caching breaksWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
2 plugins in one repository ship this exact skill · first indexed Oct 20, 2026
7 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-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-server-authoringBuild production-quality MCP (Model Context Protocol) servers that expose tools, resources, and prompts to AI clients like Claude Desktop, Claude Code, Cursor, and the Claude Agent SDK.
Use this skill when the user wants to build an MCP server, expose internal tooling to an AI agent, wrap an API for agents, or publish a reusable MCP server to a registry.
Activate when: MCP server, Model Context Protocol, expose tools to Claude, @modelcontextprotocol/sdk, mcp.json, stdio server, HTTP MCP server.
/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.
/mcp-mastery:mcp-resource-patternsfrom mcp-mastery
npx claudepluginhub latestaiagents/agent-skills --plugin mcp-masteryOther plugins' skills for the same job