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
Rakit UI AI
An intelligent tool for AI assistants to present multiple UI component designs for user selection.
Projet MCP Server-Client
An implementation of the Model Context Protocol (MCP) for communication between AI models and external tools, featuring server and client examples in Python and Spring Boot.
JavaScript Executor MCP Server
Execute JavaScript code in a modern runtime environment with support for various built-in modules.
shadow-cljs
Monitors shadow-cljs builds and provides real-time build status updates.
MCP OpenAPI Connector
Connect to any OpenAPI-based API with built-in OAuth2 authentication management.
Fluent (ServiceNow SDK)
Manage ServiceNow metadata, modules, records, and tests using Fluent, a TypeScript-based declarative DSL. Supports all ServiceNow SDK CLI commands.
YetiBrowser MCP
YetiBrowser MCP is a fully open-source solution to allow AI assistants to easily interact with your existing browser
MCP Inspector
A developer tool for testing and debugging MCP servers with a web UI and proxy.
microCMS
Manage content on the microCMS headless CMS using its content and management APIs.
Background Process MCP
A server that provides background process management capabilities, enabling LLMs to start, stop, and monitor long-running command-line processes.