Openglass Mcp

io.github.federico2001由 GitHub 账号 federico2001 发布v0.2.0更新于 Oct 24, 2026

Look up any AI agent before you act; register, attest actions, run sealed sessions.

已验证Streamable HTTP可网页运行开发者工具安全与监控AI 与机器学习

概览

AI 生成的概览

让助手通过远程 OpenGlass 端点查询 AI 代理、注册代理、为其行为作证,并运行密封会话。

可以做什么
OpenGlass 是面向代理间交互的中立见证服务。通过远程 MCP 端点,助手可以在行动前查询代理、注册代理、为行为作证、运行密封会话,并验证生成的记录。项目还提供带版本的中立风险策略格式,用于把行为分为低、中、高风险,并提供 OpenTelemetry 与 LangChain 集成,为高风险 span 或工具调用开启见证。
适用场景
当助手需要与其他代理的交互留下独立、可验证的记录时值得添加,例如代理之间的见证谈判或采购订单。也适合希望按风险对代理行为分类、只对高风险行为作证的团队,或已经用 OpenTelemetry 或 LangChain 做埋点的代理。
运行要求
清单声明远程 streamable HTTP 端点为 mcp.openglass.glass,未声明认证、环境变量或请求头。若改为本地运行项目,需要 Docker Compose、带 pnpm 和 corepack 的 Node.js 以及 MongoDB;README 还提到 MONGODB_URI、ADMIN_EMAILS 以及仅管理员功能使用的 OG_ADMIN_SESSION_COOKIE。
安装前请注意
远程端点声明为无认证,请考虑发送给第三方服务的代理与行为数据。本地开发使用默认凭据,例如 MinIO 用户 openglass 和密钥 openglass-dev-secret,README 还演示用 curl -k 跳过 TLS 校验。管理员访问依赖 ADMIN_EMAILS,adoption-review 脚本可接收 OG_ADMIN_SESSION_COOKIE。注册代理和为行为作证会向服务写入记录。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Openglass Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.federico2001%2Fopenglass-mcp/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "openglass": {
      "type": "http",
      "url": "https://mcp.openglass.glass/mcp"
    }
  }
}

README

OpenGlass

A neutral witness for agent-to-agent interactions. See docs/SPEC.md and CLAUDE.md.

Run locally

sh
docker compose up --build -d --waitcurl -k https://localhost/health     # {"status":"ok","checks":{"mongo":"ok","s3":"ok"}}

Caddy serves https://localhost with a certificate from its internal CA. -k skips verification. To trust the CA instead:

sh
docker compose cp caddy:/data/caddy/pki/authorities/local/root.crt ./caddy-root.crtcurl --cacert caddy-root.crt https://localhost/health
ServiceURLNotes
webhttps://localhost/Next.js
apihttps://localhost/health, /v1/*Fastify. Runs migrate on every start.
mcphttps://localhost/mcp
mongomongodb://localhost:27017/openglass?directConnection=truemongo:7, single-node replica set rs0
miniohttp://localhost:9001 (console)bucket openglass-records, Object Lock on. User openglass / openglass-dev-secret.
mailpithttp://localhost:8025Catches all outgoing email

MinIO no longer publishes official images, so compose uses the maintained community build pgsty/minio, pinned to a release.

See it in action

examples/witnessed-negotiation is a runnable, end-to-end demo: two agents register, get claimed, negotiate a purchase order over a witnessed session, close it, and independently verify the resulting record — against the real API, not a mock. See examples/README.md.

Risk policy

/spec/openglass-policy is a small, versioned, vendor-neutral YAML format for classifying an agent's action as low/medium/high risk — deciding when an action is worth a witnessed record, separate from the attestation mechanism itself (docs/SPEC.md §12). Reference evaluators: core-js (@openglass/core) and core-py (openglass-core), kept in sync by a shared set of test vectors. See docs/POLICY.md for the guide.

Integrations

otel-js/otel-py (openglass-otel) plug into an already-OpenTelemetry-instrumented agent: a SpanProcessor reads GenAI spans, classifies each against an openglass-policy, and opens an attestation for the risky ones — no OpenGlass-specific code in the agent itself. See examples/otel-integration for a runnable demo. langchain-py (openglass-langchain) does the same for LangChain tool calls via a BaseCallbackHandler — see examples/langchain-integration. /integrations/_template is the starting point for a new framework-specific integration, including the conformance tests every integration must pass.

The public /integrations page is the request board: a card per framework (from a static catalog, apps/api/data/integrations.yaml), voting and a request form (gated on the existing owner login, not GitHub OAuth — see the PR that added this for why), and an admin view at /integrations/admin to update status. Admin access needs the ADMIN_EMAILS env var set (comma-separated owner emails) — nobody is an admin until it is.

scripts/adoption-review.ts is a runnable report over that board's live data (vote leaderboard, the 3 frameworks to prioritize next, new requests) — run it yourself or from your own cron, whenever you want it, rather than it running unattended:

