cursor-bridge-mcp

cursor-bridge-mcp

Enables any MCP-compatible AI tool to read and leverage Cursor's context files (rules, agents, and skills) with their activation logic, allowing teams to maintain a single source of context across different AI coding assistants.

Category
访问服务器

README

Cursor Bridge MCP

A local MCP server that gives Claude Code (and any MCP-compatible AI tool) native understanding of Cursor's context ecosystem — rules, agents, and skills.

Why

Most teams aren't all-in on one AI tool. Some developers prefer Cursor, others use Claude Code, and some switch between both depending on the task. But Cursor's context system — rules, agents, and skills — only works inside Cursor. Claude Code ignores .cursor/ entirely and reads only CLAUDE.md.

That leaves teams with a choice: maintain parallel context systems that drift apart, or pick one tool and lose the other's strengths. Cursor Bridge eliminates this by making Cursor's context files consumable by any MCP-compatible AI tool. Write your conventions once in .cursor/rules/, define your agents in .cursor/agents/, package your skills in .cursor/skills/ — and every developer on the team gets the same context regardless of which tool they use.

What It Does

Cursor Bridge reads .cursor/rules/, .cursor/agents/, and .cursor/skills/, applies Cursor's activation logic (glob matching, always-apply, description-based discovery), and serves the right context to any AI tool on demand.

  • Rules are routed intelligently — always-apply rules inject automatically, glob-matched rules activate based on the files you're working on, and description-matched rules surface when the task is relevant
  • Agents are served as loadable role instructions — when a task matches an agent's description, the AI can adopt that agent's behavioral guidance
  • Skills are served as on-demand knowledge packages — the AI browses the index and loads what it needs, including supporting scripts and references

Quick Start

The fastest way to get running — no install needed:

{
  "mcpServers": {
    "cursor-bridge": {
      "command": "npx",
      "args": ["cursor-bridge-mcp"]
    }
  }
}

Add this to .claude/settings.json (Claude Code) or .cursor/mcp.json (Cursor). That's it — npx downloads and runs the latest version automatically.

Other Install Options

Install globally

npm install -g cursor-bridge-mcp

Then use "command": "cursor-bridge-mcp" in your MCP config instead of npx.

Build from source

git clone https://github.com/theamazingwolf/cursor-bridge-mcp.git
cd cursor-bridge-mcp
npm install
npm run build
npm link

Then use "command": "cursor-bridge-mcp" in your MCP config, or point directly to the build:

{
  "mcpServers": {
    "cursor-bridge": {
      "command": "node",
      "args": ["/path/to/cursor-bridge-mcp/dist/index.cjs"]
    }
  }
}

Tools

get_active_rules

Returns rules that apply to your current files and/or task. This is the primary tool — call it when starting work or switching file context.

{
  "files": ["src/components/Button.tsx"],
  "task_description": "Refactoring the button component"
}

Rules are matched by activation mode:

  • alwaysalwaysApply: true rules are always included
  • auto — rules with globs patterns are included when files match
  • agent-requested — rules with no globs are included when the task description overlaps with the rule's description

get_context_index

Returns a lightweight menu of all available rules, agents, and skills — descriptions only, no content. Use this to discover what's available.

{
  "types": ["rule", "agent", "skill"]
}

get_rule

Fetches the full content of a specific rule by name.

{ "name": "data-models-relationships" }

get_agent

Fetches the full definition of a Cursor agent — including its system prompt / instructions.

{ "name": "security-auditor" }

get_skill

Fetches the full content of a skill package.

{
  "name": "pdf-processing",
  "include_supporting_files": true
}

get_skill_file

Fetches a specific supporting file from within a skill directory.

{
  "skill_name": "pdf-processing",
  "file_path": "scripts/extract-text.py"
}

Usage with Claude Code

Add a CLAUDE.md to any project with a .cursor/ directory to tell Claude Code to use the bridge automatically. Here's a template:

## Cursor Bridge MCP

When the cursor-bridge MCP is connected, use it to read Cursor context files
instead of reading .cursor/ files directly.

- On session start, call `get_context_index` to discover available context
- When working on files, call `get_active_rules` with current file paths and/or
  a task description to get relevant rules with full content
- Use `get_rule`, `get_agent`, `get_skill` to load specific items by name
- Use `get_skill_file` to load supporting files from skill packages

The bridge applies Cursor's activation logic (glob matching, always-apply,
description relevance) so you get the right context automatically.

This way Claude Code knows to call the MCP tools rather than manually reading and interpreting .cursor/ files. The bridge handles the routing logic — which rules apply, which don't — so the AI doesn't have to.

Cursor Context Formats

Rules (.cursor/rules/)

Standard .mdc or RULE.md files with YAML frontmatter:

---
description: "React component conventions"
globs: "src/components/**/*.tsx"
alwaysApply: false
---

# Component Patterns

Your conventions here...

Both .mdc files directly in the rules directory and RULE.md files in subdirectories are supported.

Agents (.cursor/agents/)

Markdown files with agent metadata in frontmatter:

---
description: "Reviews code for security vulnerabilities"
model: inherit
readonly: true
is_background: true
---

You are a security specialist...

Skills (.cursor/skills/)

Directory-based packages with a SKILL.md and optional scripts/, references/, assets/ subdirectories:

.cursor/skills/pdf-processing/
├── SKILL.md
├── scripts/extract-text.py
└── references/form-fields.md

Configuration

Optionally create .cursor-bridge/config.yaml to customize directory paths:

rules_directory: ".cursor/rules"
agents_directory: ".cursor/agents"
skills_directory: ".cursor/skills"

All paths are relative to the workspace root. If no config file exists, the defaults above are used.

How It Works

  • No file watchers — the index rebuilds from disk on each tool call, parsing only YAML frontmatter (not full file content). This keeps every call fresh and avoids platform-specific reliability issues.
  • Lazy content loading — full markdown bodies are only read when a tool specifically needs them (e.g., get_rule, get_active_rules for matched rules). The index itself never loads content.
  • No network access — pure local file parsing. No AI calls, no external APIs.
  • No code execution — skill scripts are served as text content, never executed.

Development

npm install
npm run build
npm test

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选