Connect your agent (MCP)
ProofGit exposes two read-only MCP (Model Context Protocol) servers, so an AI agent can query your repositories directly and get back the same trust and freshness signals a human sees in the web UI.
The two servers
| Scope | Endpoint | Tools |
|---|---|---|
| Single repository | POST /api/v1/repos/{owner}/{repo}/bnlgit/mcp | fetch_bnlgit_overview, search_bnlgit_documentation, search_bnlgit_code, search_bnlgit_hybrid, map_bnlgit_topology, list_bnlgit_cleanup_plans, get_bnlgit_cleanup_plan |
| Fleet | POST /api/v1/bnlgit/mcp | list_bnlgit_repos, search_bnlgit_hybrid, search_bnlgit_code, list_bnlgit_cleanup_plans, get_bnlgit_cleanup_plan |
Seven repo-scoped tools, five fleet-scoped. The fleet server searches across every BNLRepo the caller can see in one query, or an explicit list of repositories you pass in.
Every tool tells your agent that it only reads: each one carries the MCP annotations readOnlyHint: true and openWorldHint: false. Clients use them to decide whether to ask you before a call; GitHub Copilot, for one, asks before each call to a tool that does not say it only reads.
What a tool call returns
This is the part that matters more than the tool list.
A search hit is an evidence bundle, not a snippet. It carries the matched .llm excerpt and the exact backing source lines read from the recorded commit, plus the freshness state, the model and provenance of the summary, and a jump-back URL into the web UI so a human can check the agent's work in one click.
Line spans are re-validated against the pinned blob before they are returned. A summary that points at line 240 of a file that is now 180 lines long does not quietly return the wrong lines — the mismatch is caught.
search_bnlgit_hybrid packs its results to a token budget, and a response never exceeds it: tokens_used is always at most token_budget. Default limit is 8 results with a 6000-token budget; you can raise those to 25 and 32000 respectively. There is a summary_only mode if you want the excerpts without the backing source.
- A hit that does not fit is left out and packing carries on with the next one, so one large file cannot end the answer early.
- When the top-ranked hit alone is larger than the budget, its source lines are clipped to the first lines that fit, at most 200: the hit is marked
source_lines_truncated, andsource_lines_omittedsays how many lines of its span were left out. If not even one line fits, the hit is left out and a note innotestells the agent to raisetoken_budget. omitted_countis the sum of three counts:omitted_by_budget(did not fit),omitted_by_limit(past the result limit; an upper bound, because it includes the extra candidates fetched for reranking) andomitted_by_file_cap(see Reading a search response).
Authentication
There are two ways in, and both reach exactly what you can already read.
Sign in from the agent. Claude Code, Codex and GitHub Copilot sign in to ProofGit themselves, in your browser, so there is no token to create or paste; so do Claude on claude.ai and ChatGPT, added as a connector (Set up your agent has the steps). A call without a token gets 401 with a WWW-Authenticate header naming where the sign-in details are, so the agent starts sign-in by itself. Whatever scope an agent asks for, the forge grants read:repository and nothing more. All the agents and apps you sign in share one authorization, ProofGit MCP: revoke it under Settings → Applications, in Authorized OAuth2 Applications, and every one of them has to sign in again.
- The sign-in details are at
/.well-known/oauth-authorization-serverand, per server,/.well-known/oauth-protected-resource/<endpoint path>. - Agents register at
POST /login/oauth/registerand all get the same built-in client. Only redirects back to the agent's own machine, and the fixed callbacks of VS Code, Google Antigravity, Claude (https://claude.ai/api/mcp/auth_callbackand itsclaude.comform) and ChatGPT (https://chatgpt.com/connector/oauth/{id}andhttps://chatgpt.com/connector_platform_oauth_redirect), are accepted. - PKCE with S256 is required.
- For a sign-in,
/login/oauth/userinfoanswers with who you are (sub,name,preferred_username,email,picture) and no groups; ChatGPT asks for it right after signing in. When a sign-in has expired or been revoked, a refresh is refused withinvalid_grant; on that answer, Claude and ChatGPT ask you to reconnect.
An access token, for Cursor, scripts and CI. A normal Gitea personal access token. Nothing bespoke.
Authorization: token <your-token>
Authorization: Bearer <your-token> is accepted too, which is what most MCP clients send by default.
- Repo-scoped needs code-read access to that repository.
- Fleet-scoped needs the
repositorytoken scope, and is limited to whatever its owner can already see.
Every tool only reads, so give the token read:repository scope and no write access. Mint one at Settings → Applications. A token without the read scope gets 403 with error="insufficient_scope".
Access is enforced per request, on every read. The MCP servers do not widen what a sign-in or a token can reach; they are a different way to ask the same permission system the same question.
Wire protocol
Plain JSON-RPC 2.0 over HTTP POST. MCP protocol version 2025-06-18. Methods: initialize, ping, tools/list, tools/call; notifications are acknowledged. There is no SSE or streaming transport — a POST returns a response.
Request bodies are capped at 2 MiB.
Connecting your agent
One command sets up Claude Code, Codex and GitHub Copilot with the fleet server and no token, and the agents then sign in on first use:
npx @bluenotelogic/harness proofgit --codex --copilot
Set up your agent explains what it writes, and has the commands for each agent if you would rather add the server yourself.
The Connect your agent over MCP card on a repository's Sync Cockpit (/{owner}/{repo}/bnlgit) shows the snippets with your real endpoint already filled in. For a repository your-org/your-repo, Claude Code's reads:
claude mcp add --transport http proofgit-your-repo https://app.proofgit.com/api/v1/repos/your-org/your-repo/bnlgit/mcp
claude mcp login proofgit-your-repo
Or, in a project's .mcp.json, with no token in it:
{
"mcpServers": {
"proofgit-your-repo": {
"type": "http",
"url": "https://app.proofgit.com/api/v1/repos/your-org/your-repo/bnlgit/mcp"
}
}
}
The card also has the access-token versions, for Cursor, scripts and CI. With a token, Claude Code's reads:
claude mcp add --transport http proofgit-your-repo https://app.proofgit.com/api/v1/repos/your-org/your-repo/bnlgit/mcp --header "Authorization: Bearer YOUR_PROOFGIT_TOKEN"
Or, in a project's .mcp.json:
{
"mcpServers": {
"proofgit-your-repo": {
"type": "http",
"url": "https://app.proofgit.com/api/v1/repos/your-org/your-repo/bnlgit/mcp",
"headers": {
"Authorization": "Bearer YOUR_PROOFGIT_TOKEN"
}
}
}
}
The server name is proofgit- followed by the repository name, lower-cased, with every character other than a-z, 0-9, - and _ turned into - (and any leading or trailing - dropped), so My.Repo becomes proofgit-my-repo. Replace YOUR_PROOFGIT_TOKEN with your token. The same card has snippets for Codex, GitHub Copilot and Cursor; they are also on Set up your agent.
For the fleet server, use https://app.proofgit.com/api/v1/bnlgit/mcp and the name proofgit-fleet instead; the fleet dashboard at /-/bnlgit shows the same card for it.
Checking it works without an agent
Every MCP server answers tools/list to an ordinary curl, which is the quickest way to confirm your token and URL before you go debugging your client's config:
curl -s https://app.proofgit.com/api/v1/repos/your-org/your-repo/bnlgit/mcp \
-H "Authorization: token YOUR_PROOFGIT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
Choosing the right tool
fetch_bnlgit_overview— the repository-level_OVERVIEW.llm. Cheap orientation; start an agent here rather than letting it list files.search_bnlgit_documentation— lexical search over the.llmsummaries. Always available.search_bnlgit_code— exact search over your actual source, backed bygit grep. Use it when you know the symbol or string. On the fleet server it searches every repository you can read, or thereposyou name.search_bnlgit_hybrid— a plain question, ranked by meaning and by the words of your summaries and their typed facts, with any names it mentions looked up in the source, returned with backing source and packed to your token budget. Read Search before relying on this — the meaning and word ranking need the repository to be configured for vector retrieval; without it the search degrades to lexical results, and it tells you when it has done so.list_bnlgit_cleanup_plansandget_bnlgit_cleanup_plan— the repository cleaner's plans: the list, newest first, then one plan with its items (category, risk, reason, evidence, affected files and rollback steps), by itsid. On the fleet server both takerepositoryasowner/name. They only read: accepting or dismissing an item stays in the web cleaner.map_bnlgit_topology— the file-relationship graph built from every summary's structuredrelated_filesfacts: which files a file references, which files reference it, and the repository's most-referenced files. Each edge carries the exact source spans in the declaring file plus a line-anchored link. Omitpathto get only the most-referenced list; pass one to get that file's edges too. Files excluded by the repository's scope never appear in the map. By default a file's edges are only the relationships declared by a summary that isverified_currentand naming a file that has a summary at that ref: passinclude_stalefor relationships declared by stale summaries, andinclude_unverifiedfor those declared by legacy or provenance-unknown summaries or naming a file with no summary. Every edge carriesdeclarer_trust_tier, andexcluded_untrusted_declarerandexcluded_unresolvedcount the edges withheld.
Reading a search response
Every search response names the behaviours that call applied in features, a sorted list; the four ranking entries at the end of the table say that a setting is on, not that this call used it. Read it rather than assuming what a server does: a response without features comes from a server older than release 0.2.0. Topology, overview and repository-listing responses carry no features.
Name in features | Tools | What it tells the agent |
|---|---|---|
read_time_skip_policy | all three searches | Files the repository's scope excludes were withheld when this call read them. |
statement_collapse | hybrid, documentation | Each summary statement is returned once, however many places in the file it cites. |
serve_during_refresh | all three searches | A summary being regenerated for the same source still counts as current. |
secret_redaction | all three searches | Recognised secrets read [redacted]. |
hybrid_fact_annotation | hybrid | Hits carry their typed facts. |
relevance_score | hybrid | Hits the reranker scored carry their relevance. |
min_relevance | hybrid | The request may set a relevance floor. |
budget_strict | hybrid | tokens_used never exceeds token_budget. |
budget_full_estimate | hybrid | Each hit is measured as its whole JSON object, not only its text. |
name_lane | hybrid | The name lookup is on: names a question mentions are also looked up in the source (a question with none runs no lookup). |
keyword_lane | hybrid | The keyword lane is on: on a vector-ready repository, files are also ranked by the words of their summaries and the two rankings fused. |
fact_chunks | hybrid | Fact chunks are on: on a vector-ready repository, indexed typed facts are searched as items of their own. |
fused_ranking | hybrid | The fused ranking setting is on. It reorders hits only when rerank_applied is true. |
The fields behind them:
- How a hit was found.
match_sourceisname_lanefor an exact code hit on a name the question mentions (withname_lane_definition: truewhere that hit is the definition),keywordfor a file the word ranking added,factfor a typed fact, and absent for a summary statement found by meaning. See Search. - One hit per statement. A statement that cites several spans of a file is returned once, with the lines of its first span; its other spans are listed in
other_spans(their lines are not included) andcollapsed_spanscounts them. Hybrid search also caps the hits from any one file (one on the hosted service);omitted_by_file_capcounts the rest. - Typed facts. Hybrid hits carry
structured_fact_idsandstructured_fact_categories, as documentation hits do: the facts in the summary (symbols, endpoints, side effects and the like) whose lines overlap the hit. - Reranking. Every hybrid response says what the reranker did in
rerank_status(applied,disabled,skippedorfailed) andrerank_applied. A hit it scored carriesrelevance_score, its raw relevance from 0 to 1. Passmin_relevance(0 to 1) to drop hits below that relevance, and hits the reranker did not score;excluded_low_relevancecounts what it dropped. The floor applies only when reranking ran: otherwise nothing is dropped and a note says why. See Search. - Freshness while a summary is regenerated.
trust_reasonsincludesrefresh_pending, orrefresh_failed_previous_summary_servedafter a failed attempt, when a hit's summary is being regenerated for the same source. - Redactions. A hit lists what secret redaction replaced in
redactions, by place and kind (L12:stripe_secret,summary:openai_key), never the value. No line is added or removed, so line numbers and spans still match the file. See Search. fetch_handleis an opaque coordinate reserved for a future tool. No tool accepts it today, so do not build on redeeming it: to see a hit that was left out, narrow the query or raisetoken_budget.- Readiness. On the fleet server, every entry of
list_bnlgit_reposcarriesvector_readyandvector_status(ready,no_model,model_not_servedorno_chunks), so an agent can tell which repositories hybrid search can vector-rank before it asks. The oldervector_enablednow means the same asvector_ready.
initialize reports the server's release in serverInfo.version (for example 0.7.5); before 0.2.0 it was always v1. What each release changed is in the release notes.
Server settings
The service's operator can switch each of these behaviours per instance. The Hosted column is what the hosted service runs:
| Setting | Default | Hosted | What it does |
|---|---|---|---|
bnlgit.retrieval.strict_budget | on | on | Never exceeds the token budget (budget_strict). |
bnlgit.retrieval.top_hit_max_lines | 200 | 200 | The most lines an oversize top hit is clipped to. |
bnlgit.retrieval.full_bundle_estimate | off | off | Measures each hit as its whole JSON object (budget_full_estimate). |
bnlgit.retrieval.collapse_statements | on | on | One hit per summary statement (statement_collapse). |
bnlgit.retrieval.max_hits_per_file | 2 | 1 | The most hybrid hits from one file; 0 means no cap. |
bnlgit.retrieval.name_lane | on | on | Looks up names the question mentions in the source (name_lane). |
bnlgit.retrieval.keyword_lane | off | on | Fuses a word ranking of the summaries with the vector ranking (keyword_lane). |
bnlgit.retrieval.fact_chunks | off | on | Searches typed facts as items of their own (fact_chunks). |
bnlgit.retrieval.fused_ranking | off | on | Blends the reranker's score with vector similarity after a rerank (fused_ranking). |
bnlgit.rerank.enabled | off | off | The cross-encoder reranking pass. |
bnlgit.embedding.managed.enabled | off | on | Offers the managed embedding option for vector search (managed_embeddings in capabilities). |
bnlgit.embedding.managed.default_for_new_pairs | off | off | Gives a new pair the managed option when its creator made no embedding choice. |
bnlgit.retrieval.fair_rerank_window | on | on | Shares the reranker's window fairly between repositories. |
bnlgit.retrieval.fleet_fair_merge | on | on | Lets repositories take turns in a fleet search that was not reranked. |
bnlgit.retrieval.min_relevance_default | 0 | 0 | The relevance floor used when a request sets none; 0 means no floor. |
bnlgit.retrieval.skip_unservable_index | on | on | Does not index summaries in an embedding model no query can use. |
bnlgit.retrieval.serve_during_refresh | on | on | Serves a summary while it is regenerated for the same source (serve_during_refresh). |
bnlgit.retrieval.redact_secrets | on | on | Redacts recognised secrets (secret_redaction). |
bnlgit.retrieval.topology_trust_filter | on | on | Filters map_bnlgit_topology by the trust of the summary that declared each relationship. |
An agent that answers from a summary alone is an agent you have to trust. An agent that answers with the summary and the source lines it came from, at the commit it read them at, is an agent you can check. Every design decision in this integration follows from preferring the second thing.
Something here wrong or missing? Mail hello@proofgit.com — these pages are the single public source of truth for ProofGit and we would rather fix them than leave you guessing.