CodeToPrompt MCP Server
An MCP server for the codetoprompt library, enabling integration with LLM agents.
CodeToPrompt MCP Server
CodeToPrompt MCP Server exposes the powerful features of the codetoprompt library through the Model Context Protocol (MCP). This allows LLM agents and other MCP-compatible clients to programmatically generate prompts, analyze codebases, and retrieve specific file contents.
🔧 Installation
Install from PyPI:
pip install codetoprompt-mcp
This will automatically install codetoprompt and the required mcp library.
🚀 Usage with an MCP Client
This server is designed to be used with an MCP client, such as the Claude Desktop App.
Example: Claude Desktop Configuration
To use this server with Claude, add it to your claude_desktop_config.json file:
{
"mcpServers": {
"CodeToPrompt": {
"command": "ctp-mcp"
}
}
}
Once configured, you can invoke the tools from your conversation with the LLM.
Available Tools
ctp-get-context: The primary tool for generating a comprehensive prompt from a directory. It supports all ofcodetoprompt's filtering, formatting, and compression options.ctp-analyse-project: Provides a detailed statistical analysis of a codebase, including token counts, line counts, and breakdowns by file type.ctp-get-files: Retrieves the content of specific files, formatted as a prompt. This is useful for targeted queries.
🤝 Contributing
We welcome contributions! Please refer to the main codetoprompt repository for contribution guidelines.
📄 License
This project is licensed under the MIT License. See the LICENSE file for full details.
Related Servers
Alpha Vantage MCP Server
sponsorAccess financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
Osquery MCP Server
An MCP server for Osquery that allows AI assistants to answer system diagnostic questions using natural language.
Criage MCP Server
An MCP server for the Criage package manager, providing full client functionality via the MCP protocol.
Tencent Cloud Code Analysis
An official MCP server for Tencent Cloud Code Analysis (TCA) to quickly start code analysis and obtain reports.
ThousandEyes MCP Server
ThousandEyes Network Performance Monitoring MCP Server
Markdown Sidecar MCP Server
An MCP server to access markdown documentation for locally installed NPM, Go, and PyPi packages.
Neovim LSP MCP Server
Bridges AI coding assistants with Neovim's Language Server Protocol for AI-powered code intelligence and navigation.
Notifly MCP Server
Notifly MCP Server - enabling AI agents to provide real-time, trusted Notifly documentation and SDK code examples for seamless integrations.
Cargo MCP
Interact with Rust projects using Cargo commands like build, test, and run.
Enoch
MCP server for the Enoch control plane: dispatch gates, evidence sync, provenance, and quality gates for long-running autonomous AI work.
lit-forge-mcp
10 zero-auth developer utilities (JSON, regex, JWT, base64, hash, UUID, timestamp, YAML/JSON, cron) exposed as MCP tools,companion to lit-forge.com.