Skip to main content
Glama

ContextPro

npm version CI License: MIT

Exact find-all-references for your coding agent on TypeScript/JavaScript repos — answered by the TypeScript compiler, not grep.

ContextPro is a local MCP server for agents such as Claude Code, Codex, Cursor and OpenCode. Its compiler-backed "find all references" means a rename or refactor is far less likely to miss callers that import the function under another name or through a re-export (within the files the compiler can check). It also serves source reads with a size limit, so the agent gets the lines it needs instead of whole files. It runs on your machine and needs no API key.

Quick start

Requirements: Node.js 20–26 (24 LTS recommended). No API key or Ollama needed. For compiler references, install the target project's dependencies first (npm install); otherwise files can't be checked.

Fastest try (Claude Code):

cd your-project
claude mcp add contextpro -e CONTEXTPRO_TOOL_PROFILE=lean -- npx -y contextpro-mcp
claude mcp list   # contextpro: ... ✔ Connected

Keep the server name before -e, which would otherwise swallow it.

Claude Code, whole team (commits .mcp.json plus agent instructions in AGENTS.md and CLAUDE.md):

npx -y contextpro-mcp init claude
claude   # start it in the repository root and approve "contextpro" once

Codex:

codex mcp add contextpro --env CONTEXTPRO_TOOL_PROFILE=lean -- npx -y contextpro-mcp

Codex starts the server in the folder where you start codex, so start it in your project.

Cursor: run npx -y contextpro-mcp init cursor in your project. It writes .cursor/mcp.json with the workspace folder as the root.

