trackmcp
Back to directory

CTX: a tool that solves the context management gap when working with LLMs like ChatGPT or Claude. It helps developers organize and automatically collect information from their codebase into structured documents that can be easily shared with AI assistants.

341 stars PHPOthers Updated Aug 31, 2026
contextinstructionsllmphpprompt-engineeringmcpmcp-servervibe-codinghacktoberfestcontext-aware-aicontext-engineeringcontext-extractormcp-serversmcp-tools

Documentation

CTX: Your AI Coding Companion

> MCP-powered development toolkit that gives AI full access to your codebase

Good morning, LLM

What is CTX?

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.

Table of Contents

Key Features

๐Ÿ›  MCP Server โ€” AI Develops Directly in Your Project

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

โšก Custom Tools โ€” Turn Any Command into an AI Tool

Define project-specific commands that AI can execute through MCP:

yaml
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.

๐Ÿ“ Multi-Project Development

Work across multiple microservices simultaneously. AI sees all your projects and can develop cross-cutting features:

yaml
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.

๐ŸŽฏ Smart Context Generation

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:

yaml
documents:
  - description: User Authentication System
    outputPath: auth.md
    sources:
      - type: file
        sourcePaths: [ src/Auth ]
        filePattern: "*.php"
      - type: git_diff
        commit: "last-week"

๐Ÿ“ Declarative Config with JSON Schema

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.

bash
ctx init    # Generate initial config
ctx generate  # Build context documents
ctx server  # Start MCP server

Quick Start

Install

Linux / WSL:

bash
curl -sSL https://raw.githubusercontent.com/context-hub/generator/main/download-latest.sh | sh

Windows:

bash
powershell -c "& ([ScriptBlock]::Create((irm 'https://raw.githubusercontent.com/context-hub/generator/main/download-latest.ps1'))) -AddToPath"

Connect to Claude Desktop (or Any MCP Client)

The fastest way โ€” auto-detect OS and configure your MCP client:

bash
ctx mcp:config

Or add manually to your MCP client config:

json
{
  "mcpServers": {
    "ctx": {
      "command": "ctx",
      "args": [
        "server"
      ]
    }
  }
}

For a specific project:

json
{
  "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.

Optional: Generate Context Documents

If you also want to generate static context files for copy-paste workflows:

bash
cd your-project
ctx init       # Create context.yaml
ctx generate   # Build markdown contexts

How It Works

CTX operates in two modes that complement each other:

MCP Server Mode โ€” AI interacts with your codebase in real-time:

code
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:

code
context.yaml โ†’ Sources โ†’ Filters โ†’ Modifiers โ†’ Markdown Documents

Use Cases

๐Ÿ”ง AI-Powered Development (MCP)

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.

๐Ÿ— Multi-Service Feature Development

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.

๐Ÿ“ Context for Code Review

Generate context documents with recent git diffs, relevant source files, and architecture overview. Share with reviewers

or AI assistants for thorough, informed reviews.

๐Ÿš€ Onboarding

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.

๐Ÿ“š Documentation Generation

Point CTX at your source code with modifiers like `php-signature` to extract API surfaces, then let AI generate

comprehensive documentation.

Full Documentation

For complete documentation, including all features and configuration options:

https://docs.ctxllm.com

Join Our Community

Join Discord

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

License

This project is licensed under the MIT License.

Frequently asked questions

What is generator?

generator is CTX: a tool that solves the context management gap when working with LLMs like ChatGPT or Claude. It helps developers organize and automatically collect information from their codebase into structured documents that can be easily shared with AI assistants.

How do I install generator?

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 generator open source?

Yes โ€” it is hosted on GitHub at https://github.com/context-hub/generator and has 341 stars.

Related MCP tools

metatool-aimetamcp

MCP Aggregator, Orchestrator, Middleware, Gateway in one docker

2,647 TypeScript
mcpmcp-servermcp-servers+12
metatool-aimetamcp

MCP Aggregator, Orchestrator, Middleware, Gateway in one docker TypeScript-based implementation. Trusted by 1400+ developers.

1,499 TypeScript
mcpmcp-gatewaymcp-host+12
bgauryyoctocode

Code research platform for AI agents; find, understand, and prove context across your code and all of GitHub, in a fraction of the tokens. One toolset, MCP or CLI

923 TypeScript
aiclaude-aicursor-ai+17
mcp-routermcp-router

A Unified MCP Server Management App TypeScript-based implementation. Trusted by 800+ developers. Trusted by 800+ developers.

846 TypeScript
llmllmopsmcp+7
riponcmprojectmem

Open-source coding agent memory. Records issues, attempts, fixes and decisions, then warns your agent before it repeats an approach that already failed. Native MCP server for Claude Code, Cursor, Antigravity and Codex. 100% local, no cloud, no telemetry. MIT.

796 Python
ai-agentsai-memoryai-tools+17
guangxiangdebiziFinanceMCP

่ฟ™ๆ˜ฏไธ€ไธช้‡‘่ž้ข†ๅŸŸ็›ธๅ…ณ็š„mcp,ๆœฌ้กน็›ฎ้€š่ฟ‡้›†ๆˆ Tushare API ๅ’Œ Binance API ไธบ่ฏญ่จ€ๆจกๅž‹๏ผˆๅฆ‚Claude๏ผ‰ๆไพ›ๅ…จ้ข็š„ๅฎžๆ—ถ้‡‘่žๆ•ฐๆฎ่ฎฟ้—ฎ่ƒฝๅŠ›๏ผŒๆ”ฏๆŒ่‚ก็ฅจใ€ๅŸบ้‡‘ใ€ๅ€บๅˆธใ€ๅฎ่ง‚็ปๆตŽๆŒ‡ๆ ‡ใ€็จณๅฎšๅธใ€่™šๆ‹Ÿ่ดงๅธ็ญ‰ๅคš็ปดๅบฆ้‡‘่žๆ•ฐๆฎๅˆ†ๆžใ€‚ๅ…ถไธญไนŸๅŒ…ๅซไบ†้‡‘่žๆ•ฐๆฎๆŸฅ่ฏขใ€่ดข็ปๆ–ฐ้—ปๆŸฅ่ฏขใ€ๅ›ฝๅฎถ็ปŸ่ฎกๅฑ€ๆ•ฐๆฎๆŸฅ่ฏข็ญ‰

661 TypeScript
datafinancellm+6

Run your own MCP server? See who uses it and what to fix.

Measure it with TrackMCP