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
SMART-E2B
Integrates E2B for secure code execution in cloud sandboxes, designed for Claude AI Desktop.
Claude Code MCP
Orchestrates multiple Claude Code agents across iTerm2 sessions, providing centralized management and inter-agent communication.
API Tester
This MCP Server accepts swagger/postman documents as input. It then generates API & Load test scenarios, executes the tests and generates the execution report.
QuickChart Server
Generate chart images and URLs using the QuickChart.io API with Chart.js configurations.
Testomat.io
Integrate Testomat.io API with AI assistants for test management.
mcp-nodejs
A Node.js MCP server example for the OpenWeather API, requiring an API key.
Qase
Interact with the Qase API for test management. Requires a QASE_API_TOKEN for authentication.
DeepView MCP
Enables IDEs like Cursor and Windsurf to analyze large codebases using Gemini's 1M context window.
Postman MCP Server
Interact with the Postman API via an MCP server. Requires a Postman API key.
Osquery MCP Server
An MCP server for Osquery that allows AI assistants to answer system diagnostic questions using natural language.