Skip to main content
Glama

Code Buddy

Your AI-powered coding companion for Claude Desktop

Python Version License Status

Project Status: Work in Progress - Active Development

A powerful Model Context Protocol (MCP) server that provides AI assistants with comprehensive file system and development tools. Built to work seamlessly with Claude Desktop and other MCP-compatible clients.

Note: This project is under active development. Core features are functional, but some areas are still being refined and tested.

Features

File Operations

  • Read, write, edit, delete files at any location

  • Copy and move files with full path support

  • Support for both absolute and relative paths

Directory Management

  • Create, list, delete directories

  • Recursive directory tree visualization

  • Navigate project structures easily

Code Tools

  • Analyze code structure and complexity

  • Extract functions and classes

  • Format code with Black

  • Lint code with Ruff

Search & Replace

  • Search patterns across files

  • Find and replace text

  • Bulk find-and-replace operations

Git Integration

  • Git status, diff, log operations

  • Support for external repositories

  • Branch and commit management

Command Execution

  • Run shell commands in any directory

  • Execute Python scripts

  • Custom working directory support

Related MCP server: FastFS-MCP

Demo

Watch the agent in action creating a motivational quote website:

https://github.com/user-attachments/assets/5bd48fab-73cc-4ea9-b28e-d52ff224fc2b

The agent automatically created the full project structure, HTML, CSS, and JavaScript with working API integration.

Current Status & Roadmap

βœ… Completed Features

  • MCP server implementation with 23+ tools

  • Claude Desktop integration

  • File operations (read, write, edit, delete, copy, move)

  • Directory management with tree visualization

  • Git integration with external repository support

  • Code analysis and formatting tools

  • Search and replace functionality

  • Command execution with custom working directories

  • Real-time streaming responses

  • Absolute path support for external projects

🚧 In Development

  • CLI Agent (standalone interactive interface)

  • Comprehensive test suite

  • Error recovery mechanisms

  • Performance optimizations

  • Enhanced documentation and examples

πŸ“‹ Planned Features

  • Multi-language support beyond Python

  • Database integration tools

  • Docker and container management

  • API testing tools

  • Project scaffolding templates

  • Plugin system for custom tools

Installation

Prerequisites

  • Python 3.13 or higher

  • uv package manager

  • Claude Desktop (for MCP integration)

Setup

  1. Clone the repository:

git clone https://github.com/Abhi-vish/code-buddy.git
cd code-buddy
  1. Install dependencies:

uv sync
  1. Set up your OpenAI API key:

# Create .env file
echo "OPENAI_API_KEY=your-api-key-here" > .env

Usage with Claude Desktop

Configure Claude Desktop

  1. Open your Claude Desktop configuration file:

    • Windows: %APPDATA%\Claude\claude_desktop_config.json

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

    • Linux: ~/.config/Claude/claude_desktop_config.json

  2. Add the MCP server configuration:

{
  "mcpServers": {
    "code-buddy": {
      "command": "uv",
      "args": [
        "--directory",
        "C:\\path\\to\\code-buddy",
        "run",
        "python",
        "-m",
        "src.server.main"
      ],
      "cwd": "C:\\path\\to\\code-buddy",
      "env": {
        "PROJECT_ROOT": "C:\\path\\to\\code-buddy",
        "ALLOW_EXTERNAL_PATHS": "true"
      }
    }
  }
}
  1. Replace C:\\path\\to\\code-buddy with your actual project path

  2. Restart Claude Desktop

  3. Look for the hammer icon (πŸ”¨) in Claude Desktop - this indicates MCP tools are available

Using the Tools

Once configured, you can ask Claude to:

  • "Read the main.py file and explain what it does"

  • "Create a new React app at C:\Users\Projects\myapp"

  • "Show me the git status of this project"

  • "Format all Python files in the src directory"

  • "Search for TODO comments in the codebase"

The agent will automatically use the appropriate tools to complete your requests.

CLI Agent (In Development)

An interactive command-line interface is currently under development. This will provide a standalone way to interact with the coding agent without Claude Desktop.

# Coming soon
uv run python chat_agent.py

