mcp

mcp is a cursor rule for Cursor from bestcarly/opc-coding-guide. It costs 1,663 tokens per session, scanned B, original, MIT.

Configuration guidance for MCP, a protocol that lets coding agents connect to external tools and services. It covers server settings, filesystem access, and a memory bank.

In plain words
What is it for?
Setting up MCP servers with version information, working directories, permissions, disabled states, audit logging, and memory-bank backups.
Why use it?
It provides a standard configuration structure and limits which project folders an MCP filesystem server may read or write, while blocking sensitive paths.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc). Also seen: mentions Codex.

Good fit Setting up MCP servers with version information, working directories, permissions, disabled states, audit logging, and memory-bank backups.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/bestcarly/opc-coding-guide/mcp
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.

Clone the repo
git clone --depth 1 https://github.com/bestcarly/opc-coding-guide

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mcp

README.md
[![agentmods](https://agentmods.dev/badge/rules/bestcarly/opc-coding-guide/mcp/github.svg)](https://agentmods.dev/rules/bestcarly/opc-coding-guide/mcp)
Your own site
<a href="https://agentmods.dev/rules/bestcarly/opc-coding-guide/mcp"><img src="https://agentmods.dev/badge/rules/bestcarly/opc-coding-guide/mcp/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mcp

Your own site · 80×15
<a href="https://agentmods.dev/rules/bestcarly/opc-coding-guide/mcp"><img src="https://agentmods.dev/badge/rules/bestcarly/opc-coding-guide/mcp.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,663 This file is loaded in full into every session.
When invoked 1,663 The same file — it is already loaded in full.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.01663 $0.01663
Opus 5.5 $0.00665 $0.00665
Sonnet 5.5 $0.00333 $0.00333
Haiku 4.5 $0.00166 $0.00166

Measured 2mo ago against content hash 11ed8a674a06, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

mcp scanned grade B with 1 finding 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 2mo ago.

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.

Reads MCP configurationmediumAgent snooping

mcp.json carries server URLs and auth tokens; reading it lets a mod discover and abuse other integrations.

cat mcp.json | jq '.mcpServers[].permissions'
skills/cursor-rules/mcp.mdc · 291 lines

How it starts

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

MCP 配置规则(2026 年版)

补充人:墨铃 (Mori)
补充日期:2026-02-28
参考章节:第十二章


MCP 服务器配置原则

  • 使用最新版 MCP 服务器(协议版本 2025-11)
  • 配置最小权限原则
  • 启用审计日志
  • 定期更新服务器版本

基础配置结构

{
  "$schema": "https://modelcontextprotocol.io/schema/mcp-config.json",
  "version": "2025-11",
  "mcpServers": {
    "[server-name]": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-[name]@latest"],
      "cwd": "${workspaceFolder}",
      "env": {},
      "permissions": {},
      "disabled": false
    }
  }
}

Filesystem MCP 配置

{
  "filesystem": {
    "command": "npx",
    "args": ["-y", "@modelcontextprotocol/server-filesystem@latest"],
    "cwd": "${workspaceFolder}",
    "permissions": {
      "read": ["./src", "./docs", "./tests"],
      "write": ["./src"],
      "deny": ["./.env", "./config/secrets", "./node_modules"]
    }
  }
}

权限说明:

  • read:允许读取的目录
  • write:允许写入的目录
  • deny:禁止访问的目录(优先级最高)

Memory Bank MCP 配置

{
  "memory-bank": {
    "command": "npx",
    "args": ["-y", "@modelcontextprotocol/server-memory-bank@latest"],
    "cwd": "${workspaceFolder}",
    "config": {
      "autoUpdate": true,
      "backupEnabled": true,
      "backupInterval": "24h",
      "backupLocation": "./.backups/memory-bank",
      "files": {
        "product-requirements.md": { "autoUpdate": true },
        "architecture.md": { "autoUpdate": true },
        "progress.md": { "autoUpdate": true },
        "decisions.md": { "autoUpdate": true },
        "learnings.md": { "autoUpdate": true }
      }
    }
  }
}

配置说明:

  • autoUpdate:AI 完成任务后自动更新 Memory Bank
  • backupEnabled:启用自动备份
  • backupInterval:备份间隔(支持 h、d、w)

GitHub MCP 配置

{
  "github": {
    "command": "npx",
    "args": ["-y", "@modelcontextprotocol/server-github@latest"],
    "env": {
      "GITHUB_TOKEN": "${GITHUB_TOKEN}"
    },
    "permissions": {
      "repos": ["read"],
      "pullRequests": ["read", "write"],
      "issues": ["read", "write"],
      "actions": ["read"]
    }
  }
}

Read the full file on GitHub · 291 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. 2mo ago First seen · 291 lines · 1,663 tokens per session scan B 11ed8a674a06

Subscribe to this mod's changes

mcp is a cursor rule published in the GitHub repository bestcarly/opc-coding-guide (7 stars, last pushed 7mo ago), licensed MIT. It adds 1,663 tokens to every session, about $0.0067 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads mcp configuration). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.