Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/agentis-tools/ctx/servegit clone --depth 1 https://github.com/agentis-tools/ctxWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.01149 |
| Opus 5 | $0.00000 | $0.00575 |
| Sonnet 5 | $0.00000 | $0.00230 |
| Haiku 4.5 | $0.00000 | $0.00115 |
Grade A, and why
serve scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 191 lines — stays where its author put it; the contents beside it link to each section on GitHub.
ctx serve
Start ctx as an MCP (Model Context Protocol) server for AI assistant integration.
Synopsis
ctx serve --mcp
Description
The serve command runs ctx as an MCP server over stdio, enabling AI assistants like Claude to query your codebase through standardized tools. This provides:
- Real-time code intelligence - AI can search symbols, view definitions, analyze call graphs
- Context-aware assistance - AI understands your codebase structure
- Smart file selection - AI can request relevant files for tasks
Prerequisites
-
Index your codebase:
ctx index -
Generate embeddings (for smart context):
ctx embed -
Build ctx with MCP support:
cargo build --features mcp --release
Options
| Option | Description |
|---|---|
--mcp |
Run as MCP server over stdio |
Available MCP Tools
When running as an MCP server, ctx exposes these tools:
Search Tools
| Tool | Description |
|---|---|
search_symbols |
Search for symbols by name pattern |
get_definition |
Get source code for a symbol |
find_references |
Find all references to a symbol |
File Tools
| Tool | Description |
|---|---|
get_file |
Read a file's contents |
get_file_tree |
List files in the project |
Analysis Tools
| Tool | Description |
|---|---|
get_callers |
Find functions that call a function |
get_callees |
Find functions called by a function |
smart_context |
Intelligently select files for a task |
Claude Desktop Integration
Configuration
Add ctx to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"ctx": {
"command": "ctx",
"args": ["serve", "--mcp"],
"cwd": "/path/to/your/project"
}
}
}
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 191 lines · 0 tokens per session scan A 05083da974b4
serve is a command published in the GitHub repository agentis-tools/ctx (11 stars, last pushed 15d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,149 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
coograph-review
Review the changes in scope for spec compliance, convention violations, logic bugs, and architectural issues. You review — you do not author. Never edit files.
coograph-verify
Verify that the described work is complete and correct. Provide evidence for every claim. You verify — you do not implement or fix style.
api-gen
Generate REST API endpoints with routes, validation, error handling, and tests.
component-gen
Generate React or Vue components with prop types, styling, accessibility, and tests.
code-review
Review staged git changes for bugs, security issues, and style violations.
pr-description
Generate a PR title and description from the current branch diff against main.