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.
相关服务器
Alpha Vantage MCP Server
赞助Access financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
Google Jules MCP
Automate Google Jules, the AI coding assistant, for tasks like code reviews, repository management, and AI-powered development workflows.
AbletonMCP
Control Ableton Live with AI prompts for music production, track creation, and session manipulation.
DevCycle
Turn your favourite AI tool into a feature management assistant. DevCycle's MCP works with your favourite coding assistant so you can create and monitor feature flags using natural language right in your workflow.
MockMCP
Create mock MCP servers instantly for developing and testing agentic AI workflows.
Dev.to MCP Server
An MCP server for the Dev.to API to search, browse, read, and create content on the platform.
MCP Project Setup
A starter project with setup instructions and example MCP servers, including a weather server.
Divvi MCP Server
Automatically integrate the Divvi referral SDK into JavaScript and TypeScript blockchain applications.
MCP Expr Lang
MCP Expr-Lang provides a seamless integration between Claude AI and the powerful expr-lang expression evaluation engine.
MCP Github OAuth
An MCP server with built-in GitHub OAuth support, deployable on Cloudflare Workers.
Docker
Run and manage docker containers, docker compose, and logs