Skip to main content
Glama
@oilflow/mcp-server

@oilflow/mcp-server

by rafaemush

@oilflow/mcp-server

Model Context Protocol (MCP) server for the OilFlow Network compliance APIs.

It turns OilFlow into a set of tools that any MCP-compatible AI agent (Claude Desktop, Claude Code, Cursor, or your own agent built on the MCP SDK) can call directly.

Three tools need no API key at all (since 0.3.0; the server used to refuse to start without one). 0.3.1 adds the MCP registry name io.github.rafaemush/oilflow-mcp-server and points the package at its public repository; no behaviour change.

Source of truth: this package is developed inside the OilFlow monorepo and mirrored to github.com/rafaemush/oilflow-mcp-server on every release. Issues go there.

  • ⚑ predeal_preview: the full pre-deal clearance verdict on a proposed deal, free, 5 per day. Returns a receipt_id + verify_url.

  • 🧾 verify_receipt: check an OilFlow screening receipt someone handed you, and see exactly what it did and did not cover.

  • πŸ”‘ request_sandbox_key: mint a free 30-day key (with the end user's consent) to unlock the rest.

With a key:

  • πŸ›‘οΈ kyc_screen β€” counterparty KYC: cluster-blocklist + regulatory tradability + the 7-step pipeline (8-list sanctions screening; PEP is NOT screened)

  • 🌍 regulatory_check / regulatory_countries / regulatory_products β€” "can I trade X from country A?" across the 235-jurisdiction regulatory matrix

  • 🚩 cluster_check / clusters_list β€” look up a counterparty against the first-party-investigated Scam Cluster Intelligence Feed

  • πŸ“„ lc_validate β€” Letter-of-Credit discrepancy detection against UCP 600

  • πŸ•ΈοΈ ubo_screen / ubo_graph β€” beneficial-ownership graph traversal + shell-company pattern flags

  • ⚑ predeal_check β€” sub-30s pre-deal clearance probability + restructure suggestion for a proposed physical-commodity deal

Every tool is a thin passthrough to the OilFlow API. Results are decision-support for a compliance professional, not legal advice; cluster suspected rows are publicly reported leads, not OilFlow-confirmed fraud.

What this adds over a name-vs-list sanctions screen

Several MCP servers match a name against OFAC, EU, UK and UN lists, and some do it well. If a list match is all you need, use one of those. This server exists for the questions a list match does not answer in physical-commodity trade. Every row names the tool that answers it and the key tier that tool needs, so nothing here is a claim you cannot call.

Question an agent gets asked

A name-vs-list screen

This server

Is this name on a sanctions list?

Yes

Yes. kyc_screen checks 8 lists (OFAC SDN, OFAC Consolidated, UN, EU, UK HMT, Canada SEMA, Australia DFAT, Swiss SECO) and names the list per hit. Production key.

Is this counterparty in a known commodity-trade fraud cluster (mandate chains, impersonated majors)?

Out of scope

cluster_check / clusters_list query a first-party registry built from investigated cases. A suspected row is a publicly reported lead, not OilFlow-confirmed fraud. Sandbox key.

Can this product legally move from country A to country B?

Out of scope

regulatory_check answers from a 235-jurisdiction tradability matrix. Sandbox key.

Is a designated party sitting behind the owner chain?

Out of scope: it screens the name it was handed

ubo_screen applies the OFAC 50-percent rule to derived ownership. Coverage is partial and every result says so: there is no functioning US domestic beneficial-ownership registry after March 2025. Production key.

Should my principal proceed, and what is still unknown?

Out of scope

predeal_preview returns a clearance probability, a verdict tier, named blockers, evidence_gaps, and verdict_source (deterministic rules or model synthesis). No key, 5 per day.

Someone handed my principal a compliance receipt. Is it genuine, and what did it actually cover?

Out of scope

verify_receipt returns the receipt, its canonical payload and an HMAC-SHA256 signature. HMAC is symmetric, so the signature proves OilFlow issued that receipt unaltered and OilFlow re-verifies it at the public endpoint. It is not a check anyone can run without us, and the tool says so. No key.

Politically exposed persons (PEP)?

Some do

Not offered. The peps dataset is not indexed, coverage is sanctions_only, and every tool reports that. A politically exposed person who is not also designated is not flagged.

No SOC 2 report exists. Every output is decision-support for a compliance professional: not a clearance, and not legal advice.

Related MCP server: agentmail

Examples

Runnable agent integrations live in examples/:

examples/README.md lists what each one needs.

Install

npm install -g @oilflow/mcp-server
# or run on demand with npx (no install):
npx @oilflow/mcp-server

Requires Node β‰₯ 18.

Configure

The server reads two environment variables, and neither is required:

Variable

Required

Default

Notes

OILFLOW_API_KEY

no

none

An oilflow_... key. Without it the server still starts and the three keyless tools work. Get one at oilflow.us/dashboard, or a free 30-day sandbox key at oilflow.us/sandbox.

OILFLOW_BASE_URL

β€”

https://oilflow.us

Override only for self-hosted/staging.

Sandbox keys cover the regulatory and cluster tools. kyc_screen, ubo_screen, ubo_graph, lc_validate and predeal_check require a production key; called without one, they return api_key_required with how to get one, rather than failing.

Claude Desktop

Add to claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "oilflow": {
      "command": "npx",
      "args": ["-y", "@oilflow/mcp-server"],
      "env": {
        "OILFLOW_API_KEY": "oilflow_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
      }
    }
  }
}