Features planned:

  • Conversational interface with streaming responses

  • Direct tool access from terminal

  • Multi-project support

  • Interactive debugging

Available Tools

File Tools

  • read_file - Read file contents

  • write_file - Write or create files

  • edit_file - Find and replace content

  • delete_file - Delete files

  • move_file - Move or rename files

  • copy_file - Copy files

Directory Tools

  • create_directory - Create directories

  • list_directory - List directory contents

  • delete_directory - Delete directories

  • get_directory_tree - Get recursive tree structure

Search Tools

  • search_in_files - Search for patterns

  • find_replace - Find and replace in a file

  • find_replace_all - Bulk find and replace

Code Tools

  • analyze_code - Analyze code metrics

  • get_functions - Extract function definitions

  • format_code - Format with Black

  • lint_code - Lint with Ruff

Git Tools

  • git - Run git commands

  • git_status - Get repository status

  • git_diff - Show changes

  • git_log - View commit history

Command Tools

  • run_command - Execute shell commands

  • run_python - Run Python scripts

Configuration

Environment Variables

  • OPENAI_API_KEY - Your OpenAI API key (required for CLI agent)

  • PROJECT_ROOT - Default project root directory

  • ALLOW_EXTERNAL_PATHS - Enable access to files outside project root (default: true)

  • MAX_FILE_SIZE - Maximum file size in bytes (default: 1MB)

  • MAX_DEPTH - Maximum directory traversal depth (default: 4)

  • LOG_LEVEL - Logging level (default: INFO)

Server Configuration

Edit config/default.yaml to customize server behavior:

name: "coding-agent"
version: "1.0.0"
max_file_size: 1048576  # 1MB
max_depth: 4
log_level: "INFO"
allow_external_paths: true

Development

Project Structure

code-buddy/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ client/          # Client-side code (CLI agent)
β”‚   β”‚   β”œβ”€β”€ agents/      # Agent implementations
β”‚   β”‚   β”œβ”€β”€ llm/         # LLM integrations
β”‚   β”‚   └── ui/          # User interfaces
β”‚   β”œβ”€β”€ server/          # MCP server implementation
β”‚   β”‚   β”œβ”€β”€ tools/       # Tool implementations
β”‚   β”‚   β”œβ”€β”€ resources/   # Resource providers
β”‚   β”‚   β”œβ”€β”€ prompts/     # Prompt templates
β”‚   β”‚   └── utils/       # Utility functions
β”‚   └── shared/          # Shared code
β”œβ”€β”€ config/              # Configuration files
β”œβ”€β”€ assets/              # Demo videos and images
└── pyproject.toml       # Project dependencies

Running Tests

# Run tests (coming soon)
uv run pytest

Code Quality

# Format code
uv run black .

# Lint code
uv run ruff check .

Troubleshooting

Claude Desktop doesn't show tools

  • Verify the configuration path is correct

  • Check that uv is in your PATH

  • Restart Claude Desktop completely

  • Look for errors in Claude Desktop logs

Commands hang or timeout

  • Increase timeout in tool parameters

  • Check if the command requires user input

  • Verify file paths are correct

Permission errors

  • Ensure ALLOW_EXTERNAL_PATHS is set to true

  • Check file system permissions

  • Run with appropriate user privileges

Known Issues & Limitations

  • edit_file tool: Requires exact whitespace matching; use write_file for complex edits

  • Large files: Files over 1MB may have performance issues

  • CLI Agent: Still in development; use Claude Desktop for production use

  • Windows paths: Use forward slashes or double backslashes in paths

  • Git operations: Some git commands may require manual input handling

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository

  2. Create your feature branch (git checkout -b feature/amazing-feature)

  3. Commit your changes (git commit -m 'Add amazing feature')

  4. Push to the branch (git push origin feature/amazing-feature)

  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

Support

If you encounter any issues or have questions:

  • Open an issue on GitHub

  • Check existing issues for solutions

  • Review the troubleshooting section


Note: This is an active development project. Features and APIs may change. Contributions and feedback are welcome as we continue to improve and expand the tool suite.

Available Tools

28 tools
analyze_codeC

Analyze code file and provide statistics

Inputs: filepath (required).

copy_fileC

Copies a file from one path to another

