Token导航 LogoToken导航TokenDH.com
Cursor Buddy MCP logo
AI代理stdio官方级别未说明来源级核验

Cursor Buddy MCP

MCP Server

Cursor Buddy MCP是一款基于Model Context Protocol的AI助手上下文管理工具,通过集中存储项目规则、文档和任务信息,使AI助手能够保持上下文感知和一致性。

工具数

0

提示词数

0

GitHub Stars

12

资源数

0
上下文管理GoClaudeClaude DesktopClaudeCursor

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

omar-haris

提供方

omar-haris

最后核验

2026/5/17 20:23

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

MCP Logo

光标好友MCP

🤖 保持AI代理的上下文感知和一致性

](https://github.com/omar-haris/cursor-buddy-mcp/pkgs/container/cursor-buddy-mcp) ![Go](https://golang.org/) ![MCP](https://modelcontextprotocol.io) ![License](LICENSE)

*将您的AI助手转变为一个了解项目标准、惯例和历史的上下文感知编码合作伙伴。*

🚀 快速开始📚 文档🔧 工具💡 例子

______________________________________________________________________

🎯 为什么选择Cursor Buddy MCP?

🧠 情境感知AI

你的人工智能助手可以立即了解你的编码标准、架构模式和项目惯例

📚 集中的知识

所有项目文件和指南都在一个可搜索的位置

进度跟踪

自动待办事项管理和实施历史跟踪

🔄 实时更新

文件监控确保您的AI始终拥有最新信息

🚀 零设置摩擦

直接与MCP集成的Docker容器

🔍 智能搜索

在所有项目环境中快速、相关的结果

______________________________________________________________________

📋 目录

- 📋 规则文件 - 📖 知识档案 - ✅ Todo文件 - 🗄️ 数据库文件

______________________________________________________________________

🏗️ 建筑

graph TB
    A[AI Assistant] --> B[MCP Client]
    B --> C[Cursor Buddy MCP Server]
    C --> D[.buddy Directory]
    D --> E[Rules]
    D --> F[Knowledge]
    D --> G[Todos]
    D --> H[Database]
    D --> I[History]
    D --> J[Backups]
    
    C --> K[Search Engine]
    C --> L[File Monitor]
    C --> M[Backup Manager]
    
    style A fill:#e1f5fe
    style C fill:#f3e5f5
    style K fill:#e8f5e8

🎨 特性

特性描述
🔧 工具6个用于管理项目上下文的交互式工具
📊 资源具有完整项目状态的项目上下文资源
🔄 标准运输标准输入/输出通信
⚡ 实时更新具有自动重新加载功能的文件监控
🔍 全文搜索对所有内容进行Bleve驱动的搜索
💾 自动备份具有回滚功能的安全文件修改

______________________________________________________________________

🚀 快速开始

1.️⃣ 从GitHub注册表中提取

docker pull ghcr.io/omar-haris/cursor-buddy-mcp:latest

2.️⃣ 配置光标

增添 .cursor/mcp.json:

⚠️ 重要:替换 /path/to/your/project/ 使用您的实际项目目录路径!
{
  "mcpServers": {
    "cursor-buddy-mcp": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-v", "/path/to/your/project/.buddy:/home/buddy/.buddy",
        "-e", "BUDDY_PATH=/home/buddy/.buddy",
        "ghcr.io/omar-haris/cursor-buddy-mcp:latest"
      ]
    }
  }
}

示例:

  • Linux/macOS: "/home/user/myproject/.buddy:/home/buddy/.buddy"
  • 窗户: "C:/Users/User/myproject/.buddy:/home/buddy/.buddy"
  • 当前目录: "${PWD}/.buddy:/home/buddy/.buddy"

💡 如何找到您的项目路径:

# Navigate to your project directory and run:
pwd
# Copy the output and replace /path/to/your/project/ with: {output}/.buddy

3.️⃣ 创建.baddy结构

导航到项目目录并运行:

mkdir -p .buddy/{rules,knowledge,todos,database,history,backups}

📁 这将创建:

