mcp-server-development
Skill28 starsChanged 10 months agoApache-2.0View on GitHub
MCP protocol patterns, tool implementation, resource handlers, prompt templates, and error handling for Model Context Protocol servers
1 other project uses a version of this.
Adopted by
Most recently taken up by
- roanbrasil/engineer-grade-agent-skillstheir own version, first seen Jun 17, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- roanbrasil/engineer-grade-agent-skills★ 8same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository41 other files it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
- ai-development-governanceSkill
- ai-governanceSkill
- architecture-documentationSkill
- aws-security-architectureSkill
- behavioral-analysisSkill
- business-model-canvasSkill
- c4-architecture-documentationSkill
- code-quality-excellenceSkill
- compliance-frameworksSkill
- contribution-guidelinesSkill
- data-science-for-intelligenceSkill
- documentation-standardsSkill
- electoral-analysisSkill
- european-parliament-apiSkill
- european-political-systemSkill
- gdpr-complianceSkill
- github-actions-workflowsSkill
- github-agentic-workflowsSkill
- incident-responseSkill
- intelligence-analysis-techniquesSkill
- isms-complianceSkill
- legislative-monitoringSkill
- mcp-gateway-configurationSkill
- mcp-gateway-securitySkill
- open-source-governanceSkill
- osint-methodologiesSkill
- performance-optimizationSkill
- political-science-analysisSkill
- risk-assessment-frameworksSkill
- secrets-managementSkill
- secure-code-reviewSkill
- secure-development-lifecycleSkill
- security-by-designSkill
- seo-best-practicesSkill
- strategic-communication-analysisSkill
- testing-mcp-toolsSkill
- testing-strategySkill
- threat-modeling-frameworkSkill
- typescript-strict-patternsSkill
- vulnerability-managementSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 26
Validate Tool Inputs: Use Zod schemas to validate all tool inputs before processing
- Very specific: line 27
Return Structured Responses: Always return MCP-compliant response structures with content array
- Very specific: line 30
Implement Resources with URIs: Use consistent URI patterns (e.g., ep://meps/{id})
- Distinctive: line 31
Provide Tool Descriptions: Write clear, concise descriptions for all tools, resources, and prompts
- Distinctive: line 32
Document Input Schemas: Use JSON Schema in tool listings to document expected inputs
- Distinctive: line 34
Test MCP Handlers: Write comprehensive tests for all MCP tools and resources
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
MCP Server Development Skill
Context
This skill applies when:
- Implementing MCP protocol tools, resources, and prompts
- Creating MCP server handlers for European Parliament data
- Designing tool input/output schemas
- Implementing resource URI patterns
- Creating prompt templates for AI assistants
- Handling MCP protocol errors and edge cases
- Testing MCP server implementations
- Optimizing MCP tool performance
MCP (Model Context Protocol) is the foundation of this server. All data access must follow MCP specification patterns to ensure compatibility with MCP clients.
Rules
- Follow MCP Specification: Implement all handlers according to MCP protocol specification
- Validate Tool Inputs: Use Zod schemas to validate all tool inputs before processing
- Return Structured Responses: Always return MCP-compliant response structures with
contentarray - Handle Errors Gracefully: Catch errors and return safe error messages (never expose internal details)
- Use Type Safety: Leverage TypeScript types for all MCP handlers and request/response objects
- Implement Resources with URIs: Use consistent URI patterns (e.g.,
ep://meps/{id}) - Provide Tool Descriptions: Write clear, concise descriptions for all tools, resources, and prompts
- Document Input Schemas: Use JSON Schema in tool listings to document expected inputs
- Log MCP Operations: Log all tool invocations, resource accesses for audit trails
- Test MCP Handlers: Write comprehensive tests for all MCP tools and resources
Examples
✅ Good Pattern: MCP Tool Implementation
import { z } from 'zod';
import { CallToolRequestSchema } from '@modelcontextprotocol/sdk/types.js';
// Input schema with validation
const SearchMEPsInputSchema = z.object({
country: z.string().length(2).regex(/^[A-Z]{2}$/).optional(),
limit: z.number().int().min(1).max(100).default(20),
}).strict();
// Tool handler
export async function handleSearchMEPs(request: typeof CallToolRequestSchema._type) {
const input = SearchMEPsInputSchema.parse(request.params.arguments);
try {
const meps = await searchMEPs(input);
return {
content: [{
type: "text",
text: JSON.stringify({ count: meps.length, meps }, null, 2)
}]
};
} catch (error) {
console.error('[MCP Tool Error] search_meps:', error);
throw new Error('Failed to search MEPs. Please try again.');
}
}
// Tool registration
server.setRequestHandler(ListToolsRequestSchema, async () => ({
tools: [{
name: "search_meps",
description: "Search Members of the European Parliament by filters",
inputSchema: {
type: "object",
properties: {
country: { type: "string", pattern: "^[A-Z]{2}$" },
limit: { type: "number", minimum: 1, maximum: 100, default: 20 },
},
},
}],
}));✅ Good Pattern: MCP Resource Implementation
// Resource URI pattern
const MEP_RESOURCE_TEMPLATE = "ep://meps/{id}";
// List resources
server.setRequestHandler(ListResourcesRequestSchema, async () => ({
resources: [{
uri: MEP_RESOURCE_TEMPLATE,
name: "European Parliament Member",
description: "Detailed MEP information",
mimeType: "application/json",
}],
}));
// Read resource
server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
const uri = request.params.uri;
const match = uri.match(/^ep:\/\/meps\/(\d+)$/);
if (!match) {
throw new Error(`Invalid MEP resource URI: ${uri}`);
}
const mepId = parseInt(match[1], 10);
const mep = await getMEPById(mepId);
return {
contents: [{
uri,
mimeType: "application/json",
text: JSON.stringify(mep, null, 2),
}],
};
});Anti-Patterns
❌ Bad: No Input Validation
// NEVER - no validation!
async function bad(request: any) {
const data = await fetch(request.params.arguments.url); // Injection risk!
return { content: [{ type: "text", text: data }] };
}❌ Bad: Exposing Internal Errors
// NEVER - exposes internals!
async function bad(request: any) {
try {
return await process(request);
} catch (error) {
throw error; // Exposes stack trace!
}
}ISMS Compliance
- SC-002: Input validation for all tool parameters (Zod schemas)
- AU-002: Audit logging for tool invocations (personal-data tools especially)
- AC-003: Rate limiting and access control (
EP_RATE_LIMIT) - SC-001: Safe output — no raw upstream errors, sanitised responses
Policy References
Primary:
- Secure Development Policy — Input validation, audit logging, secure error handling
- OWASP LLM Security Policy — Prompt-injection resistance in tool descriptions, output filtering
Related:
- Information Security Policy
- Privacy Policy — MEP personal-data tools
- Access Control Policy — Least privilege on tool capabilities
- AI Policy — Responsible MCP-tool integration with LLMs
- Open Source Policy — Attribution in tool output
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

