{"id":"78ca1b44-dc37-48bd-9e4e-8e1e6c4b8a1f","slug":"generator","kind":"mcp","name":"generator","summary":"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","owner":"context-hub","repoUrl":"https://github.com/context-hub/generator","license":"MIT","licenseTier":"permissive","trust":"community","stars":344,"match":null,"fewStars":false,"format":"mcp","createdAt":"2025-03-08T08:37:28.000Z","addedAt":"2026-10-14T03:43:05.315Z","logoUrl":"https://avatars.githubusercontent.com/u/202540066?v=4","linkOnly":false,"collection":null,"skillPath":null,"categories":["memory-knowledge","cloud-infra"],"tags":["context","instructions","llm","php","prompt-engineering","vibe-coding","hacktoberfest","context-aware-ai"],"runtime":"binary","local":true,"cloudCapable":false,"cloudCapability":"unknown","cloudReadyOnPlatform":false,"needsApiKey":false,"reviewed":false,"syncedAt":"2026-10-15T02:50:31.551Z","sample":false,"url":"https://conduits.dev/tools/generator","language":"PHP","transports":["stdio"],"install":{},"requirements":{"env":[],"upstreamMayCharge":false},"tools":null,"readme":"# CTX: Your AI Coding Companion\n\n> MCP-powered development toolkit that gives AI full access to your codebase\n\n<p>\n    <a href=\"https://docs.ctxllm.com\"><img alt=\"Docs\" src=\"https://img.shields.io/badge/docs-green?style=for-the-badge\"></a>\n    <a href=\"https://raw.githubusercontent.com/context-hub/generator/refs/heads/main/json-schema.json\"><img alt=\"Json schema\" src=\"https://img.shields.io/badge/json_schema-blue?style=for-the-badge\"></a>\n    <a href=\"https://discord.gg/YmFckwVkQM\"><img src=\"https://img.shields.io/badge/discord-chat-magenta.svg?style=for-the-badge\"></a>\n    <a href=\"https://github.com/context-hub/generator/releases/latest\"><img src=\"https://img.shields.io/github/downloads/context-hub/generator/total?style=for-the-badge\"></a>\n    <a href=\"https://t.me/spiralphp/2504\"><img alt=\"Telegram\" src=\"https://img.shields.io/badge/telegram-blue.svg?style=for-the-badge&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53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xzdG9wIHN0b3AtY29sb3I9IiMyQUFCRUUiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiMyMjlFRDkiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48L3N2Zz4K\"></a>\n    <a href=\"https://github.com/context-hub/generator/actions/workflows/testing.yml\"><img src=\"https://img.shields.io/github/actions/workflow/status/context-hub/generator/testing.yml?style=for-the-badge&label=Tests\"></a>\n    <a href=\"https://zread.ai/context-hub/generator\" target=\"_blank\"><img src=\"https://img.shields.io/badge/Ask_Zread-_.svg?style=for-the-badge&color=00b0aa&labelColor=000000&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTQuOTYxNTYgMS42MDAxSDIuMjQxNTZDMS44ODgxIDEuNjAwMSAxLjYwMTU2IDEuODg2NjQgMS42MDE1NiAyLjI0MDFWNC45NjAxQzEuNjAxNTYgNS4zMTM1NiAxLjg4ODEgNS42MDAxIDIuMjQxNTYgNS42MDAxSDQuOTYxNTZDNS4zMTUwMiA1LjYwMDEgNS42MDE1NiA1LjMxMzU2IDUuNjAxNTYgNC45NjAxVjIuMjQwMUM1LjYwMTU2IDEuODg2NjQgNS4zMTUwMiAxLjYwMDEgNC45NjE1NiAxLjYwMDFaIiBmaWxsPSIjZmZmIi8%2BCjxwYXRoIGQ9Ik00Ljk2MTU2IDEwLjM5OTlIMi4yNDE1NkMxLjg4ODEgMTAuMzk5OSAxLjYwMTU2IDEwLjY4NjQgMS42MDE1NiAxMS4wMzk5VjEzLjc1OTlDMS42MDE1NiAxNC4xMTM0IDEuODg4MSAxNC4zOTk5IDIuMjQxNTYgMTQuMzk5OUg0Ljk2MTU2QzUuMzE1MDIgMTQuMzk5OSA1LjYwMTU2IDE0LjExMzQgNS42MDE1NiAxMy43NTk5VjExLjAzOTlDNS42MDE1NiAxMC42ODY0IDUuMzE1MDIgMTAuMzk5OSA0Ljk2MTU2IDEwLjM5OTlaIiBmaWxsPSIjZmZmIi8%2BCjxwYXRoIGQ9Ik0xMy43NTg0IDEuNjAwMUgxMS4wMzg0QzEwLjY4NSAxLjYwMDEgMTAuMzk4NCAxLjg4NjY0IDEwLjM5ODQgMi4yNDAxVjQuOTYwMUMxMC4zOTg0IDUuMzEzNTYgMTAuNjg1IDUuNjAwMSAxMS4wMzg0IDUuNjAwMUgxMy43NTg0QzE0LjExMTkgNS42MDAxIDE0LjM5ODQgNS4zMTM1NiAxNC4zOTg0IDQuOTYwMVYyLjI0MDFDMTQuMzk4NCAxLjg4NjY0IDE0LjExMTkgMS42MDAxIDEzLjc1ODQgMS42MDAxWiIgZmlsbD0iI2ZmZiIvPgo8cGF0aCBkPSJNNCAxMkwxMiA0TDQgMTJaIiBmaWxsPSIjZmZmIi8%2BCjxwYXRoIGQ9Ik00IDEyTDEyIDQiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPgo8L3N2Zz4K&logoColor=ffffff\" alt=\"zread\"/></a>\n</p>\n\n![Good morning, LLM](https://github.com/user-attachments/assets/8129f227-dc3f-4671-bc0e-0ecd2f3a1888)\n\n## What is CTX?\n\n**CTX** is a single ~20 MB binary with zero dependencies. No Node.js, no Python, no runtime — just download, connect\nto your MCP client, and start coding with AI.\n\nConnect it to [Claude Desktop](https://claude.ai/download), [Cursor](https://cursor.com),\n[Cline](https://github.com/cline/cline), or any MCP-compatible client — and your AI gets direct access to read, write,\nsearch, and modify files across your projects.\n\nCTX is designed with **Claude Desktop** in mind and works best with it. Claude's deep understanding of code combined\nwith CTX's filesystem tools, custom commands, and multi-project support creates a seamless development experience —\nlike having a senior developer who knows your entire codebase sitting right next to you.\n\n## Table of Contents\n\n- [Key Features](#key-features)\n- [Quick Start](#quick-start)\n- [How It Works](#how-it-works)\n- [Use Cases](#use-cases)\n- [Full Documentation](https://docs.ctxllm.com)\n- [License](#license)\n\n## Key Features\n\n### 🛠 MCP Server — AI Develops Directly in Your Project\n\nCTX provides a built-in MCP server with powerful filesystem tools:\n\n- **Read & write files** — AI creates, modifies, and analyzes code directly\n- **Search across codebase** — text and regex search with context lines\n- **PHP structure analysis** — class hierarchy, interfaces, and dependencies at a glance\n- **Directory exploration** — smart filtering by patterns, dates, sizes, and content\n\n### ⚡ Custom Tools — Turn Any Command into an AI Tool\n\nDefine project-specific commands that AI can execute through MCP:\n\n```yaml\ntools:\n  - id: run-tests\n    description: \"Run project tests with coverage\"\n    type: run\n    commands:\n      - cmd: vendor/bin/phpunit\n        args: [ \"--coverage-html\", \"logs/coverage\" ]\n\n  - id: deploy\n    description: \"Deploy to staging\"\n    type: run\n    schema:\n      type: object\n      properties:\n        branch:\n          type: string\n          default: \"main\"\n    commands:\n      - cmd: ./deploy.sh\n        args: [ \"{{branch}}\" ]\n```\n\nTests, migrations, linters, deployments — anything your terminal can run, AI can trigger.\n\n### 📁 Multi-Project Development\n\nWork across multiple microservices simultaneously. AI sees all your projects and can develop cross-cutting features:\n\n```yaml\nprojects:\n  - name: backend-api\n    path: ../backend\n    description: \"REST API service\"\n\n  - name: auth-service\n    path: ../auth\n    description: \"Authentication microservice\"\n\n  - name: shared-lib\n    path: ../packages/shared\n    description: \"Shared domain models\"\n```\n\nStart a session, ask AI to list available projects, and develop features that span multiple services — all in one\nconversation.\n\n### 🎯 Smart Context Generation\n\nDefine exactly what context your AI needs. CTX collects code from files, git diffs, GitHub repos, URLs, and more — then\nstructures it into clean markdown documents:\n\n```yaml\ndocuments:\n  - description: User Authentication System\n    outputPath: auth.md\n    sources:\n      - type: file\n        sourcePaths: [ src/Auth ]\n        filePattern: \"*.php\"\n      - type: git_diff\n        commit: \"last-week\"\n```\n\n### 📐 Declarative Config with JSON Schema\n\nEverything is configured through `context.yaml` with full JSON Schema support. Your AI assistant can generate and modify\nthese configs for you — just describe what you need.\n\n```bash\nctx init    # Generate initial config\nctx generate  # Build context documents\nctx server  # Start MCP server\n```\n\n## Quick Start\n\n### Install\n\n**Linux / WSL:**\n\n```bash\ncurl -sSL https://raw.githubusercontent.com/context-hub/generator/main/download-latest.sh | sh\n```\n\n**Windows:**\n\n```bash\npowershell -c \"& ([ScriptBlock]::Create((irm 'https://raw.githubusercontent.com/context-hub/generator/main/download-latest.ps1'))) -AddToPath\"\n```\n\n### Connect to Claude Desktop (or Any MCP Client)\n\nThe fastest way — auto-detect OS and configure your MCP client:\n\n```bash\nctx mcp:config\n```\n\nOr add manually to your MCP client config:\n\n```json\n{\n  \"mcpServers\": {\n    \"ctx\": {\n      \"command\": \"ctx\",\n      \"args\": [\n        \"server\"\n      ]\n    }\n  }\n}\n```\n\nFor a specific project:\n\n```json\n{\n  \"mcpServers\": {\n    \"ctx\": {\n      \"command\": \"ctx\",\n      \"args\": [\n        \"server\",\n        \"-c\",\n        \"/path/to/project\"\n      ]\n    }\n  }\n}\n```\n\nThat's it. Your AI assistant now has full access to your project through MCP.\n\n### Optional: Generate Context Documents\n\nIf you also want to generate static context files for copy-paste workflows:\n\n```bash\ncd your-project\nctx init       # Create context.yaml\nctx generate   # Build markdown contexts\n```\n\n## How It Works\n\nCTX operates in two modes that complement each other:\n\n**MCP Server Mode** — AI interacts with your codebase in real-time:\n\n```\nAI Assistant ←→ CTX MCP Server ←→ Your Project Files\n                     ↕\n              Custom Tools (tests, deploy, lint...)\n              Multiple Projects\n              Context Documents\n```\n\n**Context Generation Mode** — build structured documents for any LLM:\n\n```\ncontext.yaml → Sources → Filters → Modifiers → Markdown Documents\n```\n\n## Use Cases\n\n### 🔧 AI-Powered Development (MCP)\n\nConnect CTX to Claude Desktop or Cursor. Ask your AI to explore the codebase, understand architecture, write new\nfeatures, run tests, and fix issues — all without leaving the conversation.\n\n### 🏗 Multi-Service Feature Development\n\nWorking on a feature that touches multiple microservices? Register all projects, and AI can read code from one service,\nunderstand shared models, and implement changes across the entire stack.\n\n### 📝 Context for Code Review\n\nGenerate context documents with recent git diffs, relevant source files, and architecture overview. Share with reviewers\nor AI assistants for thorough, informed reviews.\n\n### 🚀 Onboarding\n\nNew team member? Generate a comprehensive project overview — architecture, key interfaces, domain models — in seconds.\nAI can then answer questions about the codebase with full context.\n\n### 📚 Documentation Generation\n\nPoint CTX at your source code with modifiers like `php-signature` to extract API surfaces, then let AI generate\ncomprehensive documentation.\n\n## Full Documentation\n\nFor complete documentation, including all features and configuration options:\n\nhttps://docs.ctxllm.com\n\n## Join Our Community\n\n[![Join Discord](https://img.shields.io/discord/1419284404315881633?color=5865F2&label=Join%20Discord&logo=discord&logoColor=white&style=for-the-badge)](https://discord.gg/YmFckwVkQM)\n\n**What you'll find:**\n\n- 💡 Share and discover configurations and workflows\n- 🛠️ Get help with setup and advanced usage\n- 🚀 Showcase your AI development workflows\n- 📢 First to know about new releases\n\n---\n\n### License\n\nThis project is licensed under the MIT License.\n"}