dominion-observatory-sdk (Python)
One-line agent behavioral telemetry for MCP servers, LangChain tools, AutoGen agents, and CrewAI workers. Feeds the Dominion Observatory, the only MCP scoring network that accepts agent-reported runtime data instead of static GitHub/registry signals.
Install
pip (recommended):
pip install dominion-observatory-sdk
Live on PyPI: https://pypi.org/project/dominion-observatory-sdk/
CDN alternative (single file, stdlib only, Python 3.9+):
curl -O https://sdk-cdn.sgdata.workers.dev/v1/observatory.py
Then drop observatory.py into your project and import from it directly.
Every CDN fetch fires anonymized adoption telemetry back into the Observatory.
Gateway Proxy (recommended)
Route any MCP server through Observatory for automatic trust verification:
from dominion_observatory import gateway_url
# Instead of connecting directly:
# url = "https://some-mcp-server.com/mcp"
# Route through Observatory:
url = gateway_url("https://some-mcp-server.com/mcp")
# Returns: "https://dominionobservatory.com/gateway/https%3A%2F%2Fsome-mcp-server.com%2Fmcp"
# Use this URL anywhere you'd use the original MCP server URL.
# Free trial: 50 calls/day per IP, no API key needed.
Works with Claude Desktop, LangChain, CrewAI, OpenAI Agents SDK, or any MCP client.
Usage
from dominion_observatory import report, check_trust, instrument, gateway_url
SERVER_URL = "https://my-mcp-server.example.com/mcp"
# 1. Route through gateway for trust-verified calls
trusted_url = gateway_url(SERVER_URL)
# 2. Fire-and-forget telemetry in a tool handler
report(
server_url=SERVER_URL,
success=True,
latency_ms=142,
tool_name="get_holidays",
)
# 3. Convenience wrapper: measures latency automatically
result = instrument(SERVER_URL, "get_holidays", lambda: do_work())
# 4. Read a trust score before delegating to another server
score = check_trust("https://some-other-mcp.example.com/mcp")
if score.found and (score.trust_score or 0) >= 70:
call_that_server()
What gets sent
Exactly these five fields, and nothing else:
| Field | Example |
|---|---|
server_url |
https://my-mcp-server.example.com/mcp |
success |
true |
latency_ms |
142 |
tool_name |
get_holidays |
http_status |
200 |
Not sent: query arguments, tool output, user IDs, IP addresses, auth tokens, or any other payload. This satisfies Singapore PDPA and IMDA's agentic AI transparency requirements, and is compatible with EU AI Act Article 12 logging.
Why this exists
5+ MCP scoring platforms already exist (Glama, Smithery, MCP Scorecard, Nerq, Zarq), but all of them score servers from the outside using GitHub and registry metadata. None of them observe what happens when an agent actually calls a tool. The Dominion Observatory is the only network that collects agent-reported, cross-ecosystem runtime behavior — the only data that ages into compounding value because it can't be backfilled.
Every install of this SDK is a permanent telemetry pipeline.
LangChain integration (v0.2.0)
Drop-in BaseCallbackHandler that reads Observatory trust scores before every
tool call and reports anonymized telemetry after. Complements
ComplianceCallbackHandler-style audit trails (LangChain #35691) and AIP-style
signed-intent kill switches (LangChain #36232) — those prove who acted;
Observatory answers is the tool misbehaving right now?
from langchain.agents import AgentExecutor
from dominion_observatory.langchain import ObservatoryTrustCallbackHandler
handler = ObservatoryTrustCallbackHandler(
tool_server_urls={
"web_search": "https://search.example.com/mcp",
"transfer_funds":"https://payments.example.com/mcp",
},
min_trust_score=40.0,
block_on_low_trust=True,
)
agent = AgentExecutor(..., callbacks=[handler])
Requires langchain-core>=0.3. Install separately; the base SDK has zero
runtime dependencies.
Observatory API
| Purpose | Endpoint |
|---|---|
| Report interaction | POST https://dominionobservatory.com/mcp (MCP JSON-RPC) |
| Trust score | GET https://dominionobservatory.com/api/trust?url=... |
| Global stats | GET https://dominionobservatory.com/api/stats |
License
MIT
Metadata
Release files for dominion-observatory-sdk 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dominion_observatory_sdk-0.5.0.tar.gz | 7.3 kB | Without provenance | Details for dominion_observatory_sdk-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dominion_observatory_sdk-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for dominion_observatory_sdk-0.5.0-py3-none-any.whl |
Total release size: 15.2 kB
Release files / dominion_observatory_sdk-0.5.0.tar.gz
| Download URL | dominion_observatory_sdk-0.5.0.tar.gz |
|---|---|
| Size | 7.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bd0707826ddfc107d82b37fb941d8f2cb7b7eb1772496dffe49366f8dba4ba57
|
|
BLAKE2b-256 checksum How to use checksums |
3181c7a321b261782d890482b0192e8671dc21ae9ce13cd5fc4cfb0bd344de41
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.2
|
Release files / dominion_observatory_sdk-0.5.0-py3-none-any.whl
| Download URL | dominion_observatory_sdk-0.5.0-py3-none-any.whl |
|---|---|
| Size | 7.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d57af7e0cb6cb1eb733d47e2e03f6df85b1a42c29e3828e0a1a5528391d8f07a
|
|
BLAKE2b-256 checksum How to use checksums |
98a5d04001970514aac44323def277e6d189453924afc0c7171febe00154f66c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.2
|
Security for dominion-observatory-sdk 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.