npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@finest-ai/mcp

v0.1.2

Published

Finest MCP server — inspect exact-route spend and current policy-backed model evidence.

Downloads

467

Readme

@finest-ai/mcp

The Finest MCP server. Connect it to your coding agent and it can ask where this codebase's model spend goes and whether one exact existing route's current signed-policy configuration still has route-bound verification and optimizer authority.

Tools

| Tool | What it answers | | --- | --- | | finest_overspend | Estimated monthly model spend attributed by route, largest first, with the optimizer's projected saving and the constraint blocking any route that has none. | | finest_routes | The jobs this codebase asks AI to do: key, job name, task class, status, estimated monthly cost, whether the route can be switched at all. | | finest_verify | Returns the console handoff where a signed-in admin can choose a frozen safe corpus, cap real-provider spend, and request optimizer-recommended verification. It never queues spend itself. | | finest_cheapest_proven | For one exact route, the active signed-policy configuration only when matching immutable verification and a fresh cost-optimizer recomputation still support it. Task class alone never selects a model. | | finest_install | Returns the executable install document (the same content as /llms.txt, both doors: the 2-minute Door 1 key swap with its fail-open shim, and the Door 2 in-process wrap) plus the console URL where a signed-in human issues a Door 1 gateway key. No key material ever passes through MCP, and the tool itself installs and changes nothing. | | finest_approve_flip | Returns the human approval screen. It never records approval or changes traffic. |

Every tool returns a structured result and one human sentence: the structure is for the agent, the sentence is for the person reading over its shoulder.

Configuration

@finest-ai/mcp is not published and no npm coordinate is approved yet. Do not run the registry command. Build this checkout, then point the MCP client at the explicit local artifact (replace the absolute path below):

pnpm --filter @finest-ai/mcp build
{
  "mcpServers": {
    "finest": {
      "command": "node",
      "args": ["/absolute/path/to/finest/packages/mcp/dist/server.js"],
      "env": {
        "FINEST_API_KEY": "fnst_...",       // workspace key, from the console
        "FINEST_API_URL": "https://api.finest.so",       // optional
        "FINEST_CONSOLE_URL": "https://finest.so"        // optional handoff origin
      }
    }
  }
}

Why finest_cheapest_proven is exact-route only

An LLM asked "what's the cheapest model for classification?" will always produce a confident answer. A task class is not enough evidence: two classification routes can have different prompts, schemas, traffic, constraints, provider bindings and price authority. Call finest_routes first, then pass the exact routeId. A genuinely new job has no route-bound proof yet, so the tool returns a tuple-free unavailable state instead of laundering a benchmark into source.

The tool returns a tuple only when the exact route has one active, unexpired signed policy, matching immutable verification over both exact tuples, and a fresh cost-optimizer recomputation still selects that active tuple with positive fully loaded projected savings. The result carries policy, verification, corpus, price-epoch and timestamp sources. It never falls back to a generic benchmark, fleet average or remembered model, and it never tells an agent to hard-code the tuple: the application keeps its incumbent fallback and the SDK applies the signed policy.

Why paid verification and approval are handoffs

A flip changes which model serves live customer traffic. Everything else in Finest exists to make that action safe, and the brief's Invariant 12 says a human is the sole approver.

There is a sharper reason as well: an MCP server acts on tool arguments an LLM produced, and that LLM has been reading the repository, the issue tracker and web pages. Text in any of those can try to instruct it. A production model switch must never be reachable from a string a model read somewhere.

Verification also spends real provider tokens. A string supplied to an agent is not authority for money or traffic, so neither tool attempts a mutation. Each returns an exact console URL; the signed-in admin chooses the corpus, ceiling, evidence and canary there. No special MCP token can bypass that boundary.

Failure behaviour

No tool ever throws. An unreachable control plane returns { ok: false, error: { code: 'unreachable', hint: ... } } with isError set, and the sentence reminds the reader that their application is unaffected. The Door 2 shim is not a cloud proxy: its model calls continue going straight from the application to the provider on the developer's own key. Door 1 traffic is served through the Finest gateway by explicit choice, and its client shim fails open — gateway trouble replays the request directly to the provider on the developer's own key.

Key material never appears in a result, an error, a URL or a log. The workspace key travels in an Authorization header and nowhere else.

Development

pnpm --filter @finest-ai/mcp exec tsc --noEmit
pnpm --filter @finest-ai/mcp test     # drives the server through a real MCP client
pnpm --filter @finest-ai/mcp run build

The test suite connects a real Client over InMemoryTransport and fakes only the network, so declared output schemas are enforced by the SDK on the way out — a tool returning a shape it did not declare fails the suite rather than reaching an editor.

Apache-2.0.