Skip to main content
Glama

Overview

CCTX-MCP — Code ConTeXt via Model Context Protocol. An MCP server that gives AI agents a structured view of source code without reading entire files.

Built for Claude, Cursor, OpenCode, and any MCP-compatible AI coding tool.


Related MCP server: token-pilot

Quick Start

uvx cctx-mcp

Add to your MCP client config:

{
  "mcpServers": {
    "cctx-mcp": {
      "command": "uvx",
      "args": ["cctx-mcp"]
    }
  }
}

Tools

Code Analysis

Tool

Returns

Replaces

Savings

smart_read

symbol hierarchy, deps, docs, line counts

cat + manual parsing

~87%

find_symbols

symbol locations by name or type

grep -r + file reads

~99%

get_dependencies

all imports of a file in one shot

grep ^import

~96%

trace_calls

every call site with file + line

grep across repo

~90%

analyze_project

language breakdown, file counts, tree

find + wc

~98%

get_symbol_summaries

AI semantic descriptions per symbol

reading implementation

~85%

Git & Commits

Tool

Returns

Replaces

Savings

compact_change_intelligence

structured git diff with intent cues

git diff + git status

~75%

draft_commit

AI-generated conventional commit message

writing from scratch

~90%

approve_commit_draft

executes the commit after review

git add + git commit

Observability

get_config · get_health · get_version


Token Savings

Operation

Native

With CCTX-MCP

Savings

Read 500-line file

~1,500 tokens

~200 tokens

87%

Find function across project

~5,000 tokens

~50 tokens

99%

Understand imports

~800 tokens

~30 tokens

96%

Analyze project structure

~10,000 tokens

~150 tokens

98%

Git change summary

~3,000 tokens

~750 tokens

75%

Typical session: 80%+ aggregate savings.


Supported Languages

Powered by tree-sitter AST — each language has a dedicated parser.


Install

{
  "mcpServers": {
    "cctx-mcp": {
      "command": "uvx",
      "args": ["cctx-mcp"]
    }
  }
}

pip

pip install cctx-mcp
{
  "mcpServers": {
    "cctx-mcp": {
      "command": "python",
      "args": ["-m", "code_context.server"]
    }
  }
}

source

git clone https://github.com/nikondrat/cctx-mcp.git
cd cctx-mcp
uv sync
uv run python -m code_context.server --skip-index

Configuration

Variable

Default

Description

CC_OLLAMA_URL

http://localhost:11434

Ollama server address

CC_OPENROUTER_API_KEY

Remote inference key

CC_LLM_ROUTER

local-first

local-first, local-only, remote-first, remote-only

CC_COMMIT_MODEL

gemma4:latest

Local model for commit drafting

CC_EMBED_MODEL

nomic-embed-text

Local model for embeddings

CC_SEMANTIC_SUMMARIES

1

Enable AI symbol summaries


Development

uv sync
uv run pytest tests/ -v

Debug Logging

Tool calls are logged to ~/.code-context-cache/debug.jsonl with args, result preview, latency, and status:

tail -f ~/.code-context-cache/debug.jsonl

Set CC_DEBUG_LOG env var to change the log path.

PRs welcome. Open issues.


License

MIT — free for any use.

A
license - permissive license
-
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nikondrat/cctx-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server