sh
node --experimental-strip-types scripts/adoption-review.ts# optionally: OG_ADMIN_SESSION_COOKIE="og_session=..." to include the request queue (admin-only)

Develop and test

sh
corepack enablepnpm installpnpm -r buildpnpm -r typecheckpnpm -r test          # starts a throwaway mongo:7 container (needs Docker)

Same tests, different MongoDB

The database is configured by MONGODB_URI and nothing else. With MONGODB_URI unset, the tests start a throwaway mongo:7 container. With it set, they run against that server instead. Each test file uses its own og_test_<random> database and drops its collections afterwards.

sh
# the local compose MongoMONGODB_URI='mongodb://localhost:27017/openglass?directConnection=true' pnpm -r test
# an Atlas free-tier cluster: only the URI changesMONGODB_URI='mongodb+srv://<user>:<password>@<cluster>.mongodb.net/openglass?retryWrites=true&w=majority' pnpm -r test

For the Atlas run:

  • The database user needs readWriteAnyDatabase and dbAdminAnyDatabase. Tests create per-file databases, and migrate runs collMod to set validators.
  • Your IP must be on the cluster's access list.

The production app user only needs readWrite and dbAdmin on the openglass database.

Schema changes

  • Collections are defined in packages/db/src/models. Each has a Zod model, a $jsonSchema validator generated from that model, and named indexes. migrate applies all of them idempotently on api start, under a lock.
  • Data changes go in versioned scripts: pnpm --filter @openglass/db migration:create <name>, which writes to packages/db/migrations.

Deploy

main is built, pushed to ECR and deployed to a single EC2 instance by .github/workflows/deploy.yml. The AWS resources and first-time setup are in infra/README.md.

来源:README.md,提交 dd55cf9

工具

14

register_agent

Register agent

Register yourself as a new OpenGlass agent. Use this once, the first time you want to run a witnessed session with another agent — OpenGlass is a neutral third party that hash-chains, signs, and countersigns every message in a session so both sides' human owners get an independently verifiable record afterward. Before calling this: generate your own Ed25519 keypair locally (never send the private key anywhere, including to this tool) and sign this request yourself (SPEC §4.1) using that key, with `auth.kid` set to the literal "new" — the server verifies the signature against the `publicKey` you're registering, proving you hold it. The response includes a claim URL: show it to your human owner so they can claim you — you can't start a session until you're claimed (poll `verify_agent` with your own agentId, or just retry start_session, which returns agent_unclaimed until then).

输入参数auth必填metaname必填publicKey必填description必填

start_session

Start a witnessed session

Offer a witnessed session to another agent (POST /v1/sessions). You must be claimed already (see register_agent). Build and sign the `offer` yourself (SPEC §7.2, purpose "offer") — this tool only relays it. Set `offer.counterparty` to a known agentId for a direct invite, or omit it (null) for an open, bearer-token invite anyone with the link can accept. If you already know the counterparty's agentId, prefer invite_counterparty instead — it does the same thing plus a pre-flight check that the agent actually exists and is active, so you don't offer a session into the void.

输入参数auth必填offer必填visibilityofferSignature必填

invite_counterparty

Invite a known counterparty to a session

Convenience wrapper around start_session for the common case: you already know the other agent's id and want to offer them a session directly. Does a pre-flight GET /v1/agents/{id} check (that the counterparty exists and is active) before submitting the offer, so you get a clear error instead of a session nobody can ever accept. `offer.counterparty` must be set (not an open invite — use start_session for that). Same signing requirements as start_session: you build and sign the offer yourself.

输入参数auth必填offer必填visibilityofferSignature必填

accept_invite

Accept a session invite

The other half of start_session/invite_counterparty: accept an invite addressed to you (direct) or bearer a token for (open). `mode: "prepare"` (auth = a signed GET of the invite; pass `token` for open invites) returns the offer and its offerHash so you know exactly what to build and sign next. `mode: "submit"` (auth = a signed POST) then submits your signed Accept (SPEC §7.2, purpose "accept"), which activates the session. Before accepting, consider calling verify_agent with the initiator's agentId to confirm they're a real, active, claimed agent — the prepare response includes their public profile for exactly this.

输入参数auth必填mode必填tokenacceptinviteId必填signature

send_message

Send a witnessed message

Append a signed, hash-chained message to an active session (POST /v1/sessions/{id}/messages). Two modes: `mode: "prepare"` (auth = a signed GET of the session) returns the current head (seq/prevHash) so you know exactly what to build and sign next — always do this first unless you're already certain of the head, since a stale seq/prevHash is rejected with chain_conflict. `mode: "submit"` (auth = a signed POST) then appends your envelope/hash/signature/payload. Build the envelope, its hash, and its signature yourself per SPEC §7.3 — this tool only relays them.

输入参数auth必填hashmode必填payloadenvelopesessionId必填signature

pause_session

Pause a session for the owner's review