Claude Code

claude mcp add oilflow --env OILFLOW_API_KEY=oilflow_xxx -- npx -y @oilflow/mcp-server

Any MCP client

The server speaks MCP over stdio. Launch oilflow-mcp (or npx @oilflow/mcp-server) as the server command. OILFLOW_API_KEY in its environment unlocks the keyed tools; without it the server still starts keyless.

Example prompts

Once connected, just ask your agent. No key needed for the first two:

  • "Should I be worried about a 50,000 MT EN590 cargo from Iraq to Kenya with an unfamiliar seller?" β†’ predeal_preview

  • "Someone handed me an OilFlow compliance receipt. Verify it and tell me what it actually covered." β†’ verify_receipt

With a key:

  • "Screen Acme Trading FZE in the UAE for an EN590 diesel deal." β†’ kyc_screen

  • "Can crude be exported from Venezuela?" β†’ regulatory_check

  • "Is 'Simar Chahal' in any known fraud cluster?" β†’ cluster_check

  • "Run a pre-deal check: buyer Acme, gasoil EN590 10ppm, origin UAE, destination Kenya, DLC at sight." β†’ predeal_check

  • "Validate this LC presentation against UCP 600." β†’ lc_validate

How it works

stdio MCP transport β†’ 13 tools β†’ the OilFlow REST API, with jittered exponential-backoff retry on 429/5xx (honoring Retry-After) and a 30s per-request timeout. Keyed tools call https://oilflow.us/api/v1/* with Bearer auth; the three keyless tools call the public endpoints and send no Authorization header at all. Tool output is a report about a third party: treat it as data, not as instructions. The full API contract is published at oilflow.us/openapi.yaml, and there is a remote Streamable-HTTP version of this server (no install) at oilflow.us/mcp.

Build from source

git clone https://github.com/oilflow-network/mcp-server.git
cd mcp-server
npm install
npm run build      # β†’ dist/
node dist/index.js                              # keyless
OILFLOW_API_KEY=oilflow_xxx node dist/index.js  # full surface

License

Apache-2.0 Β© OilFlow Network

Available Tools

13 tools
cluster_checkFraud-cluster screenA
Read-onlyIdempotent

Look up a counterparty name against OilFlow's first-party-investigated Scam Cluster Intelligence Feed. Returns any matches with a severity: 'confirmed' (OilFlow-verified fraud), 'likely', or 'suspected' (publicly reported but NOT first-party confirmed β€” treat as a lead, verify the cited source). matched:false means no hit, which is not by itself an exoneration.

Inputs: entity (required), country.

clusters_listBrowse the fraud-cluster feedA
Read-onlyIdempotent

List entries from the Scam Cluster Intelligence Feed, optionally filtered by severity, country, or date. Useful for browsing known fraud clusters. Severity 'suspected' rows are publicly reported leads, not OilFlow-confirmed.

Inputs: since, country, severity.

kyc_screenCounterparty KYC screenA

Run an OilFlow counterparty KYC screen: cluster-blocklist match, regulatory tradability, and the 7-step registration pipeline with 8-list sanctions screening (OFAC SDN, OFAC Consolidated, UN, EU, UK HMT, Canada SEMA, AU DFAT, Swiss SECO). PEP screening is NOT shipped β€” coverage is sanctions-only, so a politically exposed person who is not also designated will not be flagged; tell the user this. Sanctions/registration/asset/footprint steps run out-of-band and return as 'queued' with a poll_url. Returns a verdict (pass/review/fail) with per-check evidence. Decision-support for a compliance analyst, not a legal determination. Requires a production API key.

