Skip to main content
Glama

code2prompt-mcp

by ODAncona

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 build

It 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.main

License

MIT License - See LICENSE file for details.

Development

For testing, you can use the MCP Inspector:

npx @modelcontextprotocol/inspector python -m code2prompt_mcp.main
-
security - not tested
A
license - permissive license
-
quality - not tested

An MCP server that analyzes codebases and generates contextual prompts, making it easier for AI assistants to understand and work with code repositories.

  1. About
    1. Installation
      1. Usage
        1. License
          1. Development

            Related MCP Servers

            • A
              security
              F
              license
              A
              quality
              An MCP server that supercharges AI assistants with powerful tools for software development, enabling research, planning, code generation, and project scaffolding through natural language interaction.
              Last updated -
              11
              59
              TypeScript
              • Linux
              • Apple
            • -
              security
              A
              license
              -
              quality
              A Code Indexing MCP Server that connects AI coding assistants to external codebases, providing accurate and up-to-date code snippets to reduce mistakes and hallucinations.
              Last updated -
              68
              Python
              Apache 2.0
            • A
              security
              F
              license
              A
              quality
              An MCP server that allows coding agents to look up contextual rules and patterns on demand, providing just-in-time guidance for specific tasks like writing tests or authoring UI.
              Last updated -
              1
              9
              TypeScript
            • A
              security
              F
              license
              A
              quality
              A Model Context Protocol (MCP) server for advanced code analysis and editing with semantic search capabilities, enabling AI assistants to perform complex code operations through a standardized interface.
              Last updated -
              15
              Python

            View all related MCP servers

            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