CTX MCP
An MCP server in one binary: AI reads and edits files across several projects and runs your commands
- 341 ★ on the repository
- Last commit
- MIT
Broad access
Why this level
- The agent reads, writes and searches files in every project from the configuration
- Commands you describe run in the terminal with your user's rights: tests, migrations, deploys
Install
- Works in
Manual install
curl -sSL https://raw.githubusercontent.com/context-hub/generator/main/download-latest.sh | shFor Linux and WSL. On Windows run the download-latest.ps1 script in PowerShell with the AddToPath flag.
Access and checks
How we reviewBroad accessThe tool can change data, run commands or handle secrets.
- The agent reads, writes and searches files in every project from the configuration
- Commands you describe run in the terminal with your user's rights: tests, migrations, deploys
This is third-party code. Review the repository files before installing.
What it does
CTX is a binary of about 20 MB with no dependencies that works in two modes. The MCP server mode gives an agent file system tools: reading and writing files and searching by text and regular expressions with context lines. The agent can also inspect PHP class structure and walk directories with filters by pattern, date and size. In the `context.yaml` config you describe your own tools, and the agent calls them through MCP. A tool can be any terminal command: tests with coverage, migrations, linters, a deploy to staging with a parameter such as a branch. The same file lists several projects, so the agent works with the microservices of one product in a single conversation. The second mode builds context into markdown documents. Sources are described in the same file: directories by mask, a git diff over a period, GitHub repositories, URLs. The `ctx init` and `ctx generate` commands create the config and the documents you can attach to a ChatGPT or Claude chat. The schema is published as JSON Schema, so an agent can write and edit `context.yaml` itself.
Who it is for. For developers who keep several services in different folders and want to give Claude Desktop or Cursor access to code and their own commands through one server.
Good fit when
- An agent has to work with several repositories or microservices of one product at once
- Tests, migrations and a deploy to staging should be run by the agent through pre-described commands
- You need a document for a chat with the code of a given directory and last week's diff
- You do not want Node.js or Python just for an MCP server: one binary is enough
- You work with PHP and want to see class hierarchy and dependencies
Not a fit when
- An agent must not write to project files: the server can both write and run commands
- You need a repository packed into one file with token counts: Repomix does that
- You want a specialized MCP for a single service: CTX is general and works with local files
Example request
List the projects from the CTX configuration, find where backend-api calls the auth service and run run-testsMCP
- Transport
- stdio
- Authentication
- not required
Limitations
The install scripts target Linux, WSL and Windows. On Windows a PowerShell command with the AddToPath flag is used. The author notes that the server is designed around Claude Desktop and works best with it. Other MCP clients connect the same way.
Class structure analysis works for PHP only. Commands from `context.yaml` run with your user's rights, so the toolset should be described by hand and reviewed.
How to disable. Remove the ctx block from your MCP client configuration and restart the client. You can delete the binary and the `context.yaml` file by hand.
FAQ
How do I connect CTX to Claude Desktop?
Install the binary with the script from the repository and run `ctx mcp:config`: it detects your system and registers the server. By hand, add an entry to mcpServers with the `ctx` command and the `server` argument.
How do I point it at a specific project?
Add the `-c` flag with a path to the arguments: `ctx server -c /path/to/project`. The server then uses the configuration of that project.
Can I turn my own command into a tool for an agent?
Yes. In the tools section of `context.yaml` set an identifier, a description and a command with arguments. Parameters such as `{{branch}}` are described by a schema and filled in at call time.
How does generation mode differ from MCP mode?
Generation builds static markdown documents from directories, git diff, GitHub repositories and URLs with the `ctx generate` command. MCP mode lets an agent work with files in real time.
Do I need Node.js or Python?
No, the binary is self-contained and weighs about 20 MB.
Discussion
No questions or reviews yet.
Related
MCP serversA local MCP server that indexes your code so the agent pulls the functions it needs instead of rereading whole files
An MCP server that turns a large codebase into a semantic feature graph for precise navigation and meaning-based search
An MCP server on your machine that lets ChatGPT and Claude edit code, run tests and check Git in a local repository
Context Engine: code search and memory for an agent
Context Engine
A skill that teaches an agent to query the Context Engine code index and symbol graph before reading files directly
An MCP server that lets an agent read files, search code and run commands in a workspace
A CLI and MCP server that use set rules to pack only the project files a task needs for the model
Comparison with similar tools
Entries that share the main search query, and how they differ.
| Entry | Official | Authentication | Repository stars | Main difference |
|---|---|---|---|---|
| CTX (this entry) | no | not required | 341 | |
| Repomix | no | not required | 29,074 | packs a repository into one file with token counts, with no MCP mode for running commands |
| Code2Prompt | no | 7,743 | a CLI that packs code into a single prompt from a template |
README in short
The author calls CTX a toolkit for AI-assisted development and builds the text around context.yaml examples: projects, context sources and custom tools. Details live on a separate documentation site.