codetoprompt-mcp
An MCP server for the codetoprompt library, enabling integration with LLM agents.
Documentation
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-mcpThis 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 of `codetoprompt`'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.
Frequently asked questions
What is codetoprompt-mcp?
codetoprompt-mcp is An MCP server for the codetoprompt library, enabling integration with LLM agents.
How do I install codetoprompt-mcp?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is codetoprompt-mcp open source?
Yes โ it is hosted on GitHub at https://github.com/yash9439/codetoprompt-mcp and has 1 stars.
Related MCP tools
Fast and Accurate Code Search for Agents. Uses 99% fewer tokens than grep+read
Transparent and Efficient Financial Analysis
TradingView MCP server โ real-time market data, technical analysis, screeners & backtesting for Claude, ChatGPT, Cursor & any MCP client. Stocks, crypto, forex & futures across global exchanges. Hosted or self-host.
Open source AI clip generator: turns long videos into viral 9:16 shorts with AI moment detection, face tracking, subtitles and dubbing. Self-host free with Docker (MIT), or use the cloud with GPU speed from $12/mo. MCP server and API for AI agents.
Control Gmail, Google Calendar, Docs, Sheets, Slides, Chat, Forms, Tasks, Search & Drive with AI - Comprehensive Google Workspace MCP Server & CLI Tool
Cut AI token costs 95%+ on code exploration. The leading MCP server for precise, symbol-level GitHub code retrieval via tree-sitter AST. Works with Claude Code, Cursor & any MCP client. 313B+ tokens saved.
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP