trackmcp
Back to directory
omar-haris

cursor-buddy-mcp

View on GitHub

๐Ÿค– 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.

9 stars GoAI & Machine Learning Updated Aug 27, 2025
aicluadecursorcursor-aimcpmcp-servermcp-toolsvscode

Documentation


๐ŸŽฏ 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

Fast, relevant results across all your project context


๐Ÿ“‹ Table of Contents


๐Ÿ—๏ธ Architecture

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

bash
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!

json
{
  "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:

bash
# 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:

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

๐Ÿ“ This will create:

code
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:


๐Ÿ“š 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

Click to expand coding standards example

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

Click to expand architecture patterns example

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

Click to expand API documentation example

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

## Authentication Endpoints

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

{

"email": "user@example.com",

"password": "secure_password"

}

code
**Response:**

{

"token": "jwt_token_here",

"user": {

"id": 123,

"email": "user@example.com",

"role": "user"

}

}

code
### GET /auth/me
**Headers:** `Authorization: Bearer `

**Response:**

{

"user": {

"id": 123,

"email": "user@example.com",

"role": "user"

}

}

code
## Error Handling
All endpoints return errors in this format:

{

"error": "error_code",

"message": "Human readable message"

}

code
// Code block

โœ… 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

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

Click to expand database schema example

sql
-- 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


๐Ÿ”ง 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


Frequently asked questions

What is cursor-buddy-mcp?

cursor-buddy-mcp is ๐Ÿค– 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.

How do I install cursor-buddy-mcp?

Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.

Is cursor-buddy-mcp open source?

Yes โ€” it is hosted on GitHub at https://github.com/omar-haris/cursor-buddy-mcp and has 9 stars.

Related MCP tools

Run your own MCP server? See who uses it and what to fix.

Measure it with TrackMCP