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.3

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.3
File Size Uploaded
openom_mcp-0.1.3.tar.gz 48.9 kB Details

Built distribution (wheel)

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

Total release size: 82.7 kB

Release files / openom_mcp-0.1.3.tar.gz

Download URL openom_mcp-0.1.3.tar.gz
Size 48.9 kB
Tags Source
SHA-256 checksum
How to use checksums
61fe640d4b1e5beaa5248c5f6310dc1e78d9e5360140d79f03d2eac24fd3a250
BLAKE2b-256 checksum
How to use checksums
ea4a025872664019fec2d79d77cb98a68e1f7e1b1a808a5ee9f8c4b1b4d68ea3
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.3-py3-none-any.whl

Download URL openom_mcp-0.1.3-py3-none-any.whl
Size 33.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2c15be2e38d80d915733fb3405c258207c1248b0cf8b1bf6ea52f463493966ed
BLAKE2b-256 checksum
How to use checksums
b273658004b420a2b47cff0e4f2d2e3ca432a223bc88e4c81cfc890f2cee3c22
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

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

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