code2prompt-mcp
Allows analyzing Git-based codebases to generate structured summaries and contextual prompts for AI assistants to better understand repositories
Enables working with GitHub repositories by extracting relevant code context and producing optimized summaries for AI consumption
Leverages the code2prompt-rs Rust library to analyze codebases and produce structured summaries optimized for AI assistants
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@code2prompt-mcpanalyze the current directory and create a prompt for understanding the project structure"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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.
Related MCP server: Code Understanding MCP Server
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.mainThis server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityFmaintenanceAn MCP server that transforms codebases into intelligent, queryable knowledge bases, enabling AI assistants to perform semantic search, explore architecture, and analyze code relationships.Last updated165
- AlicenseCqualityDmaintenanceAn MCP server that analyzes local or remote GitHub repositories, providing intelligent code context and structure to AI coding assistants.Last updated1013MIT
- AlicenseAqualityBmaintenanceAn MCP server that helps AI agents comprehend a codebase by providing tools for navigating, searching, and understanding code structure and history.Last updated10MIT
- Alicense-qualityDmaintenanceA self-hosted MCP server that indexes your codebase and provides AI assistants with deep context including file tree, full-text search, git history, dependencies, and stack detection, all without sending your code to third parties.Last updated11MIT
Related MCP Connectors
An MCP server that gives your AI access to the source code and docs of all public github repos
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ODAncona/code2prompt-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server