Inputs: source_path (required), destination_path (required).

create_directoryC

Creates a directory at the specified path (can be absolute or relative to project).

Inputs: dirpath (required).

curl_toolC

Make HTTP requests using curl command

Inputs: curl_command (required).

delete_directoryC

Deletes a directory at the specified path within the project.

Inputs: dirpath (required).

delete_fileC

Deletes a file at the specified path

Inputs: filepath (required).

docker_build_toolC

Build Docker image

Inputs: tag (required), dockerfile, context.

docker_compose_toolC

run docker-compose commands

Inputs: command (required), detach, service.

docker_toolC

Run docker commands

Inputs: command (required).

edit_fileC

Edit a file by replacing specific content

Inputs: filepath (required), old_content (required), new_content (required).

find_replaceC

Find and replace text in a single file

Inputs: filepath (required), find (required), replace (required), all_occurrences.

find_replace_allC

Find and replace text across multiple files

Inputs: find (required), replace (required), file_pattern.

format_codeC

Format a Python file using black

Inputs: filepath (required).

get_directory_treeC

Gets the directory tree structure starting from the specified path within the project.

Inputs: dirpath, max_depth.

get_functionsC

Extract function and class definitions from a Python file

Inputs: filepath (required).

gitC

Run git commands

Inputs: command (required), cwd.

git_diffC

Show git diff

Inputs: filepath, staged, cwd.

git_logC

Show git commit history

Inputs: count, oneline, cwd.

git_statusC

Get git status of the project

Inputs: cwd.

http_request_toolC

Make HTTP requests to specified URLs

Inputs: url (required), method (required), headers, body, +1 more.

lint_codeC

Lint a Python file using ruff or flake8

Inputs: filepath (required).

list_directoryC

Lists files and directories at the specified path within the project.

Inputs: dirpath, recursive.

move_fileC

Moves a file from one path to another

Inputs: source_path (required), destination_path (required).

read_fileC

Reads the content of a text file at the specified path

Inputs: filepath (required).

run_commandC

Run a shell command in the project directory

Inputs: command (required), cwd, timeout.

run_pythonC

Run a Python script or code

Inputs: code, filepath, timeout.

search_in_filesC

Search for text or pattern across project files

Inputs: pattern (required), file_pattern, case_sensitive, max_results.

write_fileC

Writes content to a text file at the specified path

Inputs: filepath (required), content (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.9/5.0

    Scored across 28 tools

    Disambiguation3/5

    Most tools have distinct purposes, but there is notable overlap in several areas. For example, 'curl_tool' and 'http_request_tool' both handle HTTP requests, and 'docker_tool', 'docker_compose_tool', and 'docker_build_tool' are all Docker-related with unclear boundaries. However, descriptions help differentiate many tools like 'find_replace' vs. 'find_replace_all'.

    Naming Consistency4/5

    Naming is mostly consistent with a verb_noun pattern (e.g., 'analyze_code', 'copy_file', 'create_directory'), but there are minor deviations such as 'curl_tool' and 'docker_tool' using '_tool' suffix inconsistently. Overall, the pattern is readable and predictable across most tools.

    Tool Count2/5

    With 28 tools, the count feels excessive for a general-purpose coding assistant. Many tools could be consolidated (e.g., Docker-related tools, HTTP request tools) or are redundant (e.g., 'run_command' vs. specific command tools). This bloat may overwhelm agents and reduce usability.

    Completeness5/5

    The tool set provides comprehensive coverage for code development tasks, including file operations (CRUD), code analysis, formatting, linting, Docker management, Git operations, and HTTP requests. There are no obvious gaps; agents can handle a wide range of coding workflows without dead ends.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      An MCP server that implements Claude Code-like functionality, allowing the AI to analyze codebases, modify files, execute commands, and manage projects through direct file system interactions.
      15
      305
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A high-speed MCP server that enables AI assistants like Claude to interact with local filesystems, manage Git repositories, and provide interactive experiences through a standardized JSON-based protocol.
      6
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      A personal MCP server for AI assistant integration that provides custom tools, resources, and prompts for use with Claude Desktop and other MCP-compatible clients.
      2
      MIT