Pause your own active session (POST /v1/sessions/{id}/pause) rather than sending the next message or closing outright — e.g. before agreeing to a price, a legal term, or anything else you want a human to weigh in on first. Blocks further send_message calls (session_not_active) until the session's owner (either participant's) resumes or declines it from the OpenGlass dashboard. There's no way to un-pause it yourself — that's the point.

输入参数auth必填reason必填sessionId必填

close_session

Close a witnessed session

Close an active session (POST /v1/sessions/{id}/close), which starts record issuance — the platform builds the evidence bundle, signs a record, and both owners can retrieve it afterward. `mode: "prepare"` (auth = a signed GET) returns the current head to close at. `mode: "submit"` (auth = a signed POST) submits your signed CloseStatement, built per SPEC §7.4.

输入参数auth必填mode必填sessionId必填signaturestatement

get_record

Get a session's record

Fetch the signed record for a closed session (GET /v1/records/{id}, or the full downloadable verification bundle with `bundle: true`). Only the two participant agents and their owners can read a record. If you don't have the recordId, read it off the session (GET-via-send_message's prepare mode returns the session, which includes `recordId` once status is "closed").

输入参数auth必填bundlerecordId必填

open_attestation

Open a one-party attestation

Log something your agent itself did — a high-risk tool call, a decision — with no counterparty to invite or accept (SPEC §12). Build and sign an `open` (AttestationOpen, purpose "attestation_open") yourself; this tool only relays it (POST /v1/attestations). Unlike start_session, this activates immediately: there's no invite, no accept, nothing to wait on. `open.attestor` must be your own claimed agentId/kid. The resulting record can still be fetched and verified with get_record/verify_agent exactly like a session's, once closed.

输入参数auth必填open必填visibilityopenSignature必填idleTimeoutSec

send_attestation_event

Append an event to an attestation

Append a signed, hash-chained event to your own active attestation (POST /v1/attestations/{id}/events) — the one-party counterpart to send_message. Same two modes: `mode: "prepare"` (auth = a signed GET of the attestation) returns the current head so you know exactly what to build and sign next; `mode: "submit"` (auth = a signed POST) then appends your envelope/hash/signature/payload. Build them yourself per SPEC §7.3/§12 — this tool only relays them. The sender is always your own attestor key; there's no counterparty to pin against.

输入参数auth必填hashmode必填payloadenvelopesignatureattestationId必填

close_attestation

Close an attestation

Close your own active attestation (POST /v1/attestations/{id}/close), which starts record issuance exactly like close_session. `mode: "prepare"` (auth = a signed GET) returns the current head to close at. `mode: "submit"` (auth = a signed POST) submits your signed CloseStatement, built per SPEC §7.4/§12.

输入参数auth必填mode必填signaturestatementattestationId必填

lookup_agent

Check who you're about to talk to

Realignment R2 (SPEC §14): look up a counterparty BEFORE accepting an invite or offering a session with them — no signing, no auth, free. Pass exactly one of agentId, domain, agentCardUrl, or publicKey. For a registered agent, returns whether it's claimed, its verified domain (if any), activity facts (sessions/attestations in the last 90 days — only counting counterparties that are themselves domain-verified, so these numbers are conservative by design, not a popularity score), open disputes, and flags (new agent, unverified domain, recently rotated key). For an unregistered one, returns whatever public signals exist (its A2A agent card if fetchable, an MCP Registry entry, domain age) plus an invite URL you can pass along. This is informational — decide what an unverified or new counterparty means for your own situation; this tool never tells you to block or refuse anyone.

输入参数domainagentIdpublicKeyagentCardUrl

verify_agent

Verify a counterparty or a record bundle

Two independent checks, pick one: pass `agentId` to look up a counterparty's public profile before trusting them (confirms they're registered and claimed — do this before accepting an invite from someone you don't already know). Or pass `bundle` (a full record bundle, e.g. from get_record with bundle=true) to independently re-run the full cryptographic verification (SPEC §7.6) against OpenGlass's own trusted platform keys — this is a public check, no signing required, and is exactly what a court or auditor could run themselves without trusting OpenGlass's word for it.

输入参数bundleagentId

register_counterparty

List a counterparty that isn't on OpenGlass

SPEC §16: when the agent you're dealing with isn't registered on OpenGlass (lookup_agent returned registered: false), list it as an unclaimed profile so its operator has a page to find and claim, and your owner sees it among your counterparties. Pass exactly one of `domain`, `agentCardUrl`, or `agentCard` (its A2A agent card as you received it), and sign the request body as `{ <that one field> }` (POST /v1/profiles/unclaimed). OpenGlass fetches the card itself and stores only its URL and hash, never what you send about it. Requires a claimed agent. Returns 409 already_registered (with details.agentId) when an agent on OpenGlass already claims that domain.

输入参数auth必填domainagentCardagentCardUrl

版本历史

2
  1. v0.2.0最新Sep 29, 2026
  2. v0.1.0Sep 25, 2026

评分

已满足适用检查项的 100%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分