home / mcp / generator mcp server
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.
Configuration
View docs{
"mcpServers": {
"context-hub-generator": {
"command": "ctx",
"args": [
"server"
]
}
}
}CTX is a compact MCP server that gives an AI direct access to your codebase, enabling reading, writing, searching, and transforming files across multiple projects through a local MCP client. It offers a zero-dependency binary approach that starts quickly and lets you leverage AI-powered development workflows inside your existing environment.
You connect CTX to your MCP client, such as Claude Desktop or Cursor, to start AI-assisted development directly in your projects. Start a session by launching the MCP server and then interact with your codebase through natural conversations. The AI can read files, propose changes, run project tooling, and navigate multiple repositories from a single chat.
To begin, start CTX as an MCP server and point your client to it. You can operate across several projects at once, with the AI able to reference files across services and create cross-cutting changes.
Connect CTX to Claude Desktop (or any MCP client) using the auto-configuration flow or by manually adding an MCP server entry. The recommended approach is to run the auto-config command to detect your environment, then verify the connection in your client.
When you want to enable a specific project or path, you can provide a working directory filter or start a session that references a project path. This allows the AI to focus on a subset of your workspace while still maintaining cross-project capabilities.
CTX is delivered as a single binary with no runtime dependencies. Install it by downloading the appropriate installer script for your environment and then starting the MCP server.
# Linux / WSL
curl -sSL https://raw.githubusercontent.com/context-hub/generator/main/download-latest.sh | sh
# Windows
powershell -c "& ([ScriptBlock]::Create((irm 'https://raw.githubusercontent.com/context-hub/generator/main/download-latest.ps1'))) -AddToPath"You can configure your MCP client to connect to CTX in two ways: auto-detect the MCP client setup or provide a manual configuration that points to CTX as the MCP server.
Option 1 - Auto-config: use the built-in command to configure your MCP client for CTX automatically.
Option 2 - Manual configuration: add an MCP server entry that points to the CTX command and the server start mode.
Automatic configuration command (example):
ctx mcp:configManual JSON configuration example for your MCP client (CTX runs the server command):
{
"mcpServers": {
"ctx": {
"command": "ctx",
"args": [
"server"
]
}
}
}CTX includes a built-in MCP server with filesystem tools and supports custom tools that map terminal commands into AI actions. You can define tools to run tests, perform deployments, or execute linters across your projects.
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}}" ]CTX supports multiple projects. You can register all relevant projects and ask your AI to develop features that span services, while still maintaining separate project directories.
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"CTX can generate structured context documents that summarize code, diffs, and architecture for larger language models or for offline review.
documents:
- description: User Authentication System
outputPath: auth.md
sources:
- type: file
sourcePaths: [ src/Auth ]
filePattern: "*.php"
- type: git_diff
commit: "last-week"If you want to generate static context files for copy-paste workflows, you can initialize CTX and build context documents locally.
cd your-project
ctx init # Create context.yaml
ctx generate # Build markdown contextsCTX is designed to work best with Claude Desktop and provides a seamless development experience, but it can connect to any MCP-compatible client.
Run project tests with coverage using configured test commands
Deploy to a specified environment by invoking your deployment script or commands