
Codearia Sieve
io.github.AntonG87Published by GitHub account AntonG87v0.2.2Updated Oct 24, 2026
Web pages into decision-ready state: dates, numbers with units, budgeted chunks. No model, no key.
Overview
Fetches a web page and returns it as structured state — typed dates, numbers with units, and token-budgeted chunks with anchors — for a decision model.
- What you can do
- codearia-sieve parses a web page into a compact, typed representation instead of prose. It normalizes dates (for example "Published September 15, 2026" to "2026-09-15"), turns numbers into facts only when a unit is present, and splits the text into chunks that fit a model's context window, each carrying its token and character size and an anchor back to the page. It also reports usage (raw versus state tokens) and named warnings such as robots-disallowed, blocked, paywall, or empty-without-js. The main tools are sieve_page, which accepts a URL or HTML and returns structured content, and sieve_chunk, which returns the text of one chunk from the last result for that URL without refetching.
- When to use it
- Use it when an agent needs to read web pages and the token bill matters, or when a cheap classifier, ranker, or judge model needs clean, checkable input rather than raw HTML. It suits workflows where each extracted fact must point back to its source block or anchor. It is not aimed at JavaScript-rendered articles, front pages, or listings, which come back as warnings rather than content.
- Requirements
- Runs locally over stdio, typically via npx codearia-sieve or as an npm library. No API key, account, or environment variable is declared. It needs network access to fetch pages, and a Node.js runtime for the npm package.
Installation
In SourceWeft
- Open Codearia Sieve in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
[codearia-sieve — web pages into decision-ready state]
codearia-sieve
Parses a web page into the exact format a decision model needs.
Dates as dates. Numbers with units. Text in chunks that fit the model's window, each pointing back to where it came from.
One call — and the token bill, before and after.
[MCP server] [TypeScript] [MCP Registry] [npm] [MIT] [Tests] [No model, no key]
Measured, not promised. A live run over random pages picked the same day — fresh news from RSS feeds in several languages, random Wikipedia articles, docs, blogs, government sites, recipes, shops. Every row is in bench/analytics/, and npm run analytics reruns the whole thing. The output was then put in front of a decision model: see Checked by a judge.
What it does
An agent that needs a web page fetches the whole thing: navigation, cookie banner, footer, ad slots, a megabyte of framework markup. Then a model paid per token digs through the pile for one paragraph.
codearia-sieve does the digging before the model sees anything — and returns the page as state, not prose:
Everything else — menus, footers, banners, tag rows, "read more" — is removed, and with trace: true you get the list of what was removed and why.
Who it is for
People who build agents and have seen the bill. Every fetched page costs tens of thousands of tokens before the agent has read a word of it. Median page in the sample: 53 718 tokens in, 1 106 out.
People who run cheap decision models. Classifiers, rankers, System One models like Jev that judge instead of write. They are nearly free and very fast, and they have hard edges: they cannot count, they read dates as text, and their accuracy drops as irrelevant material fills the context. Every "page to markdown" tool prepares input for a reader. This one prepares input for a judge.
People who need answers they can check. A verdict from scraped text is unprovable unless each piece points back to its source. Here every fact names its block and every chunk carries an anchor.
How it works
Eight steps of ordinary code. No model runs unless you plug one in. The same HTML gives the same JSON, byte for byte.
- Fetch —
robots.txtfirst; a refusal is reported, not bypassed. Plain HTTP, honest user agent. - Parse — HTML into a DOM with
linkedom. No browser. - Dates and ids from the untouched tree — cleaning strips
<head>, bylines and attributes, so both are read before it runs. - Clean — Defuddle removes chrome; Readability takes over if it comes back empty. Inline elements get a space first, so
<span>20 Sept</span><span>10 min</span>never becomes202610 min. - Blocks — headings, paragraphs, lists, tables, code, quotes, in order, with positional ids. Old pages set with
<br><br>become paragraphs too; table rows keep their column headers. - Facts and anchors — ids restored; numbers become facts only beside a unit; ranges keep both ends.
- Chunk — greedy, in order, under two budgets at once: 20 000 tokens and 50 000 characters by default.
- Assemble —
state,markdown,usage,warnings, and the trace on request.
What the result looks like
Expected outcomes never throw. They come back as warnings, each named:
Use it from an agent
You say what you want in plain words. The agent finds the pages, calls sieve_page for each, hands the state to a decision model with a typed question, and writes up the result. Sieve prepares. The judge judges. The agent writes.
Listed in the official MCP Registry as io.github.AntonG87/codearia-sieve; clients that read the registry can install it by name.
Pairs with jev-mcp: chunks are sized to fit its fields, so state goes straight into a typed question.
Checked by a judge
The claim is that a decision model gets better input from Sieve than from raw text. So the output was handed to one. examples/jev.ts drives both MCP servers with the official client — codearia-sieve prepares six pages (API docs, a release note, two Wikipedia articles in two languages, two pricing pages), Jev judges them through jev-mcp. Same run, 21 September 2026:
The first pass of this test did its job the other way round: Jev sent three facts to review and contradicted one. All four traced to Sieve — a table row labelled by its column header instead of its row header, two rates in one header left unpaired, and a Russian bibliographic "256 с." read as seconds. Fixed, tested, rerun: 11 of 11. A judge that can tell you when your parser is wrong is the point of the whole pairing.
Use it as a library
parseDate, findDates and the vendor limits (JEV, JEV_MCP, DEFAULT_BUDGET) are exported too.
Where it stops
- Front pages, listings and product pages have no article to find. You get the headlines and a
thin-contentwarning, not a fake win. - Articles rendered by JavaScript come back as
empty-without-jswhen the container is empty. A site that ships a teaser and streams the rest cannot be told apart without a browser; you get the teaser. - Text-heavy pages save less. A whole novel saves 22 %, an RFC 84 %: there is no wrapping to remove and the text is kept in full. That is the tool working.
- A pricing grid is not a table. A fact knows the block it came from, not the plan column it sits under; Sieve does not guess the pairing. Send the chunk — a pricing page is about a thousand tokens after cleaning — and let the judge read it:
examples/pricing-watch.ts. - Tokens are counted with o200k as an approximation. Pages over a megabyte get a sampled count and
usage.rawTokensEstimated: true.
Develop
Design notes — vision and architecture — are in docs/.
MIT © 2026 Anton Evelson · Codearia Academy
Source: README.md at commit f8a2757
Tools
0Version history
1- v0.2.2LatestSep 22, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts