Skip to main content

A Model Context Protocol server for turning repositories into navigable MCP systems

Project description

Dev-Kit MCP Server

PyPI - Python Version version License OS OS OS Tests Code Checks codecov Ruff Last Commit

A Model Context Protocol (MCP) server for interacting with codebases. This package provides tools for turning any repository or code base into an MCP system.

Features

  • 🔌 MCP Integration: Turn any codebase into an MCP-compliant system
  • 🛠️ Custom Tools: Create custom tools for specific repository needs
  • 🔍 Repository Navigation: Navigate and explore code repositories with ease
  • 🧩 Code Structure Analysis: Understand code structure through AST analysis
  • 🔢 Code Exploration: Explore code elements like functions, classes, and imports
  • 🚀 Fast API: Built with FastAPI for high performance

Installation

pip install dev-kit-mcp-server

Usage

Running the Server

# Recommended method (with root directory specified)
dev-kit-mcp-server --root-dir=workdir

# Alternative methods
uv run python -m dev_kit_mcp_server.mcp_server --root-dir=workdir
python -m dev_kit_mcp_server.mcp_server --root-dir=workdir

The --root-dir parameter specifies the directory where file operations will be performed. This is important for security reasons, as it restricts file operations to this directory only.

API Endpoints

  • GET /: Repository navigation server information
  • POST /analyze: Comprehensive repository structure analysis
  • POST /ast: Code structure extraction for navigation
  • POST /tokenize: Detailed code element identification
  • POST /count: Repository component summarization

Get repository structure for navigation

response = requests.post( "http://localhost:8000/analyze", json={"code": code, "path": "src/data/navigator.py"} )

Use the structure for repository navigation

structure = response.json() print(f"Repository components found: {len(structure['result']['ast_analysis']['functions'])} functions, " f"{len(structure['result']['ast_analysis']['classes'])} classes")


## Development

### Setup

```bash
# Clone the repository
git clone https://github.com/DanielAvdar/dev-kit-mcp-server.git
cd dev-kit-mcp-server

# Install development dependencies
pip install -e ".[dev]"

# Run tests
pytest

Contributing

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

License

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dev_kit_mcp_server-0.0.1b0.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dev_kit_mcp_server-0.0.1b0-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file dev_kit_mcp_server-0.0.1b0.tar.gz.

File metadata

File hashes

Hashes for dev_kit_mcp_server-0.0.1b0.tar.gz
Algorithm Hash digest
SHA256 29b477f9212bcafac20052a50ad4f6bf28f275dec302d0c97218ff2658808a30
MD5 d04ac93e94c6ee8d6419a48d1d9c1165
BLAKE2b-256 b396c7aeae13d7df484b842f3d6c6fbe8c14edf3a31b7febc36f94a47d866708

See more details on using hashes here.

File details

Details for the file dev_kit_mcp_server-0.0.1b0-py3-none-any.whl.

File metadata

File hashes

Hashes for dev_kit_mcp_server-0.0.1b0-py3-none-any.whl
Algorithm Hash digest
SHA256 34c25208cd571cbd73dc2f4562397cf7e41a8add89cc61cd3c3ad1b2e5a7524c
MD5 bf44dd697a78eff07d550525ed664371
BLAKE2b-256 52cb45766e2db9dfd1e4ac4dca49bee5ad3c4e7d8b5939b07b94f456ea9fb6b6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page