CodeToPrompt

Exposes codetoprompt MCP features to generate prompts, analyze codebases, and retrieve file contents for MCP clients.
  • python

1

GitHub Stars

python

Language

5 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "yash9439-codetoprompt-mcp": {
      "command": "ctp-mcp",
      "args": []
    }
  }
}

CodeToPrompt MCP Server makes the codetoprompt library available through the Model Context Protocol, enabling MCP-compatible clients to generate prompts, analyze codebases, and fetch file contents programmatically. This server is useful when you want automated, prompt-focused tooling integrated with your LLM workflows.

How to use

To use this server with an MCP client, configure the client to connect to the server through the provided command entry. Once connected, you can invoke the available tools to generate prompts from directories, analyze a codebase for statistics, or retrieve the contents of specific files as prompts.

How to install

Prerequisites: ensure you have Python 3.8+ and pip installed on your system.

Install the MCP server package from PyPI.

pip install codetoprompt-mcp

Configuration and usage notes

The server is exposed via a local stdio entry that you run from the command line. You can connect an MCP client to this server by referencing the provided command name when configuring the client.

Example configuration for an MCP client (STDIO) uses the following command and leaves the arguments empty to start listening for MCP interactions.

ctp-mcp

Troubleshooting and notes

If you encounter issues starting the server, verify Python and pip are properly installed, then reinstall the package and try again. Ensure the environment can locate the ctp-mcp executable in your system PATH.

Available tools

ctp-get-context

Generates a comprehensive prompt from a directory, applying 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 for targeted queries.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational