Code2prompt MCP Server

A tool to convert code snippets into AI prompts for documentation or explanation purposes.

Local serverstdioPython

What is the Code2prompt MCP Server?

A tool to convert code snippets into AI prompts for documentation or explanation purposes.

What you get

Code2Prompt is a powerful command-line tool that generates comprehensive prompts from codebases, designed to streamline interactions between developers and Large Language Models (LLMs) for code analysis, documentation, and improvement tasks.

  • File Selection — Navigate through the directory structure and select files using keyboard controls
  • Visual Feedback — The interface provides visual cues to help you understand which files are selected or ignored

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

How to install the Code2prompt MCP Server

{
  "mcpServers": {
    "code2prompt": {
      "command": "uvx",
      "args": ["code2prompt"]
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Example prompts to try

  • “Use Code2prompt to Installation.”

Frequently asked questions

A tool to convert code snippets into AI prompts for documentation or explanation purposes. Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.