Skip to main content

Repository Intelligence Engine — MCP server for AI coding agents

Project description

contextl-mcp

Architecture intelligence for AI coding agents.

Stop letting your AI agent read your entire codebase to make one small change. contextl finds the exact files that matter — using graph theory, not guesswork.

"fix the broken checkout flow"
        ↓
components/Checkout.tsx      [high confidence]
lib/api.ts                   [high confidence]
types/index.ts                [medium confidence]

No LLM. No embeddings. No API keys. No vector database. Pure dependency graph + text scoring — runs entirely on your machine, your code never leaves your system.


Install

pip install contextl-mcp

Then add this to your IDE's MCP config file:

{
  "mcpServers": {
    "contextl": {
      "command": "contextl"
    }
  }
}

Where to find your config file:

IDE Config path
Antigravity ~/.gemini/config/mcp_config.json
Cursor ~/.cursor/mcp.json
Windsurf ~/.codeium/windsurf/mcp_config.json
Claude Code ~/.claude.json
VS Code .vscode/mcp.json

Restart your IDE. The contextl command is now available — pip install registered it on your PATH.


What it gives your agent

Three tools, automatically available once connected:

query_repo

"Find the files relevant to this change."

Ranks every file in your repo against a natural-language query using filename matching, content matching, and graph proximity. Returns confidence-scored results with plain-English reasoning.

{
  "repo_path": "/path/to/repo",
  "query": "fix the upload error handler",
  "top_n": 5
}

analyze_impact

"If I change this file, what breaks?"

Walks the dependency graph upstream from any file to find every direct and transitive dependent. Flags likely test files so your agent knows what to re-run. Essential before touching shared files like types/, utils/, or config.

{
  "repo_path": "/path/to/repo",
  "target_file": "src/types/index.ts"
}

scan_repo

"What files exist here?"

Lists every source file contextl can see — useful for the agent to orient itself before doing anything else.


How the ranking works

  1. Keyword match — does the filename contain query terms?
  2. Content match — does the file's source code mention the terms?
  3. Graph proximity — files connected to high-scoring files get a relevance boost
  4. Centrality (PageRank) — heavily-connected files rank higher when scores tie

No machine learning involved — every score is fully explainable and traceable back to a specific signal.


Supported languages

TypeScript, TSX, JavaScript, JSX — built for Next.js and React codebases first.

Python, Go, and Rust support are on the roadmap.


Why this exists

AI coding agents are increasingly good at writing code. They're still bad at knowing where to look. On a 5,000-file repo, an agent might read 100+ files just to change a logo. contextl exists to fix that — and to eventually give agents a real model of your codebase's architecture, not just a file list.


Also available via npm

npx -y contextl

Same engine, same tools — installable via npm for JS/TS-first workflows.


Links

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

contextl_mcp-1.1.2.tar.gz (17.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

contextl_mcp-1.1.2-py3-none-any.whl (22.1 kB view details)

Uploaded Python 3

File details

Details for the file contextl_mcp-1.1.2.tar.gz.

File metadata

  • Download URL: contextl_mcp-1.1.2.tar.gz
  • Upload date:
  • Size: 17.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for contextl_mcp-1.1.2.tar.gz
Algorithm Hash digest
SHA256 b7a1d89d16aaa515162e5a8e06c7400316cf6cd169630fe85c31286c38b60a60
MD5 c017dc4a8ec1fada7735dc7cc233cac7
BLAKE2b-256 18ab9ddb838a65cb312d07a37296084358999e39b42b52e9c75b57e8ab9d2e28

See more details on using hashes here.

File details

Details for the file contextl_mcp-1.1.2-py3-none-any.whl.

File metadata

  • Download URL: contextl_mcp-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 22.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for contextl_mcp-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 19d4c1250a70482e32c9b7ceb5c8fb4d504b7af7e53e434b88bfb25bf09a66e5
MD5 2dcfbe830b49efe3b7854eddd92b8f2b
BLAKE2b-256 b34034b735d906b5c4e3ba97a45427b683331f232306febb054a44042d39cd97

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page