# develop-mcp-server

The develop-mcp-server rule structures MCP server work from planning to validation, with setup guidance for Node.js and Python projects.

- rule · `type=rule` · Claude Code, Cline, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop) · ★ 1054 repo stars
- Author: Bhartendu-Kumar
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/Bhartendu-Kumar/rules_template/tree/HEAD/specific_rule_files/develop-mcp-server.mdc
- Updated: 2025-07-17
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/rules/develop-mcp-server

## What it 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`.

## Install

### Cursor (native platform)

**Manually: put the files in place**
- File: `.cursor/rules/develop-mcp-server.mdc` — Frontmatter: description, globs, alwaysApply

### Claude Code

**Manually: put the files in place**
- File: `.claude/rules/develop-mcp-server.md` — The paths frontmatter field limits the files: move globs from the source into paths

### Codex

**AGENTS.md**
- Codex reads AGENTS.md: paste the rule text there

### GitHub Copilot

**Manually: put the files in place**
- File: `.github/instructions/develop-mcp-server.instructions.md` — The applyTo field sets which files it applies to: move globs from the source into applyTo

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/rules/develop-mcp-server.md`

### Cline

**Manually: put the files in place**
- File: `.clinerules/develop-mcp-server.md`

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/Bhartendu-Kumar/rules_template/tree/HEAD/specific_rule_files/develop-mcp-server.mdc

## When to use it
- 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
- 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 with `mcp install server.py -v API_KEY=key`, and verify its responses.
- Run through every MCP tool with valid inputs and wait to use `attempt_completion` until the checks are recorded.

## Similar
- [backend-developer](https://affpapa.org/en/nevibecode/agents/voltagent-community-backend-developer.md) — subagent · 2724 installs
- [develop-ai-functions-example](https://affpapa.org/en/nevibecode/skills/develop-ai-functions-example.md) — skill · 21 installs
- [performance-profiler](https://affpapa.org/en/nevibecode/skills/performance-profiler.md) — skill · 720 installs
- [jwt-encode](https://affpapa.org/en/nevibecode/skills/jwt-encode.md) — skill · 652 installs
- [develop](https://affpapa.org/en/nevibecode/commands/coco-research-develop.md) — command · ★ 328 repo stars
- [develop-web-game](https://affpapa.org/en/nevibecode/skills/develop-web-game.md) — skill · 342 installs

From the same set: [bhartendu-kumar/rules_template](https://affpapa.org/en/nevibecode/by/bhartendu-kumar/rules_template.md) — 11 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
