Who it is forA team running an MCP-capable coding agent on a large repository that spends many tool calls grepping for the files a task touches.
The problemThe agent re-reads the same context on every turn while it searches the tree, which costs tokens, time and tool calls.
The outcomeThe agent starts from a ranked answer served over stdio and adds to it only when it needs more, so it makes fewer tool calls and turns.
What you need first
- Docker with Docker Compose, to run PostgreSQL 16 with Apache AGE and pgvector
- Python with pip
- A local repository to index
- A coding agent that can call MCP tools, or the bce command line
Steps
docker compose -f deploy/docker-compose.yml up -dpip install bgts-context-enginebce migratebce index --repo /path/to/your/repo --name my-servicepip install "bgts-context-engine[mcp]"(inferred, check the README)bce serve-mcp
Prompt for your agent
In the bgts-context-engine setup, make sure the repository at <target repo path> is indexed, then start the MCP server with bce serve-mcp and connect the agent to it over stdio. Expected output: the agent gets a ranked answer for the task <task text> before any grep or glob call. Verify that the agent's first tool call is to the context tool and that the returned symbols include the files the task changes.
Caveat. The README says the MCP surface needs the mcp extra, but its exact install command is cut off in the text provided, so the extra install step above is inferred.
Get 5 new use cases every morning. Free, one short email, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Disclaimer
Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked "Seen in the wild", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email [email protected] and we will look at it promptly. Full disclaimer page