MCP-powered development toolkit that gives AI full access to your codebase
CTX is a single ~20 MB binary with zero dependencies. No Node.js, no Python, no runtime β just download, connect to your MCP client, and start coding with AI.
Connect it to Claude Desktop, Cursor, Cline, or any MCP-compatible client β and your AI gets direct access to read, write, search, and modify files across your projects.
CTX is designed with Claude Desktop in mind and works best with it. Claude's deep understanding of code combined with CTX's filesystem tools, custom commands, and multi-project support creates a seamless development experience β like having a senior developer who knows your entire codebase sitting right next to you.
CTX provides a built-in MCP server with powerful filesystem tools:
- Read & write files β AI creates, modifies, and analyzes code directly
- Search across codebase β text and regex search with context lines
- PHP structure analysis β class hierarchy, interfaces, and dependencies at a glance
- Directory exploration β smart filtering by patterns, dates, sizes, and content
Define project-specific commands that AI can execute through MCP:
tools:
- id: run-tests
description: "Run project tests with coverage"
type: run
commands:
- cmd: vendor/bin/phpunit
args: [ "--coverage-html", "logs/coverage" ]
- id: deploy
description: "Deploy to staging"
type: run
schema:
type: object
properties:
branch:
type: string
default: "main"
commands:
- cmd: ./deploy.sh
args: [ "{{branch}}" ]Tests, migrations, linters, deployments β anything your terminal can run, AI can trigger.
Work across multiple microservices simultaneously. AI sees all your projects and can develop cross-cutting features:
projects:
- name: backend-api
path: ../backend
description: "REST API service"
- name: auth-service
path: ../auth
description: "Authentication microservice"
- name: shared-lib
path: ../packages/shared
description: "Shared domain models"Start a session, ask AI to list available projects, and develop features that span multiple services β all in one conversation.
Define exactly what context your AI needs. CTX collects code from files, git diffs, GitHub repos, URLs, and more β then structures it into clean markdown documents:
documents:
- description: User Authentication System
outputPath: auth.md
sources:
- type: file
sourcePaths: [ src/Auth ]
filePattern: "*.php"
- type: git_diff
commit: "last-week"Everything is configured through context.yaml with full JSON Schema support. Your AI assistant can generate and modify
these configs for you β just describe what you need.
ctx init # Generate initial config
ctx generate # Build context documents
ctx server # Start MCP serverLinux / WSL:
curl -sSL https://raw.githubusercontent.com/context-hub/generator/main/download-latest.sh | shWindows:
powershell -c "& ([ScriptBlock]::Create((irm 'https://raw.githubusercontent.com/context-hub/generator/main/download-latest.ps1'))) -AddToPath"The fastest way β auto-detect OS and configure your MCP client:
ctx mcp:configOr add manually to your MCP client config:
{
"mcpServers": {
"ctx": {
"command": "ctx",
"args": [
"server"
]
}
}
}For a specific project:
{
"mcpServers": {
"ctx": {
"command": "ctx",
"args": [
"server",
"-c",
"/path/to/project"
]
}
}
}That's it. Your AI assistant now has full access to your project through MCP.
If you also want to generate static context files for copy-paste workflows:
cd your-project
ctx init # Create context.yaml
ctx generate # Build markdown contextsCTX operates in two modes that complement each other:
MCP Server Mode β AI interacts with your codebase in real-time:
AI Assistant ββ CTX MCP Server ββ Your Project Files
β
Custom Tools (tests, deploy, lint...)
Multiple Projects
Context Documents
Context Generation Mode β build structured documents for any LLM:
context.yaml β Sources β Filters β Modifiers β Markdown Documents
Connect CTX to Claude Desktop or Cursor. Ask your AI to explore the codebase, understand architecture, write new features, run tests, and fix issues β all without leaving the conversation.
Working on a feature that touches multiple microservices? Register all projects, and AI can read code from one service, understand shared models, and implement changes across the entire stack.
Generate context documents with recent git diffs, relevant source files, and architecture overview. Share with reviewers or AI assistants for thorough, informed reviews.
New team member? Generate a comprehensive project overview β architecture, key interfaces, domain models β in seconds. AI can then answer questions about the codebase with full context.
Point CTX at your source code with modifiers like php-signature to extract API surfaces, then let AI generate
comprehensive documentation.
For complete documentation, including all features and configuration options:
What you'll find:
- π‘ Share and discover configurations and workflows
- π οΈ Get help with setup and advanced usage
- π Showcase your AI development workflows
- π’ First to know about new releases
This project is licensed under the MIT License.
