Skip to content
Conduit

mcp server

cursor-buddy-mcp

πŸ€– MCP server that gives AI agents deep context about your project - coding standards, knowledge base, todos, database schema & history. Keep your AI assistant consistent and context-aware.

omar-haris/cursor-buddy-mcpcommunitylistedunreviewed

Set up

Runs on your computer. Pick your agent and operating system.

This project does not publish an install method we can turn into a config. Follow the README instead.

README

synced Oct 17, 2026

Cursor Buddy MCP

πŸ€– Keep AI Agents Context-Aware & Consistent

Docker Go MCP License

Transform your AI assistant into a context-aware coding partner that understands your project's standards, conventions, and history.

πŸš€ Quick Start β€’ πŸ“š Documentation β€’ πŸ”§ Tools β€’ πŸ’‘ Examples


🎯 Why Cursor Buddy MCP?

🧠 Context-Aware AI

Your AI assistant instantly knows your coding standards, architectural patterns, and project conventions

πŸ“š Centralized Knowledge

All project documentation and guidelines in one searchable location

βœ… Progress Tracking

Automatic todo management and implementation history tracking

πŸ”„ Real-time Updates

File monitoring ensures your AI always has the latest information

πŸš€ Zero Setup Friction

Drop-in Docker container with immediate MCP integration

πŸ” Intelligent Search

Fast, relevant results across all your project context


πŸ“‹ Table of Contents


πŸ—οΈ Architecture

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

Built on the Model Context Protocol (MCP) using the Go SDK from mark3labs/mcp-go. Communicates over stdin/stdout using JSON-RPC 2.0, making it compatible with MCP clients like Claude Desktop.

🎨 Features

FeatureDescription
πŸ”§ Tools6 interactive tools for managing project context
πŸ“Š ResourcesProject context resource with complete project state
πŸ”„ Stdio TransportStandard input/output communication
⚑ Real-time UpdatesFile monitoring with automatic reloading
πŸ” Full-text SearchBleve-powered search across all content
πŸ’Ύ Automatic BackupsSafe file modifications with rollback capability

πŸš€ Quick Start

1️⃣ Pull from GitHub Registry

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

2️⃣ Configure Cursor

Add to .cursor/mcp.json:

⚠️ Important: Replace /path/to/your/project/ with your actual project directory path!

{
  "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"
      ]
    }
  }
}

Examples:

  • Linux/macOS: "/home/user/myproject/.buddy:/home/buddy/.buddy"
  • Windows: "C:/Users/User/myproject/.buddy:/home/buddy/.buddy"
  • Current directory: "${PWD}/.buddy:/home/buddy/.buddy"

πŸ’‘ How to find your project path:

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

3️⃣ Create .buddy Structure

Navigate to your project directory and run:

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

πŸ“ This will create:

your-project/
β”œβ”€β”€ .buddy/
β”‚   β”œβ”€β”€ rules/
β”‚   β”œβ”€β”€ knowledge/
β”‚   β”œβ”€β”€ todos/
β”‚   β”œβ”€β”€ database/
β”‚   β”œβ”€β”€ history/
β”‚   └── backups/

4️⃣ Add Your Content

Create files in .buddy/ folders following the documentation below.


πŸ”§ Available Tools

πŸ“‹ buddy_get_rules

Get coding standards and guidelines

  • Filter by category or priority
  • Support for multiple rule types

πŸ” buddy_search_knowledge

Search project documentation

  • Full-text search across all knowledge
  • Category and tag filtering

βœ… buddy_manage_todos

List/update tasks and track progress

  • Feature-based organization
  • Progress tracking and completion

πŸ—„οΈ buddy_get_database_info

Get schema info and validate queries

  • Table schema information
  • Query validation and examples

πŸ“š buddy_history

Track implementation changes and search history

  • Implementation timeline
  • Feature development tracking

πŸ’Ύ buddy_backup

Create and manage file backups

  • Automatic backup creation
  • Safe file modifications

πŸ’‘ Usage Examples

Ask your AI assistant questions like:

🎯 CategoryπŸ’¬ Example Questions
πŸ“‹ Coding Standards"What are our coding standards for error handling?"
βœ… Project Progress"Show me current todos for the authentication feature"
πŸ“– Documentation"Search for API documentation about user endpoints"
πŸ—„οΈ Database"What's the database schema for the users table?"
πŸ“š History"How did we implement JWT authentication last month?"
πŸ”§ Architecture"What design patterns should I use for this feature?"

πŸ“š Documentation

πŸ“‹ Rules Files

Location: .buddy/rules/
Purpose: Define coding standards, architectural patterns, and guidelines

πŸ“ Format Requirements

  • βœ… Use markdown format (.md)
  • βœ… Include metadata: category and priority
  • βœ… Organize with clear sections and subsections

πŸ”§ Example: Coding Standards

# 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

πŸ—οΈ Example: Architecture Patterns

# 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
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“– Knowledge Files

Location: .buddy/knowledge/
Purpose: Store project documentation, API specs, and technical information

πŸ“ Format Requirements

  • βœ… Use markdown format (.md)
  • βœ… Include metadata: category and optional tags
  • βœ… Structure with clear headings and examples

🌐 Example: API Documentation

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

## Authentication Endpoints

### POST /auth/login
**Request:**
```json
{
  "email": "user@example.com",
  "password": "secure_password"
}

Response:

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

GET /auth/me

Headers: Authorization: Bearer <token>

Response:

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

Error Handling

All endpoints return errors in this format:

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

</details>

---

### βœ… 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

<details>
<summary>Click to expand feature development example</summary>

```markdown
# 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

πŸ—„οΈ Database Files

Location: .buddy/database/
Purpose: Store SQL schema definitions, migrations, and query examples

πŸ“ Example: Schema Definition

-- 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);

πŸ’Ž Best Practices

🎯 PracticeπŸ“ Description
πŸ” Be SpecificInclude concrete examples and code snippets
πŸ”„ Stay UpdatedRegularly review and update your files
πŸ“ Consistent FormattingFollow the same structure across similar files
πŸ’‘ Include ContextAdd explanations for why rules or patterns exist
πŸ”— Link InformationReference related files or external documentation
πŸ“Š Version ControlKeep your .buddy folder in version control
πŸ”„ Regular ReviewsSchedule periodic reviews of your knowledge base

πŸ”§ Advanced Features

πŸ” File Monitoring

The server automatically monitors your .buddy directory for changes and reloads content in real-time.

πŸ”Ž Search Integration

Uses Bleve full-text search for fast, relevant results across all your project context.

πŸ’Ύ Backup Management

Automatically creates backups of important files before modifications.

πŸ—οΈ Extensible Architecture

Built with Go for high performance and easy extension with new tools and features.


🀝 Contributing

We welcome contributions! Here's how you can help:

  1. πŸ› Report Issues: Found a bug? Open an issue
  2. πŸ’‘ Suggest Features: Have an idea? Start a discussion
  3. πŸ”§ Submit PRs: Ready to code? Fork, develop, and submit a pull request
  4. πŸ“š Improve Docs: Help us make the documentation better

πŸŽ‰ Ready to Get Started?

Your AI assistant will now have deep context about your codebase and can provide consistent, informed responses.

⬆️ Back to Top


Made with ❀️ by developers, for developers

↑↓ navigate openesc close