Inputs: company_name (required), country, product, directors, +1 more.

lc_validateLetter-of-credit check (UCP 600)A
Read-onlyIdempotent

Validate a Letter of Credit presentation (LC + commercial invoice + bill of lading) against UCP 600 rules. Returns discrepancies with severity, an overall recommendation (honor/inquiry/refuse), and the UCP 600 articles cited. Requires a production API key (sandbox keys get 403). Output is DRAFT decision-support for a documentary-credit examiner β€” not a legal opinion.

Inputs: bl (required), lc (required), invoice (required).

predeal_checkPre-deal clearance verdict (full)A

Run a Pre-Deal Compliance Copilot check for a front-office originator: a sub-30s clearance probability (0-100) and verdict tier (clear/review/heavy_friction/block) for a proposed physical-commodity deal, with blockers, a restructure suggestion, and an estimated post-restructure clearance. Runs cluster, regulatory, adverse-media, sanctions, and verified-profile primitives. The response is self-describing about its own reliability: verdict_source is "claude" for a full synthesis or "rule_based" when the deterministic fallback ran, and evidence_gaps lists evidence sources that could not be consulted for this verdict β€” surface both to the user rather than presenting the score bare. Decision-support that estimates how compliance is likely to treat the deal β€” not a clearance itself and not legal advice; carries a disclaimer in the response. Requires a production API key; use predeal_preview for a free verdict without one.

Inputs: product (required), origin_country (required), counterparty_name (required), counterparty_role (required), +4 more.

predeal_previewPre-deal clearance verdict (free)A

Run OilFlow's Pre-Deal Compliance check on a proposed physical-commodity deal and get a clearance probability (0-100) and verdict tier (clear/review/heavy_friction/block) with named blockers and a restructure suggestion. NO API KEY REQUIRED: this is the full verdict, not a teaser. QUOTA: 5 verdicts per caller per 24 hours; on exhaustion the error is demo_limit_reached, which means the free allowance is used up and NOT that OilFlow is down. Returns receipt_id and verify_url, so the user can hand anyone a signed record of the check, and verdict_source ("claude" = full synthesis, "rule_based" = deterministic fallback) plus evidence_gaps: relay both, because a score without them overstates its own confidence. REQUIRED INPUTS: counterparty_name, counterparty_role (buyer or seller), product and origin_country; the verdict endpoint rejects a call missing any of them, so ask the user for the missing one rather than guessing a side. Decision-support estimating how a compliance desk is likely to treat the deal. Not a clearance and not legal advice; the response carries a disclaimer, pass it on. For the keyed version with no daily cap and the full input set, use predeal_check.

Inputs: product (required), origin_country (required), counterparty_name (required), counterparty_role (required), +2 more.

regulatory_checkTrade tradability checkA
Read-onlyIdempotent

Check whether a given commodity can be supplied/bought from a given jurisdiction under OilFlow's 235-jurisdiction regulatory matrix. Returns allowed:true/false plus any blockers. Compiled regulatory guidance, not legal advice β€” confirm with the relevant national regulator before acting.

Inputs: country (required), product (required), listing_type.

regulatory_countriesList covered jurisdictionsA
Read-onlyIdempotent

List every jurisdiction covered by the OilFlow regulatory matrix (235 jurisdictions). Returns a count and the country list with slugs for use in regulatory_check.

Inputs: no named parameters.

regulatory_productsList product categoriesA
Read-onlyIdempotent

List the commodity/product categories the regulatory matrix recognizes (with their canonical labels), for use as the product argument to regulatory_check.

Inputs: no named parameters.

request_sandbox_keyRequest a free sandbox keyA

Mint a free 30-day OilFlow sandbox API key (100 calls/day) scoped to the regulatory matrix and cluster endpoints, emailed to the address supplied. NO API KEY REQUIRED, which is the point: this is how an agent running keyless gets its user onto the keyed tools. CONSENT: requires the END USER'S email address and must only be called with their knowledge and agreement, because OilFlow emails the key and may send product follow-ups. Do not supply an address the user has not asked you to use. Limits: 3 keys per IP/hour, 5 per email/day. The sandbox scope does NOT cover kyc, ubo, lc or the keyed predeal endpoint; use predeal_preview for a free verdict, or https://oilflow.us/pricing for production access. Once the key arrives, set OILFLOW_API_KEY in this server's environment and restart it.

