Skip to content
< all work

Agents & MCP · Internal tool (current role) · 2026

GrantRadar: agents that find and screen funding opportunities

An internal radar for public grants, defence calls and tenders. Agents scrape sources into Postgres, a model judges eligibility against a company profile, and the team gets pursue, maybe or pass recommendations.

agent-systemsmcpplatform

A working pipeline from scrape to recommendation: 26 sources across grants, defence and bids, a durable job queue drained by agents over MCP, and a human override on every verdict.

Role
Sole engineer
Stack
Next.js · React · TypeScript · Postgres (Neon) · Drizzle ORM · MCP · Tailwind · Vitest
Opportunities table listing public funding calls and tenders with source, region, closing date, relevance score and a pursue, maybe or pass control.
The opportunities view, shown on the app's sample dataset of public listings.

Context

Small technology firms leave money on the table because nobody has time to watch every grant program, defence challenge and procurement portal. I built GrantRadar in my current role to do that watching. It is an internal tool, so this write-up covers the design and leaves out the company profile, the assessments and any live results.

The problem

The sources are messy. Some publish a clean CSV feed. Others are JavaScript portals, search pages, or programs with no listings at all that only need watching for changes. Eligibility is the hard part: a tender can match every keyword and still be closed to the company because of size, region or security requirements. A keyword filter cannot make that call, and a model making it unchecked is a liability.

What I built

A Next.js app on Postgres (Neon, through Drizzle) with an opportunities table, a dashboard, a source manager, a pipeline view and an email briefing builder. The data model has opportunities, matches, sources, drafts, a company profile, settings, and a jobs table that acts as the work queue.

Opportunities table with filters for type, closing window, source and region

The work is split into three agent routines that run in our agent desktop app: scrape, assess and brief. The app never holds model keys. It enqueues jobs, and the agents drain them through an MCP server the app ships with 22 tools (claim the next scrape, save a learned source profile, save scraped opportunities, read the company profile, save an assessment, and so on).

How it works

Sources. 26 sources are seeded: 12 grant programs, 6 defence programs and 8 bid portals. Each is either scrape or watch. A stable feed such as the federal tender CSV runs through a deterministic adapter on the server. A dynamic portal goes to the browser agent, which studies the page on its first visit and saves an extraction profile (list strategy, field map, filters, sample rows). Later runs apply that profile instead of relearning the page.

One write path. Every scraper, deterministic or agent, writes through the same ingest function. It validates URLs and dates, caps field lengths, drops anything already expired, applies the source's minimum score, upserts idempotently (keeping first_seen), marks unseen items closed for full feeds, and never overwrites an existing assessment. That last rule came from a real bug: re-scrapes were resetting assessed fit scores.

Relevance, then eligibility. A pure keyword scorer ranks opportunities against keywords stored in the company profile, with title matches weighted above description matches and a bonus for the home region. That score is only a recall signal. Eligibility is the model's job: the assess routine reads the profile and returns pursue, maybe or pass, a 0 to 100 fit score, short reasons and a markdown verdict. A skepticism setting (conservative, balanced or aggressive) is injected into the profile so one run judges consistently.

The queue. Jobs are claimed atomically with FOR UPDATE SKIP LOCKED, held on a five-minute lease, and given up to three attempts before they are marked failed. A worker that crashes loses its lease and the job goes back in the queue.

People stay in charge. Every verdict has a pursue, maybe or pass override in the table, and the override wins over the model. Opportunities can be retired and stay retired across re-scrapes. Links are verified too: each URL is checked for whether it points to that specific opportunity, not just whether it answers 200, because several portals return the same listing page for any query.

Results

The pipeline runs end to end from scrape to briefing. The repository has 141 commits across its branches, 140 of them mine, and 55 Vitest cases cover the tender feed parser, ingest rules, relevance scoring, formatting and the email briefing. Opportunity counts and pursue outcomes are internal.

What I'd do next

Track which recommendations the team actually pursued and won, and use that to calibrate the fit score instead of relying on the skepticism setting alone.

Five summary tiles: monitored, to pursue, maybe, needs review and passed, each with a count.
Dashboard summary, from the sample dataset.