Skip to main content
rule CX Codex

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

Install into Cursor · Manually: put the files in place All methods and platforms ↓
.cursor/rules/develop-mcp-server.mdc
Open on GitHub

What 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 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.

How to install develop-mcp-server

Manually: put the files in place

.cursor/rules/develop-mcp-server.mdc

Frontmatter: description, globs, alwaysApply

Step 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.

Similar IDE rules

All IDE rules for Backend and APIs →

From the same set11

The whole set →
directory-structure directory-structure defines a standard top-level repository layout for your AI coding assistant, mapping source files, tests, and configuration. CX Codex +1 ★ 1,054repo stars architecture-understanding The architecture-understanding rule has the agent read docs/architecture.md and check code changes against its architecture. Use it when a project documents its design in a Mermaid diagram. CX Codex +1 ★ 1,054repo stars debug The debug rule sets the order for troubleshooting: gather evidence and context, explain the cause, then edit code. It applies when an error persists or a fix is incomplete. CX Codex +1 ★ 1,054repo stars cursor-rules-location cursor-rules-location keeps repository rule files organized by rejecting any .mdc files created outside the .cursor/rules directory. CX Codex +1 ★ 1,054repo stars plan Makes the agent read your docs, task notes and source before planning, ask clarifying questions, and only then propose a solution. CX Codex +1 ★ 1,054repo stars implement implement enforces a strict coding protocol with dependency checks, step-by-step edits, simulation passes, and automated test coverage before finalizing changes. CX Codex +1 ★ 1,054repo stars memory This rule organizes project memory across docs/, tasks/, and .cursor/rules/. It helps an agent retain plans, context, errors, and project decisions between tasks. CX Codex +1 ★ 1,054repo stars memory Keeps project memory in a fixed set of files the agent reads before work: requirements, architecture, stack, task plan, current state. CX Codex +1 ★ 1,054repo stars

Project sponsors

Companies that keep this analytics open