your-project/
├── .buddy/
│   ├── rules/
│   ├── knowledge/
│   ├── todos/
│   ├── database/
│   ├── history/
│   └── backups/

4.️⃣ 添加您的内容

在中创建文件 .buddy/ 以下文件夹 文档 在......下面

______________________________________________________________________

🔧 可用工具

📋 buddy_get_rules

获取编码标准和指南

  • 按类别或优先级筛选
  • 支持多种规则类型

🔍 buddy_search_知识

搜索项目文档

  • 所有知识的全文搜索
  • 类别和标签过滤

buddy_manage_todos

列出/更新任务并跟踪进度

  • 基于特征的组织
  • 进度跟踪和完成

🗄️ buddy_get_database_info

获取架构信息并验证查询

  • 表架构信息
  • 查询验证和示例

📚 兄弟_历史

跟踪实施更改和搜索历史记录

  • 实施时间表
  • 功能开发跟踪

💾 buddy_backup

创建和管理文件备份

  • 自动创建备份
  • 安全的文件修改

______________________________________________________________________

💡 使用示例

问你的AI助手一些问题,比如:

🎯 类别💬 示例问题
📋 编码标准*“我们的错误处理编码标准是什么?”*
✅ 项目进度*“显示身份验证功能的当前待办事项”*
📖 文档*“搜索有关用户终结点的API文档”*
🗄️ 数据库*“用户表的数据库架构是什么?”*
📚 历史*“我们上个月是如何实现JWT身份验证的?”*
🔧 建筑*“我应该为这个功能使用什么设计模式?”*

______________________________________________________________________

📚 文档

📋 规则文件

地点: .buddy/rules/\ 目的: 定义编码标准、架构模式和指导方针

📝 格式要求

  • ✅ 使用markdown格式(.md)
  • ✅ 包括元数据: categorypriority
  • ✅ 组织清晰的章节和小节

🔧 示例:编码标准

Click to expand coding standards example

# Coding Standards
- category: coding
- priority: critical

## Overview
Core coding standards and best practices for the project.

## Go-Specific Standards
- Follow Go naming conventions (camelCase, PascalCase)
- Use `gofmt` for code formatting
- Handle errors explicitly, don't ignore them
- Use interfaces for abstraction

## Error Handling
- Always check and handle errors
- Use structured error types
- Wrap errors with context using `fmt.Errorf`
- Return meaningful error messages

## Testing
- Write unit tests for all public functions
- Use table-driven tests for multiple test cases
- Achieve minimum 80% code coverage

🏗️ 示例:架构模式

Click to expand architecture patterns example

# Architecture Patterns
- category: architecture
- priority: critical

## Design Principles
- **Single Responsibility**: Each component has one reason to change
- **Dependency Inversion**: Depend on abstractions, not concretions

## Recommended Patterns

### Repository Pattern
- Encapsulate data access logic
- Provide consistent interface for data operations
- Enable easy testing with mock implementations

### Layered Architecture
┌─────────────────────┐
│   Presentation      │  ← HTTP handlers, CLI
├─────────────────────┤
│   Business Logic    │  ← Domain models, use cases
├─────────────────────┤
│   Data Access       │  ← Repositories, databases
└─────────────────────┘

______________________________________________________________________

📖 知识档案

地点: .buddy/knowledge/\ 目的: 存储项目文档、API规范和技术信息

📝 格式要求

  • ✅ 使用markdown格式(.md)
  • ✅ 包括元数据: category 可选 tags
  • ✅ 标题和示例清晰的结构

🌐 示例:API文档

Click to expand API documentation example

# API Documentation
- category: architecture
- tags: api, rest, authentication

## Authentication Endpoints

### POST /auth/login
**Request:**

{ "email": "user@example.com", "password": "secure_password" }


**答复:**

{ "token": "jwt_token_here", "user": { "id": 123, "email": "user@example.com", "role": "user" } }


### 获取/验证/我

**标题:** `Authorization: Bearer `

**答复:**

{ "user": { "id": 123, "email": "user@example.com", "role": "user" } }


## 错误处理

所有端点均以以下格式返回错误:

