- Home
- MCP servers
- Generator
Generator
- php
307
GitHub Stars
php
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
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.
How to use
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.
How to install
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"
Connecting to an MCP client
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:config
Manual JSON configuration example for your MCP client (CTX runs the server command):
{
"mcpServers": {
"ctx": {
"command": "ctx",
"args": [
"server"
]
}
}
}
Examples of multi-project and tooling usage
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}}" ]
Session and project scoping
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"
Context generation and documentation
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"
Next steps
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 contexts
Notes on usage with MCP clients
CTX is designed to work best with Claude Desktop and provides a seamless development experience, but it can connect to any MCP-compatible client.
Available tools
run-tests
Run project tests with coverage using configured test commands
deploy
Deploy to a specified environment by invoking your deployment script or commands