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
Recommended skills
skill-router-2
by Mr Shippers · 3
Automatically detect, load, and stack the perfect skills combo for any user requ…

Solo SaaS Architect
by tudor.ai
Automatically builds complete, launch-ready SaaS websites, databases, and secure…
Agensi Skill Scout & Evaluator with Grok (v1.4)
by Markus Isaksson
Automate Agensi skill scouting, evaluation, and strategic portfolio curation via…
Basic 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
Skills you might need
Solo SaaS Validation Stack
$79A production-grade 5-stage subagent dispatch chain to catch bugs and secure solo…
Gumroad Bulk Uploader Pro
$19Bulk-create Gumroad products from a CSV: upload and attach files, add covers, se…
api-docs-gen
$10Convert source code into OpenAPI 3.0 specs or Markdown docs via static analysis…
Related Articles
Best Backend Skills for Cursor — API, Database, and Server Development
The best SKILL.md skills for backend development in Cursor. API design, database work, debugging, and deployment.
4 min read
AI Agent Security: How to Audit Skills and MCP Servers Before Installing (2026)
Before installing any skill or connecting an MCP server, audit it for prompt injection, data exfiltration, and dangerous commands. Includes a manual checklist and how automated scanning works.
8 min read