mcpField
C

Costwright Mcp

Local
github.com/hernaninversoAI & Agents0Updated 17w ago

About Costwright Mcp

Costwright Mcp analyzes Python agent workflows built with LangGraph, CrewAI, or OpenAI-Agents-SDK without running them. It identifies worst-case token-budget limits and can issue signed certificates logged to a public transparency log.

Key features

  1. 01Analyze workflow graphs with AST
  2. 02Identify budget and runaway risks
  3. 03Flag LLM calls without token caps
  4. 04Issue signed budget certificates
  5. 05Verify certificates and public keys

Use cases

  1. 01Check token budgets before deployment
  2. 02Find uncapped calls and runaway loops
  3. 03Verify a budget certificate

MCP support

Exposes static repository analysis, certificate issuance and verification, and public-key lookup as MCP tools. Analysis and certification require an API key; verification and key lookup are public.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"hernaninverso-costwright": {
"command": "npx",
"args": [
"-y",
"costwright-mcp"
],
"env": {
"COSTWRIGHT_API_KEY": "<COSTWRIGHT_API_KEY>"
}
}
}
}
Run commandnpx -y costwright-mcp
Environment variables to set
COSTWRIGHT_API_KEYSecretAPI key for costwright (RapidAPI key or direct Bearer). Only needed for check/certify; verify/pubkey are public.

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmcostwright-mcp0.1.1

Tools

4

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
repo_pathstringYesAbsolute path to the local Python repo/directory to analyze.
policyenumNoAnalysis policy.default | strict

Details

From the project README

costwright — MCP server

Static worst-case token-budget analysis for LLM-agent workflows. Point it at a Python repo using LangGraph / CrewAI / OpenAI-Agents-SDK and it reports — by pure AST analysis, without running the code — the worst-case budget ceiling of every workflow graph: which units are certifiable / default-dependent / non-certifiable / runaway, and which LLM calls have no token cap. Optionally issues an Ed25519-signed budget certificate logged to a public transparency log. Wraps the hosted costwright API; backed by a Lean 4 cost-soundness theorem.

Use it before deploying an agent workflow to catch missing token caps and while True: runaway drivers — the budget version of a type check.

Tools

ToolWhat it doesKey?
costwright_check(repo_path, policy?)Static budget analysis of a local repo. Returns pass/fail + counts of certifiable/default-dependent/non-certifiable/runaway units.yes
costwright_certify(repo_path, policy?, label?)Issues a signed, logged budget certificate. Returns cert_id + signature + verify_url.yes
costwright_verify(cert_id)Verify a certificate by id (valid/expired/revoked, signature check).public
costwright_pubkey()Active Ed25519 public keys for offline verification.public

Setup

{
  "mcpServers": {
    "costwright": {
      "command": "npx",
      "args": ["-y", "costwright-mcp"],
      "env": { "COSTWRIGHT_API_KEY": "your_rapidapi_key" }
    }
  }
}

The key is sent as X-RapidAPI-Key (RapidAPI channel) by default; set COSTWRIGHT_DIRECT=1 to send it as Authorization: Bearer for the direct channel. verify and pubkey work with no key.

check/certify build a .py-only gzip archive of repo_path client-side (excluding venv, node_modules, tests, etc.) and send it for analysis — your source is uploaded to the hosted API. See https://eleata.io/privacy/. MIT licensed.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.