{ "error": "error_code", "message": "Human readable message" }


✅ Todo Files

Location: .buddy/todos/ Purpose: Track tasks, features, and project progress

📝 Format Requirements

  • ✅ Use markdown format (.md)
  • ✅ Use checkbox syntax: - [ ] (incomplete) or - [x] (complete)
  • ✅ Group related tasks under clear headings
  • ✅ Include context and details for each task

🔐 Example: Feature Development

Click to expand feature development example

# Authentication Feature

## Backend Implementation
- [x] Set up JWT library
- [x] Create user model and database migration
- [x] Implement password hashing with bcrypt
- [ ] Create login endpoint
- [ ] Create registration endpoint
- [ ] Add middleware for protected routes
- [ ] Write unit tests for auth service
- [ ] Add integration tests for auth endpoints

## Frontend Implementation
- [ ] Create login form component
- [ ] Create registration form component
- [ ] Implement JWT token storage
- [ ] Add authentication context
- [ ] Create protected route wrapper
- [ ] Handle token refresh logic

## Security & Testing
- [ ] Add rate limiting to auth endpoints
- [ ] Implement account lockout after failed attempts
- [ ] Add password strength validation
- [ ] Security audit of auth implementation
- [ ] Load testing for auth endpoints

______________________________________________________________________

🗄️ 数据库文件

地点: .buddy/database/\ 目的: 存储SQL模式定义、迁移和查询示例

📝 示例:架构定义

Click to expand database schema example

-- Users table
CREATE TABLE users (
    id SERIAL PRIMARY KEY,
    email VARCHAR(255) UNIQUE NOT NULL,
    password_hash VARCHAR(255) NOT NULL,
    role VARCHAR(50) DEFAULT 'user',
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

-- Sessions table for JWT blacklisting
CREATE TABLE sessions (
    id SERIAL PRIMARY KEY,
    user_id INTEGER REFERENCES users(id) ON DELETE CASCADE,
    token_hash VARCHAR(255) UNIQUE NOT NULL,
    expires_at TIMESTAMP NOT NULL,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

-- Indexes for performance
CREATE INDEX idx_users_email ON users(email);
CREATE INDEX idx_sessions_token_hash ON sessions(token_hash);
CREATE INDEX idx_sessions_expires_at ON sessions(expires_at);

______________________________________________________________________

💎 最佳实践

🎯 练习📝 描述
🔍 具体包括具体示例和代码片段
🔄 保持更新定期审查和更新您的文件
📐 格式一致在相似的文件中遵循相同的结构
💡 包括上下文添加规则或模式存在的原因的解释
🔗 链接信息参考相关文件或外部文档
📊 版本控制保持你的 .buddy 版本控制中的文件夹
🔄 定期评论安排对知识库的定期审查

______________________________________________________________________

🔧 高级功能

🔍 文件监视

服务器会自动监视您的 .buddy 用于实时更改和重新加载内容的目录。

🔎 搜索集成

使用Bleve全文搜索,在所有项目上下文中快速获得相关结果。

💾 备份管理

在修改之前自动创建重要文件的备份。

🏗️ 可扩展架构

使用Go构建,具有高性能和易于扩展的新工具和功能。

______________________________________________________________________

🤝 贡献

我们欢迎捐款!以下是您可以提供帮助的方式:

  1. 🐛 报告问题:发现一个bug? 打开一个问题
  2. 💡 建议功能:有主意吗? 开始讨论
  3. 🔧 提交PR:准备好编码了吗?分叉、开发并提交拉取请求
  4. 📚 改进文档:帮助我们改进文档

______________________________________________________________________

🎉 准备好开始了吗?

你的人工智能助手现在将对你的代码库有深入的了解,并可以提供一致、知情的回应。

⬆️ 返回页首

______________________________________________________________________

*由以下材料制成❤️ 由开发者,为开发者*

目录标签

目录标签

上下文管理GoClaudeAI助手本地部署代码规范项目文档任务跟踪

支持客户端

Claude DesktopClaudeCursor

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

token

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdiotoken部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP