# Generator

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

- **Type:** MCP server
- **Install:** `agentstack add mcp-context-hub-generator`
- **Verified:** Pending review
- **Seller:** [context-hub](https://agentstack.voostack.com/s/context-hub)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [context-hub](https://github.com/context-hub)
- **Source:** https://github.com/context-hub/generator
- **Website:** https://docs.ctxllm.com

## Install

```sh
agentstack add mcp-context-hub-generator
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# CTX: Your AI Coding Companion

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

    
    
    
    
    
    
    

## 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](https://claude.ai/download), [Cursor](https://cursor.com),
[Cline](https://github.com/cline/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](#key-features)
- [Quick Start](#quick-start)
- [How It Works](#how-it-works)
- [Use Cases](#use-cases)
- [Full Documentation](https://docs.ctxllm.com)
- [License](#license)

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

```
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
```

## 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

[](https://discord.gg/YmFckwVkQM)

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

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [context-hub](https://github.com/context-hub)
- **Source:** [context-hub/generator](https://github.com/context-hub/generator)
- **License:** MIT
- **Homepage:** https://docs.ctxllm.com

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** yes
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: flagged — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-context-hub-generator
- Seller: https://agentstack.voostack.com/s/context-hub
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