Other clients that read mcpServers JSON (in the project's own config file):

{ "mcpServers": { "contextpro": {
    "command": "npx",
    "args": ["-y", "contextpro-mcp"],
    "env": { "CONTEXTPRO_TOOL_PROFILE": "lean" } } } }

Never put a fixed --root in a global config: every project would then use that one repository.

OpenCode: run npx -y contextpro-mcp init opencode, then opencode mcp list.

Try it. Ask your agent:

  • "Use contextpro to find every caller of <function> in <file>."

  • "Use contextpro to show me how <feature> works."

INSTALL.md covers VS Code, team approval, a smoke test that works without any client, running from source and troubleshooting.

Related MCP server: Integra CodeMemory

What it is good at

  • Safe renames and refactors. The compiler tells apart aliased imports, re-exports and different functions that share a name, and the answer says how many results exist and whether any were cut off.

  • Reading just enough source. The agent asks for a file, a symbol or a line range under a size budget and is told what was left out.

  • Several agents on one repository. Each Git worktree gets its own index, kept up to date as files change.

  • A small tool list. The recommended lean setup shows the agent three tools (context, exact_references and discover_tools); the other 65 stay hidden until the agent asks for them.

Python references work through a configured Pyright; other languages fall back to structural and text search.

Honest results

ContextPro has not been shown to make agents finish tasks faster. Our own trials, published in docs/benchmarks, include the losses.

It is worth trying for renames and refactors where aliased or re-exported callers matter, or when you don't know where the code lives.

Measured

Result

Compiler reference checks on two fixtures (barrel aliases, same-named bindings)

24 of 24 timed queries passed

Response size on six retrieval tasks vs a scripted rg/git baseline

about 41% fewer response tokens, but about 6.8× slower per call

Matched agent trials (2 read-only tasks), lean profile vs native tools

23.8% more total input, 19.2% more wall time

Matched agent trials (2 read-only tasks), workflow profile vs native tools

128.7% more total input

For simple lookups, plain grep is cheaper. We welcome reproducible comparisons, including ones where another tool wins; see how we compare.

Learn more

License and origins

ContextPro began as a fork of Context+ by ForLoop and has since been largely rewritten. It is distributed under the MIT license; the original ForLoop copyright notice is preserved, see NOTICE.

Available Tools

14 tools
artifact_readA
Read-onlyIdempotent

Load a previously generated context artifact by ID so agents can reuse earlier task packets, repo maps, and decisions without regenerating them.

Inputs: artifact_id (required), root.

blast_radiusA
Read-onlyIdempotent

Find textual usage candidates with counts by kind. Use kind:call for call-containing lines. Includes same-name symbols; use exact_references for binding-resolved TS/JS rename checks.

Inputs: symbol_name (required), kind, mode, root, +1 more.

discover_toolsB

Discover or enable experts and return their schemas. If the client cannot refresh its catalog, call runs a supported read/index tool; never source edits.

Inputs: call, root, limit, query, +1 more.

efficiency_reportB
Read-onlyIdempotent

Report ContextPro's persistent, auditable context-compression estimates by tool. History stores numeric metrics only—never prompts, source code, response bodies, or file paths. Token savings are estimates, not billing data.

Inputs: root, scope, format, history_limit, +2 more.

exact_referencesA
Read-onlyIdempotent

Find who calls or references a symbol. TS/JS compiler bindings exclude same-named unrelated symbols; results label calls/imports and give per-file call totals before limits. Check scope, ambiguity and warnings. Python is heuristic; imported SCIP freshness is unverified.

Inputs: symbol_name (required), file, line, root, +2 more.

explainA
Read-onlyIdempotent

Extract a specific function/class body with its dependencies, without reading the entire file. Provide symbol name to get its code + called functions. Provide file path for a structural overview.

Inputs: file, root, depth, format, +3 more.

grepA
Read-onlyIdempotent

Fast literal or regex string search across the project's indexed file set. Use this for log-message lookups, config-key searches, error-message tracing, or any time you know the exact characters you want to find. Use 'search' instead for semantic intent queries. Skips binary files; respects .gitignore via the indexed walker.

Inputs: pattern (required), glob, root, regex, +7 more.

memory_record_taskB

Persist useful task outcomes with linked files, assumptions, evidence, and open risks for future sessions.

Inputs: task (required), summary (required), root, files, +7 more.

reindexA

Re-walk, re-parse, and re-index project files into the database. Detects changed files via content hash and only re-processes what changed. Eagerly populates file and identifier embeddings unless no_embed=true or CONTEXTPRO_REINDEX_NO_EMBED is set. Use after git pull, branch switch, or external edits. Builds the import graph for related/test_map tools.

Inputs: root, force, no_embed, auto_hubs, +1 more.

skeletonA
Read-onlyIdempotent

Get detailed function signatures, class methods, and type definitions of a specific file WITHOUT reading the full body. Shows the API surface and line ranges. Signatures are normalized summaries, not exact edit anchors; use context(targets:[{file,start,end}]) for source text before editing.

Inputs: file_path (required), root, exported_only.

statusA
Read-onlyIdempotent

Project overview dashboard. Returns file counts, index state, memory graph stats, git branch, uncommitted changes, and recent commits. One call for complete situational awareness at the start of a session.

Inputs: root, format.

task_packA
Read-onlyIdempotent

Assemble the minimum useful working set for a task: ranked files, nearby tests, recent diffs, memory, and risks.

Inputs: task (required), root, format, preset, +9 more.

validate_scopeA
Read-onlyIdempotent

After edit_scope, recommend the most relevant validation checks and commands. Pass files when you already know what changed; they take precedence over task inference.

Inputs: task (required), root, files, format, +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 14 tools

    Disambiguation4/5

    Most tools have clearly distinct roles: grep vs search vs blast_radius vs exact_references are explicitly differentiated by literal/semantic/binding behavior, and status/reindex/task_pack cover separate lifecycle stages. There is still some conceptual overlap among skeleton, explain, artifact_read, and task_pack as ways to retrieve context, but the descriptions give enough guidance to select between them.

    Naming Consistency3/5

    All names use snake_case casing, but the semantic pattern is mixed: some are verbs (search, grep, reindex, explain), some are nouns (skeleton, status, task_pack), and others are noun_verb or verb_noun compounds (artifact_read, memory_record_task). The names remain readable, but there is no single predictable verb_noun convention throughout.

    Tool Count5/5

    At 14 tools, the set is well within a reasonable range for a code-context and analysis server. Each tool appears to serve a distinct workflow: indexing, search, symbol analysis, task packaging, memory, validation, and reporting.

    Completeness4/5

    The surface covers index lifecycle, semantic and literal search, reference analysis, symbol extraction, task context assembly, and memory persistence, which is broad for the domain. There are minor gaps: no explicit artifact write/list operation, no direct source-reading/context tool despite being referenced in descriptions, and no separate memory recall/list tool beyond task_pack.

    Maintenance

    ActivityActive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables coding agents to explore TypeScript, JavaScript, and Prisma projects through local symbol, call, and model-usage graphs, while recalling persistent project-scoped decisions and returning focused source context.
      1
      MIT
    • F
      license
      Not graded
      quality
      B
      maintenance
      Enables AI coding agents to interrogate a local repository deterministically for symbols, dependencies, call paths, routes, tests, and Git impact, returning verified structured evidence with exact line citations instead of requiring the whole codebase to be read.
      79 PyPI
      4
      -
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables AI coding agents to retrieve bounded, focused context from a local structural code graph, including source entities, Git relationships, and recorded project memory. It supports exploring structure, inspecting callers, callees, and impact, and carrying prior mistakes into later sessions without reading full files.
      24 npm
      MIT