new-package-creation

A step-by-step guide for creating a new MCP server package in the MCP DevTools monorepo.

In plain words
What is it for?
Use it when starting a new service integration package with TypeScript, tests, builds, and an MCP server entry point.
Why use it?
It reduces the setup decisions involved in creating the package folders, configuration files, source files, and development scripts.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/dxheroes/mcp-devtools/new-package-creation
Clone the repo
git clone --depth 1 https://github.com/DXHeroes/mcp-devtools

Made for: Cursor.

Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 3,689 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.03689
Opus 5 $0.00000 $0.01844
Sonnet 5 $0.00000 $0.00738
Haiku 4.5 $0.00000 $0.00369

Measured yesterday against content hash 6d90cfb3c07f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

new-package-creation scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/new-package-creation.mdc · 589 lines

How it starts

The opening of the file, as written. The whole thing — 589 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Creating a New MCP Server Package

This guide provides a step-by-step process for creating a new MCP server package in the MCP DevTools monorepo.

@url https://docs.cursor.com/context/rules-for-ai @file packages/jira/package.json @file packages/jira/src/index.ts @file .cursor/rules/repository-structure.mdc @file .cursor/rules/mcp-server-implementation.mdc @file .cursor/rules/core-libraries-usage.mdc

Step 1: Set Up Package Structure

First, create the basic package structure:

# 1. Create package directory
mkdir -p packages/[service-name]/src/{tools,api,types,utils}

# 2. Create main files
touch packages/[service-name]/package.json
touch packages/[service-name]/tsconfig.json
touch packages/[service-name]/README.md
touch packages/[service-name]/src/index.ts
touch packages/[service-name]/src/types/index.ts

Step 2: Configure Package Files

package.json

{
  "name": "@mcp-devtools/[service-name]",
  "version": "0.1.0",
  "description": "MCP server for [service] integration",
  "main": "build/index.js",
  "scripts": {
    "build": "tsc",
    "start": "node build/index.js",
    "dev": "ts-node src/index.ts",
    "test": "jest",
    "lint": "eslint src --ext .ts",
    "format": "prettier --write 'src/**/*.ts'"
  },
  "files": ["build"],
  "license": "MIT",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/github-user/mcp-devtools.git"
  },
  "dependencies": {
    "@modelcontextprotocol/server": "^0.1.0",
    "@modelcontextprotocol/types": "^0.1.0",
    "@mcp-devtools/core": "^0.1.0"
  },
  "devDependencies": {
    "@types/jest": "^29.5.0",
    "@types/node": "^18.0.0",
    "eslint": "^8.0.0",
    "jest": "^29.5.0",
    "prettier": "^2.8.0",
    "ts-jest": "^29.1.0",
    "ts-node": "^10.9.0",
    "typescript": "^5.0.0"
  },
  "publishConfig": {
    "access": "public"
  }
}

tsconfig.json

{
  "extends": "../../tsconfig.base.json",
  "compilerOptions": {
    "outDir": "build",
    "rootDir": "src"
  },
  "include": ["src/**/*"],
  "exclude": ["**/*.test.ts", "node_modules"]
}

Read the full file on GitHub · 589 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 589 lines · 0 tokens per session scan A 6d90cfb3c07f

Subscribe to this mod's changes

new-package-creation is a cursor rule published in the GitHub repository DXHeroes/mcp-devtools (13 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 3,689 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other cursor rules, from other repositories

cursorrules

You are building an AI/ML project with Python. The project uses PyTorch for model training, handles data pipelines with proper validation, tracks experiments systematically, and follows production ML engineering practices. Code is type-hinted, tested, and reproducible.

survivorforge/cursor-rules · 2,136 tokens

rule

AI/ML Python development (PyTorch, scikit-learn).

survivorforge/cursor-rules · 0 tokens

language-agnostic-patterns

Language-agnostic programming patterns: SOLID, design patterns, clean code, and architecture. Load when refactoring, designing abstractions, or reviewing structure — not for everyday syntax.

madebyaris/advance-minimax-m3-cursor-rules · 37 tokens

cursor-tools-mastery

Cursor 3.7 runtime guide: choose the right tool, canvases, Design Mode, /worktree, /best-of-n, Await, and parallel execution where safe.

madebyaris/advance-minimax-m3-cursor-rules · 36 tokens

cursor-agent-orchestration

Cursor 3.7 orchestration guide: when to plan, when to delegate, nested subagents, multi-environment handoffs, /best-of-n, and Await for long-running branches.

madebyaris/advance-minimax-m3-cursor-rules · 39 tokens

fable5-reasoning

Fable 5 reasoning protocols: task interpretation, risk-first decomposition, approach selection, interleaved thinking, hypothesis ledgers, premortems, calibration, and the stuck-strategy ladder. Load for complex, ambiguous, or long-horizon tasks, for debugging strategy, or whenever progress stalls.

madebyaris/advance-minimax-m3-cursor-rules · 60 tokens