Inputs: email (required), company, use_case.

ubo_graphFetch a UBO graphA
Read-onlyIdempotent

Fetch the status/result of a UBO graph build started by ubo_screen. Pass the graph_id returned when the screen was queued. Returns the graph nodes, ownership edges, aggregate risk, and flagged patterns once status is 'ready'.

Inputs: graph_id (required).

ubo_screenBeneficial-ownership screenA

Start a beneficial-ownership (UBO) graph traversal for an entity: walks ownership across registries, flags shell-company patterns, and screens nodes for sanctions exposure (8 lists; PEP is NOT screened). Applies the OFAC 50%-rule to derived ownership. Returns the cached graph immediately when available, otherwise a graph_id to poll with ubo_graph. Coverage caveat to pass on: there is no functioning US domestic UBO registry post-March-2025, so beneficial-ownership coverage is partial and every result says so. Flagged patterns are structural signals to review, not a verdict on any individual. Requires a production API key.

Inputs: root_entity_name (required), root_jurisdiction (required), force_refresh.

verify_receiptVerify a screening receiptA
Read-onlyIdempotent

Independently verify an OilFlow screening receipt. NO API KEY REQUIRED. Given a receipt id (a UUID, from receipt_id/verify_url on a verdict, or from a receipt the user was handed), returns the receipt, its canonical payload string and an HMAC-SHA256 signature, so the user's own auditor can check it without trusting OilFlow's server at audit time. receipt_type says which kind of record it is: a sanctions_screen carries the list set it checked, a predeal_verdict carries the pre-deal tier plus the depth at which it consulted sanctions data. Read coverage back to the user: sanctions-only means PEP screening is not shipped, so a politically exposed person who is not also designated will not be flagged. Use this whenever a user has been HANDED a compliance receipt and wants to know whether it is genuine and what it actually covered.

Inputs: receipt_id (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.3/5.0

    Scored across 13 tools

    Disambiguation4/5

    Most tools map cleanly to a distinct resource or workflow: pre-deal, KYC, regulatory matrix, cluster feed, LC, UBO, receipts, and keys. The only real ambiguity is predeal_preview vs predeal_check, which are the same core function split by API-key requirement, and cluster_check vs clusters_list, though names and descriptions differentiate lookup from browsing. Overall an agent can reliably select the right tool.

    Naming Consistency4/5

    The dominant pattern is domain_operation: predeal_preview, regulatory_check, cluster_check, kyc_screen, lc_validate, ubo_screen. A few tools break the pattern with verb-first names like verify_receipt and request_sandbox_key, and noun-only names like regulatory_countries, regulatory_products, clusters_list, and ubo_graph. It is not perfectly uniform, but the naming is still predictable and readable.

    Tool Count5/5

    13 tools is well within the ideal range for a compliance-focused API and each tool corresponds to a distinct endpoint or workflow. The set covers multiple compliance subdomains without feeling bloated, and the free/keyed pre-deal pair is intentional rather than redundant.

    Completeness4/5

    The major workflows are covered: pre-deal checks, receipt verification, regulatory matrix lookups, cluster intelligence, LC validation, and UBO screening with polling. A minor gap is that kyc_screen can return queued results with a poll_url but there is no dedicated MCP tool to poll KYC results, though agents can work around this via the URL.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      53 regulatory compliance evidence tools across 3 MCP servers for AI agents. MiCA authorization status, DORA evidence packs, stablecoin risk scoring (105+ tokens), macro intelligence (86 FRED series). Every response ECDSA-signed (ES256K), blockchain-anchored, audit-ready. Free tier, OAuth 2.0.
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Provides AI agents with compliance screening (OFAC sanctions, risk scoring, Know-Your-Agent) plus disposable email and SMS verification for OTPs, accessible via MCP tools, HTTP API, and CLI.
      10
      2
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Real-time OFAC and global sanctions screening for AI agents: screen crypto addresses, emails, websites, government IDs, and countries against OFAC SDN and 10+ sanctions/crime/risk lists, plus PEP screening, VPN detection, and IP geolocation. Hosted remote streamable-HTTP server at https://api.compliapi.com/mcp (anonymous tools/list; free API key or x402 pay-per-call).
      MIT