develop-mcp-server — Claude Code rule: install
The develop-mcp-server rule structures MCP server work from planning to validation, with setup guidance for Node.js and Python projects.
no license ★ 1,054 updated 2025-07-17
.cursor/rules/develop-mcp-server.mdcWhat develop-mcp-server does
The rule gives an agent a sequence for building an MCP server. It starts with the problem, the API or service, and the required credentials. The implementation stage covers Node.js and JavaScript projects with npx @modelcontextprotocol/create-server, plus Python projects using pip install mcp or uv add "mcp[cli]".
The protocol calls for the MCP SDK, typed definitions, contextual error handling, and logging. It also shows how to pass an API key through mcp install server.py -v API_KEY=key or an MCP server configuration with environment variables. Rate limiting is considered when the service needs it.
Every tool must be exercised with valid inputs and its output format checked. The agent must record the test results. Until those checks are complete, the rule blocks use of attempt_completion.
What it helps with
- plan an MCP server before coding
- bootstrap a server for Node.js or Python
- configure credentials for an MCP server
- add logs and contextual error handling
- test each MCP tool before completion
Example prompts for the agent
- Build an MCP server for an external API: plan the service first, implement it with the MCP SDK, then test every tool.
- Create a Python MCP server that reads
API_KEY, configure it withmcp install server.py -v API_KEY=key, and verify its responses. - Run through every MCP tool with valid inputs and wait to use
attempt_completionuntil the checks are recorded.
How to install develop-mcp-server
Manually: put the files in place
.cursor/rules/develop-mcp-server.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.claude/rules/develop-mcp-server.mdThe paths frontmatter field limits the files: move globs from the source into paths
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.github/instructions/develop-mcp-server.instructions.mdThe applyTo field sets which files it applies to: move globs from the source into applyTo
Manually: put the files in place
.devin/rules/develop-mcp-server.mdManually: put the files in place
.clinerules/develop-mcp-server.mdStep by step, with commands for each platform: Cursor rules: .mdc files, four modes and what replaced .cursorrules
Questions about develop-mcp-server
How do I install develop-mcp-server in Claude Code?
Place the rule file at .claude/rules/develop-mcp-server.md in the Claude Code project.
What does develop-mcp-server do?
It gives the agent a workflow for MCP server development, covering planning, Node.js or Python setup, credentials, MCP SDK usage, logging, and tool checks.
What must be tested before completion?
Each tool needs valid-input testing, output-format verification, and recorded results. The rule keeps attempt_completion off the table until those checks are done.