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
Scout Monitoring MCP
sponsorPut performance and error data directly in the hands of your AI assistant.
Alpha Vantage MCP Server
sponsorAccess financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
QR for Agent
Dynamic QR code MCP server for AI agents β create, update, track QR codes
Image Generation MCP Server
An MCP server for generating images using the Replicate API and the Flux model.
Figma Copilot
Enables AI assistants to interact with and automate Figma designs programmatically.
Quantum Code Validator
A server for validating quantum computing library code, with support for PennyLane.
Untun
Create secure tunnels to expose local servers to the internet using untun.
ArchiveNet
A context insertion and search server for Claude Desktop and Cursor IDE, using configurable API endpoints.
MCP Storybook Image Generator
Generate storybook images for children's stories using Google's Gemini AI.
Prompt Registry
A lightweight, file-based server for managing and serving prompts via stdio.
Unified.to MCP Server
Unified MCP Server is a remote MCP connector for AI agents and vertical AI products that provides access to 22,000+ authorized SaaS tools across 400+ integrations and 24 categories directly inside LLMs.
MCPβStack
A Docker Compose-based collection of MCP servers for LLM workflows, featuring centralized configuration and management scripts.