mcp-server-generator
Skill3 starsChanged 5 months agoMITView on GitHub
Generate a Model Context Protocol (MCP) server structure: transport layer, capability declarations, project layout, and bootstrap configuration for a new MCP integration. Use when working on scaffolding MCP servers, MCP transport setup.
- Reads credentials
In this repository59 other files it gives its agents.
- agent-memory-designerSkill
- ai-cost-optimizerSkill
- ai-evaluation-builderSkill
- ai-latency-optimizerSkill
- ai-solution-architectSkill
- ai-workflow-builderSkill
- context-engineeringSkill
- human-in-the-loop-designerSkill
- multi-agent-plannerSkill
- prompt-engineerSkill
- prompt-optimizerSkill
- prompt-reviewerSkill
- adr-generatorSkill
- api-designerSkill
- architecture-reviewSkill
- component-diagram-builderSkill
- container-diagram-builderSkill
- data-flow-analyzerSkill
- integration-plannerSkill
- observability-plannerSkill
- scalability-advisorSkill
- solution-architectureSkill
- system-context-builderSkill
- experiment-designerSkill
- go-to-market-plannerSkill
- pricing-strategy-advisorSkill
- mcp-best-practicesSkill
- mcp-client-generatorSkill
- mcp-security-reviewSkill
- mcp-tool-generatorSkill
- acceptance-criteria-generatorSkill
- analytics-instrumentation-plannerSkill
- competitive-analysisSkill
- epic-generatorSkill
- feature-prioritizationSkill
- idea-validatorSkill
- north-star-metric-advisorSkill
- okr-builderSkill
- persona-generatorSkill
- prd-generatorSkill
- problem-statement-builderSkill
- product-discovery-assistantSkill
- product-vision-builderSkill
- sprint-plannerSkill
- story-mappingSkill
- user-story-generatorSkill
- value-proposition-designerSkill
- chunking-strategy-advisorSkill
- embedding-strategy-advisorSkill
- hybrid-search-advisorSkill
- knowledge-ingestion-plannerSkill
- rag-architecture-designerSkill
- retriever-optimizerSkill
- ai-governance-advisorSkill
- ai-threat-modelingSkill
- guardrails-builderSkill
- owasp-llm-reviewerSkill
- prompt-injection-detectorSkill
- skill-nameSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 4 are distinctive, and 1 is 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.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 49
Document why transport and runtime were chosen.
- Distinctive: line 73
Follow MCP naming: lowercase, snake_case for tools.
- Very specific: line 82
Never embed secrets in source.
- Distinctive: line 128
Start with 3–5 essential tools.
- Distinctive: line 129
Use JSON Schema for all tool input definitions.
≈ “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 Generator
Purpose
Generate a Model Context Protocol (MCP) server structure: transport layer, capability declarations, project layout, and bootstrap configuration for a new MCP integration.
Input: Integration target (API, database, service), required capabilities (tools/resources/prompts), runtime preference (optional), security constraints
Output: MCP Server Scaffold Specification with directory layout, capability manifest, and implementation checklist
References: See references.md for domain cheat sheets.
Examples: See examples.md for worked input/output.
Workflow
Step 1: Define server scope
| Capability | Included | Rationale |
| Tools | Yes/No | Agent actions on external systems |
| Resources | Yes/No | Read-only data exposure |
| Prompts | Yes/No | Reusable prompt templates |
| Logging | Yes/No | Server lifecycle and debug |
One server = one bounded domain (e.g., "GitHub issues", not "all of GitHub").
Step 2: Select transport and runtime
| Transport | Use case |
| stdio | Local IDE integration, subprocess |
| SSE / Streamable HTTP | Remote hosted server |
| Runtime | Fit |
| TypeScript (SDK) | Node ecosystem, rapid iteration |
| Python (SDK) | Data/ML integrations |
| Other | Only when SDK unavailable |
Document why transport and runtime were chosen.
Step 3: Design project layout
mcp-server-[name]/
├── src/
│ ├── index.ts # Server entry, transport binding
│ ├── server.ts # MCP server instance and capability registration
│ ├── tools/ # Tool handlers
│ ├── resources/ # Resource providers (if any)
│ └── lib/ # Shared clients, auth, validation
├── package.json / pyproject.toml
├── README.md
└── .env.exampleStep 4: Declare capabilities manifest
| Capability | Name | Description | Auth required |
| tool | search_issues | Search repo issues | OAuth token |
| resource | repo://{owner}/{repo} | Repository metadata | OAuth token |
Follow MCP naming: lowercase, snake_case for tools.
Step 5: Plan authentication and config
| Secret | Source | Scope |
| API key | Environment variable | Read-only |
| OAuth token | User-provided at connect | Per-user |
Never embed secrets in source. Document .env.example keys only.
Step 6: Validate
Run Validation checklist.
Decision Rules
| Condition | Action |
| Scope spans multiple unrelated domains | Split into separate MCP servers |
| Remote access required | Use SSE/HTTP transport, not stdio only |
| Write operations on production data | Require explicit confirmation tool design; flag in security review |
| No official API client exists | Plan thin HTTP client in lib/ with rate limiting |
| PII exposure risk | Minimize resources; add mcp-security-review before deploy |
| >20 tools in one server | Group into sub-modules; consider splitting server |
Validation
- Single bounded domain scope defined
- Transport and runtime selected with rationale
- Project layout documented
- Capability manifest with tool/resource names
- Auth strategy uses environment variables, not hardcoded secrets
.env.examplekeys listed (no real values)- Error handling pattern defined for tool failures
- README sections outlined (setup, config, capabilities)
Anti-patterns
- God server — one MCP server wrapping an entire SaaS platform.
- Secrets in repo — API keys committed to source control.
- Undocumented tools — handlers without description and input schema.
- stdio-only for SaaS — local transport when users need remote hosting.
- Missing health signal — no way to verify server is correctly configured.
Best Practices
- Start with 3–5 essential tools; expand based on usage.
- Use JSON Schema for all tool input definitions.
- Implement structured error responses (code, message, retryable flag).
- Version server capabilities in README changelog.
- Pair with mcp-tool-generator for detailed tool design.
Output Structure
# MCP Server Scaffold: [Server Name]
## Scope
[Domain boundary and capabilities included]
## Transport & Runtime
| Choice | Rationale |
|--------|-----------|
## Project Layout
[Directory tree]
## Capability Manifest
| Type | Name | Description | Auth |
|------|------|-------------|------|
## Configuration
| Variable | Required | Description |
|----------|----------|-------------|
## Implementation Checklist
- [ ] Bootstrap server entry
- [ ] Register capabilities
- [ ] Auth client in lib/
- [ ] Error handling middleware
- [ ] Integration test with MCP client
## Next Steps
[Link to tool design and security review]Next Skills
| Outcome | Recommended Skill |
| Design individual tools | mcp/mcp-tool-generator |
| Security review before deploy | mcp/mcp-security-review |
| Client integration in agent app | mcp/mcp-client-generator |
| Implementation patterns | mcp/mcp-best-practices |
| AI workflow integration | ai/ai-workflow-builder |
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.

