code2prompt-mcp
Documentation

code2prompt-mcp
An MCP server that generates contextual prompts from codebases, making it easier for AI assistants to understand and work with your code repositories.
About
code2prompt-mcp leverages the high-performance code2prompt-rs Rust library to analyze codebases and produce structured summaries. It helps bridge the gap between your code and language models by extracting relevant context in a format that's optimized for AI consumption.
Installation
This project uses Rye for dependency management, make sure you have it installed.
To install the necessary dependencies, and build the module in the local environment, run:
# Clone the repository
git clone https://github.com/odancona/code2prompt-mcp.git
cd code2prompt-mcp
# Install dependencies with Rye
rye buildIt will install all the required dependencies specified in the `pyproject.toml` file in the `.venv` directory.
Usage
Run the MCP server:
rye run python code2prompt_mcp.mainLicense
MIT License - See LICENSE file for details.
Development
For testing, you can use the MCP Inspector:
npx @modelcontextprotocol/inspector python -m code2prompt_mcp.mainFrequently asked questions
What is code2prompt-mcp?
code2prompt-mcp is a Model Context Protocol (MCP) server listed in the TrackMCP directory.
How do I install code2prompt-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 code2prompt-mcp open source?
Yes — it is hosted on GitHub at https://github.com/odancona/code2prompt-mcp and has 14 stars.
Related MCP tools
5. Update .env file in the root directory with your mem0 API key: for the Model Context Protocol. Enhance AI assistants with powerful integrations.
Model Context Protocol integration for Python. Enhance AI assistants with powerful Python-based capabilities and integration support.
This repository contains Model Context Protocol (MCP) servers that enable MCP clients (like Claude Desktop or the cline.
🙌 OpenHands: Code Less, Make More for the Model Context Protocol. Enhance AI assistants with powerful integrations. Python-based implementation.
Universal memory layer for AI Agents; Announcing OpenMemory MCP - local and secure memory management. Python-based implementation.
基于大模型搭建的聊天机器人,同时支持 微信公众号、企业微信应用、飞书、钉钉 等接入,可选择ChatGPT/Claude/DeepSeek/文心一言/讯飞星火/通义千问/ Gemini/GLM-4/Kimi/LinkAI,能处理文本、语音和图片,访问操作系统和互联网,支持基于自有知识库进行定制企业智能客服。
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP