Mcp server
Skill Amey-Thakur/AI-SKILLS/skills/llm-engineering/mcp-server
Design a Model Context Protocol server that exposes tools and data to AI agents safely and legibly. Use when building an MCP server or deciding what to expose to an agent.From its SKILL.md
npx -y skills add Amey-Thakur/AI-SKILLS --skill mcp-serverAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 23 days oldThe repository was created 23 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- 4 stars4 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
3.1 KB, 657 tokens by cl100k_base, as published. Nobody here has run it
MCP server
The Model Context Protocol lets an agent discover and call your tools and read your resources. The server is a contract with a caller that reasons in natural language and will misuse anything ambiguous, so design for a smart caller that cannot see your source.
Method
- Expose the right primitive. MCP offers tools (actions the agent invokes), resources (data the agent reads), and prompts (templates the agent fills). Read-only data is a resource, not a tool; an action with effects is a tool. Choosing wrong makes the agent fetch data by calling side-effecting tools, or take actions it thinks are safe reads.
- Name and describe for the model, not the maintainer. Every tool's name and description is how the agent decides whether and how to call it. Say what it does, when to use it, and what it returns, in one clear statement. A vague description produces wrong calls no schema can prevent.
- Make schemas strict and self-documenting. Each parameter has a type, a description, and required-or-optional stated. Constrain enums, ranges, and formats so the model cannot pass a shape you will reject. Invalid states the schema forbids are calls you never have to handle.
- Return results the model can use. Structured, labeled output over raw dumps; the fields the agent needs to decide the next step, not your internal representation. Truncate or paginate large results so one call cannot blow the context window.
- Errors are part of the contract. A failed call returns a clear, actionable message the agent can recover from ("file not found: check the path" beats a stack trace). Distinguish the agent's mistake from a server failure so the agent knows whether to retry, fix its input, or give up.
- Guard every boundary, because the caller is not trusted. Validate and sanitize all inputs; scope what each tool can touch; never expose a tool that runs arbitrary commands, reads arbitrary paths, or leaks secrets. Treat tool arguments as hostile input reaching a privileged operation, because that is exactly what they are.
- Keep tools small and composable. One tool, one job, with a name that says it. A mega-tool with a mode parameter is harder for the agent to use correctly than three focused tools.
Litmus tests
- Could the agent use every tool correctly from its name, description, and schema alone, with no access to your code?
- Can any tool call cause damage the caller did not clearly intend?
- Does every error tell the agent what to do next?
- Could a single response overflow the context window?
Boundaries
Follow the MCP specification and your SDK's conventions; a server that diverges from the protocol is a server clients cannot use. Expose the smallest surface that serves the need. Every tool is attack surface and context cost, so a tool that is rarely useful is a net loss.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.