mcp-server-generator
/mcp-server-generator
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.
- Author
- patonkikh ↗
- Repository
- APES ↗
- Licence
- MIT
- Last repository change
- 03.07.2026
Assessment and security
- Files in this package
- 4
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 03.07.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
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.
Original author description
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.
How it works
- Step 1: Define server scope
- Step 2: Select transport and runtime
- Step 3: Design project layout
- Step 4: Declare capabilities manifest
- Step 5: Plan authentication and config
- Step 6: Validate
SKILL.md preview
---
name: mcp-server-generator
description: >
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.
metadata:
apes-version: "1.1"
category: mcp
---
# 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](references.md) for domain cheat sheets.
**Examples:** See [examples.md](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
```text
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.example
```
## Step 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.example` keys 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
```markdown
# 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` |
Files in this package (4)
- README.md 1 KB
- examples.md 3 KB
- references.md 3 KB
- skill.md 6 KB
Versions
The database has no other skills named mcp-server-generator.
Database snapshot: 13.11.2026 · package version 372a1fb4c5a6 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 3 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100mcp-client-generator
Generate MCP client integration: connection setup, capability discovery, tool invocation patterns, and error handling for agent applications. Use when working on MCP servers, MCP tools, MCP clients, or Model Context Protocol integrations. - 100mcp-2025-patterns
Current best practices for Model Context Protocol server design, implementation, and integration, including multi-server orchestration, security, and performance. Use when designing an MCP server, choosing transport/auth, or reviewing an MCP integration for 2025+ patterns. - 90mcp-integration
Design, implement, or review an MCP client or server integration. Use when exposing tools, resources, prompts, transport, authentication, or server lifecycle to an AI application. - 100fai-mcp-python-generator
Scaffold a production-ready Python MCP server — FastMCP decorators, async tools, structured outputs, and Azure integration. USE FOR: building a new MCP server in Python, exposing tools/resources to an LLM, wiring FastMCP, adding Azure-backed MCP tools, stdio or HTTP transport.… - 100mcp-ops
Model Context Protocol server development, tool design, resource handling, and transport configuration. Use for: mcp, model context protocol, mcp server, mcp tool, mcp resource, fastmcp, mcp transport, stdio, sse, streamable http, mcp inspector, tool handler, mcp prompt. - 100mcp-authoring
Creates MCP (Model Context Protocol) servers for Claude Code. Covers TypeScript implementation with MCP SDK, tool definitions, transport types, metadata.json for dev-suite, and deployment patterns. Follows official MCP specification. USE WHEN: user mentions "MCP server", "create…