How to Build an MCP Server That Serves SKILL.md Skills
Build a Model Context Protocol server that serves SKILL.md skills to AI coding agents on demand.
MCP (Model Context Protocol) lets AI agents connect to external services and use them as tools. An MCP server that serves skills gives agents live access to a skill catalog — instead of downloading skills manually, the agent pulls the right skill automatically when it needs it.
This is how Agensi's one-liner curl install works. Here's how to build one yourself.
Quick Answer: An MCP skill server allows AI agents to dynamically search for and retrieve SKILL.md content at runtime instead of relying on manually downloaded files. It exposes
search_skillsandget_skilltools, facilitating on-demand access to a skill catalog.
What an MCP skill server does
A traditional skill workflow: developer downloads SKILL.md, puts it in a folder, agent reads it at startup.
An MCP skill server workflow: agent connects to MCP endpoint, searches for relevant skills at runtime, loads the skill content on demand. No downloads, no file management.
The MCP server exposes two main tools:
- search_skills — takes a natural language query, returns matching skills
- get_skill — takes a skill identifier, returns the full SKILL.md content
Skills built by the community
code-reviewer
FreeRun a structured code review on your recent changes without waiting for a teammate. This skill checks for security vulnerabilities (SQL injection, XSS, authentication bypasses), logic errors, edge cases, performance issues, and style violations.Findings are organized by severity: Critical, Warning, and Suggestion. Each finding includes the file, line number, a description of the issue, and a concrete fix. Use it as a first pass before peer review, or as your only reviewer on solo projects.
Get this skillgit-commit-writer
FreeStop writing vague commit messages. This skill reads your actual staged diff and generates precise, informative commit messages following the Conventional Commits specification. It detects the commit type (feat, fix, refactor, docs, chore, etc.), identifies the scope from the changed files, flags breaking changes, and suggests splitting commits when multiple logical changes are staged. Works with any git repository.`
Get this skilldesigning-hybrid-context-layers
$10What This Skill DoesMost RAG systems fail silently — not because the model is weak, but because the retrieval architecture assumes every query is a lookup. This skill teaches you to design hybrid context layers that match the retrieval strategy to the query type, so your agent gets the right kind of context every time.Problems It SolvesThe RAG-for-everything trap — routing relational and temporal queries through vector search causes silent structural failure, expensive reranking, and answers that get worse as you add more context.Multi-hop blindness — "Which teams own services that depend on the deprecated API?" is an entity-traversal query, not a lookup. Vector RAG cannot answer it accurately.Missing organizational causation — questions like "What decisions led to this incident?" require a temporal event graph, not a document chunk.Context-reasoning mismatch — good context routed to a weak reasoning tier, or long context with no causal structure, produces hallucinations at scale.What You GetThe skill defines a three-layer context model:Layer 1 — Factual Store (Vector RAG): Single-fact, single-document point queries — the only case where RAG is structurally correct.Layer 2 — Relational Store (Knowledge Graph): Entity relationships, dependency chains, and multi-hop queries that require traversal across linked nodes.Layer 3 — Temporal/Episodic Store (Timeline Index): Event sequences, causal decision chains, and "how did we get here" queries that require timestamped structure.You also get a query router decision tree — a concrete classification step that routes every incoming query to the correct layer before any retrieval begins, plus a phased implementation roadmap for teams migrating from RAG-only systems.Who Should Use ThisTeams building AI agents over enterprise knowledge bases, architecture decision records, incident histories, or any organizational system where the agent must answer relational or causal questions — not just fact lookups.
Get this skillBasic architecture
Agent (Claude Code) → MCP Connection → Your Server → Skill Database
The agent connects via Server-Sent Events (SSE) or stdio. When the user asks for help with a task, the agent queries your server for matching skills, reads the SKILL.md content, and applies it to the current task.
Setting up the server
Using the MCP SDK for TypeScript:
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
const server = new McpServer({
name: "skill-server",
version: "1.0.0"
});
// Tool: search for skills
server.tool("search_skills", {
description: "Search for SKILL.md skills by task description",
inputSchema: {
type: "object",
properties: {
query: { type: "string", description: "What task do you need help with?" }
},
required: ["query"]
}
}, async ({ query }) => {
const results = await searchSkills(query);
return {
content: [{ type: "text", text: JSON.stringify(results) }]
};
});
// Tool: get full skill content
server.tool("get_skill", {
description: "Get the full SKILL.md content for a specific skill",
inputSchema: {
type: "object",
properties: {
skill_id: { type: "string", description: "Skill identifier" }
},
required: ["skill_id"]
}
}, async ({ skill_id }) => {
const content = await getSkillContent(skill_id);
return {
content: [{ type: "text", text: content }]
};
});
Skill search implementation
The search tool needs to match natural language queries to skills. Options from simplest to most sophisticated:
Keyword matching: Search skill names and descriptions for query terms. Fast, simple, but misses semantic matches.
Embedding search: Generate vector embeddings of skill descriptions. Store in a vector database (pgvector, Pinecone, Qdrant). Find nearest neighbors to the query embedding. Catches semantic matches — "fix my tests" matches a skill described as "generates test files for uncovered functions."
Hybrid: Keyword search for exact matches, embedding search for semantic matches, combine and rank results.
Deployment
MCP servers can be deployed as:
- Cloud function (Netlify Edge, Vercel, AWS Lambda) — scales to zero, cheap
- Dedicated server — more control, needed for persistent connections
- Local process — for personal/development use
The server URL gets added to the agent's MCP configuration:
{
"mcpServers": {
"skill-server": {
"url": "https://your-server.com/mcp"
}
}
}
Connecting to Agensi's catalog
Instead of building your own skill database, you can proxy to Agensi's catalog API. Agensi's public catalog API already serves the full marketplace catalog. Pro subscribers get live access to all skill content.
If you're building a custom server for your team, you might combine your private internal skills with Agensi's public catalog — search your team's skills first, fall back to the marketplace for skills you don't have internally.
Connect to the Agensi skill catalog via MCP at Agensi's one-liner curl install.
Frequently Asked Questions
Find the right skill for your workflow
Browse our marketplace of AI agent skills, ready to install in seconds.
BrowseRelated Articles
Using Claude Code for DevOps Automation — Complete Guide (2026)
How to use Claude Code and SKILL.md skills for Docker, CI/CD pipelines, infrastructure-as-code, deployment automation, and monitoring setup.
6 min read
How to Uninstall Claude Code Skills — Remove & Manage
Remove SKILL.md skills from Claude Code — personal skills, project skills, and disabling without deleting.
3 min read
Best Claude Code Skills for Data Engineering
SKILL.md skills for data pipelines, SQL optimization, ETL, and schema design with Claude Code.
5 min read