Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
6,000+ web scrapers for your AI agent, start free logo6,000+ web scrapers for your AI agent, start free

Apify gives your agent live web data: 6,000+ prebuilt scrapers and actors, MCP-ready. Sign up free with $5 in usage credits.

Try Apify free
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 48,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

A token-efficient, codebase-aware AI agent runtime that provides MCP tools for starting runs, getting run states, explaining code, and finding files.

README.md

developer-context-agent

![npm version](https://www.npmjs.com/package/developer-context-agent) ![license: MIT](https://github.com/SinuxDev/developer-context-agent/blob/master/LICENSE)

Token-efficient codebase context for AI assistants. Indexes your repo locally, ranks relevant files with hybrid retrieval, and returns token-budgeted context packs via MCP — no LLM required in this package.

Works with Cursor, Claude Desktop, Windsurf, and any Model Context Protocol client.

The host LLM (Cursor, Claude, etc.) does the reasoning. This agent finds, ranks, and compresses codebase context.

Install

npm install -g developer-context-agent

Or use without installing:

npx developer-context-agent --help

Requirements: Node.js 20+

Quick start

cd your-project
context-agent index
context-agent pack --task "how does auth work"

Use with Cursor

Add .cursor/mcp.json in your project:

{
  "mcpServers": {
    "context-agent": {
      "command": "npx",
      "args": ["-y", "developer-context-agent", "mcp"],
      "env": {
        "REPO_PATH": "${workspaceFolder}"
      }
    }
  }
}

Restart Cursor, enable the MCP server in Settings → MCP, then chat as usual. The model can call get_context_pack before reading files.

Recommended Cursor rule (.cursor/rules/context-agent.mdc):

Before reading large files or searching the codebase manually, use context-agent MCP tools:
1. get_context_pack for the user's question
2. find_files / search_symbols only if more detail is needed

Use with Claude Desktop / other MCP clients

{
  "mcpServers": {
    "context-agent": {
      "command": "npx",
      "args": ["-y", "developer-context-agent", "mcp"],
      "env": {
        "REPO_PATH": "/absolute/path/to/your/repo"
      }
    }
  }
}

How it works

You ask in Cursor chat
       ↓
Host LLM calls get_context_pack("auth middleware")
       ↓
Agent: grep + symbols + import graph (+ optional vectors)
       ↓
Returns small markdown context pack (token-budgeted)
       ↓
Host LLM answers using that context

Local index is stored in .context-agent/ inside your project (SQLite). Nothing is sent to a cloud service by this package.

CLI

| Command | Description | |---------|-------------| | context-agent mcp | Start MCP server (stdio) | | context-agent index [--repo path] | Build or refresh local index | | context-agent status [--repo path] | Show index metadata | | context-agent pack --task "…" [--repo path] | Print context pack to stdout |

Examples:

context-agent index --repo .
context-agent status --repo .
context-agent pack --task "explain hybrid retrieval" --max-tokens 6000

MCP tools

| Tool | Description | |------|-------------| | get_context_pack | Primary tool — token-budgeted context for a task | | find_files | Rank files by relevance (grep + symbols + vectors) | | search_symbols | TypeScript/JavaScript symbol search | | grep | Sandboxed ripgrep | | read_file | Sandboxed file read (optional line range) | | index_repo | Build or refresh local index | | index_status | Index health and chunk count |

Configuration

Environment variables (optional):

| Variable | Default | Description | |----------|---------|-------------| | REPO_PATH | cwd | Default repository path | | TOKEN_BUDGET_DEFAULT | 8000 | Default context pack token budget | | OLLAMA_BASE_URL | http://localhost:11434 | Ollama API for embeddings | | OLLAMA_EMBED_MODEL | nomic-embed-text | Embedding model | | ALLOWED_REPO_ROOTS | — | Comma-separated repo path allowlist |

Optional: semantic search with Ollama

Hybrid retrieval works without Ollama (grep + symbols + import graph). For vector similarity search:

ollama pull nomic-embed-text
context-agent index

Development

Clone and work on the source repo:

git clone https://github.com/SinuxDev/developer-context-agent.git
cd developer-context-agent
npm install
npm test
npm run context-agent -- index --repo .
npm run mcp

Legacy HTTP server

An optional Fastify API (POST /chat, POST /runs) with Postgres/Redis is still in the codebase for supervised runs. It is not required for the MCP agent.

npm run docker:up
npm run db:migrate
npm run dev

See docs/IDE_BRIDGE.md for HTTP API details.

Links

  • npm: https://www.npmjs.com/package/developer-context-agent
  • Repository: https://github.com/SinuxDev/developer-context-agent
  • Issues: https://github.com/SinuxDev/developer-context-agent/issues

License

MIT

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Developer Tools servers.