Skip to main content

openom-mcp

A thin, deterministic FastMCP server over openom-core - six data verbs, zero inference: om_inspect · om_extract_text · om_extract_images · om_read · om_validate · om_embed, plus one hosted-transport helper om_request_upload (reserves a presigned upload target; HTTP transport only). So tools/list reports seven tools. Two transports: stdio (om-mcp) and hosted Streamable HTTP (om-mcp-http, SSRF-guarded, rate-limited, untrusted-parse-isolated).

pip install openom-mcp           # depends on openom-core (also from PyPI)
# from a clone (openom-core is not yet on PyPI): install core first, then mcp:
pip install -e ./core && pip install -e "./mcp[dev]"

Connect it to an MCP client (stdio)

Add to your client's MCP config (e.g. Claude Desktop claude_desktop_config.json, or any mcp.json):

{
  "mcpServers": {
    "openom": { "command": "om-mcp" }
  }
}

Hosted HTTP

om-mcp-http serves Streamable HTTP at the /mcp path (e.g. http://127.0.0.1:8080/mcp). By default it binds loopback (127.0.0.1:8080) - safe out of the box, not a world-open server. The free public grounding endpoint at https://mcp.openom.app/mcp is a serverless Cloudflare Worker (/mcp-worker) exposing the read-side om_read + om_validate via the byte-parity /js core; run om-mcp-http yourself for the full six-tool surface (extract/embed/inspect). Two-tier validation: schema errors block, consistency warnings never do; market truth is out of scope.

Tool inputs. The PDF-taking tools (om_inspect/om_read/om_extract_*/om_embed) accept a pdf object that is exactly one of: {"path": "..."} (stdio, a local file), {"url": "https://..."} (HTTP transport, fetched under the SSRF rules), or {"blobId": "..."} (HTTP, a prior om_request_upload). om_validate takes a payload object.

Stability. The seven-tool surface + result shapes are versioned with the spec (specVersion 0.1); the om_read/om_validate shapes match the public Worker ([Ma9]). Breaking tool-surface changes ship under a new spec minor. See the repo spec/CHANGELOG.md.

Configuration (env)

Every knob is an environment variable; defaults are safe for local use:

Variable Default Meaning
OPENOM_MCP_HOST 127.0.0.1 Bind address. Set 0.0.0.0 to expose publicly.
OPENOM_MCP_PORT 8080 Bind port.
OPENOM_MCP_DNS_REBINDING auto Host/Origin DNS-rebinding defense. Auto-ON when bound to a non-loopback host.
OPENOM_MCP_ALLOWED_HOSTS (empty) Comma-separated Host allowlist (set this when binding publicly).
OPENOM_MCP_ALLOWED_ORIGINS (empty) Comma-separated Origin allowlist.
OPENOM_MCP_RATE_LIMIT / _WINDOW 120 / 60 Per-principal request cap per window (seconds).
OPENOM_MCP_MAX_FETCH_BYTES 209715200 Cap on fetched PDF size (SSRF/DoS guard).
OPENOM_MCP_MAX_PAGES (unset) Per-call page ceiling for extraction.
OPENOM_MCP_LOG - Log level.

When you bind publicly (0.0.0.0) always set OPENOM_MCP_ALLOWED_HOSTS/_ORIGINS - the server logs a warning if you don't.

Production backends (env-selectable):

Variable Default Meaning
OPENOM_MCP_BLOB_BACKEND local r2 uses Cloudflare R2/S3 (needs OPENOM_R2_BUCKET, OPENOM_R2_ENDPOINT, OPENOM_R2_ACCESS_KEY, OPENOM_R2_SECRET_KEY; boto3 extra).
OPENOM_MCP_LIMITER memory redis uses a shared Redis so multiple replicas enforce one global limit (needs OPENOM_REDIS_URL; a redis-py-compatible client).

(Both boto3 and redis are imported lazily - neither is a hard dependency.) For anything further, build_http_app(...) accepts blob_store / rate_limiter injections directly.

Grounding an AI agent

Treat an openOM payload as the broker's asserted opinion, not fact: attribute every figure to assertedBy as of assertedDate, don't use a payload whose verification.hashValid isn't true, and never present an OM figure as verified truth (an OM is an advertisement / opinion of value). The full guide - MCP config, tool usage, and a system-prompt snippet - is Grounding AI agents in openOM (served at …/openom/docs/grounding-ai.html).

Tests: pytest mcp -q.

Release files for openom-mcp 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for openom-mcp 0.1.0
File Size Uploaded
openom_mcp-0.1.0.tar.gz 45.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for openom-mcp 0.1.0
File Interpreter ABI Platform
openom_mcp-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 77.1 kB

Release files / openom_mcp-0.1.0.tar.gz

Download URL openom_mcp-0.1.0.tar.gz
Size 45.4 kB
Tags Source
SHA-256 checksum
How to use checksums
060a43755f0594df8d71f2f084d1d62d0169177ce9a071eb56c4a76bca589989
BLAKE2b-256 checksum
How to use checksums
67893512d658fb7224fff4f3e8816857a167bac25caff02344dafab1a7e0ec1a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.7

Release files / openom_mcp-0.1.0-py3-none-any.whl

Download URL openom_mcp-0.1.0-py3-none-any.whl
Size 31.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4a11bb12897c6db6b85b37c2faa87b5996d72c14fe749c9e319d12c8fd0bc5bb
BLAKE2b-256 checksum
How to use checksums
7a45c1ebcb263cc46cc251d873ca32b0b1f5c8a2230d984173e009d95fba22c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.7

Release history Release notifications | RSS feed

0.1.5

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page