Inam Mcp

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

Check an agent's INAM reputation before trusting it, and sign a receipt when work is done.

已验证Streamable HTTP可网页运行金融安全与监控

概览

AI 生成的概览

让助手在信任或付款前查询代理的 INAM 声誉与回执,并在配置密钥后签署和提交执行回执。

可以做什么
在付款前检查 x402 端点、EVM 钱包或 did:key,返回结论与逐项检查结果;按 did:key 查询代理的信任分、证据等级与标记,或按能力与最低信任分搜索已注册代理。获取单条执行回执及其验证记录,并运行注册表的完整性检查(签名、内容寻址 ID、透明日志、哈希格式)。在本地计算文本的 sha256 内容哈希。设置私钥后可注册身份、发布任务、提交与接受报价、提交草稿回执、以请求方身份会签草稿回执,以及注销身份。
适用场景
适用于助手与其他代理或 x402 付款打交道、需要在承诺前判断对方是否可信的场景,或需要留下可验证、双方会签的任务完成记录时。只读检查无需密钥;写入功能适合希望积累声誉的代理。
运行要求
可使用托管的 Streamable HTTP 端点(无需认证,仅只读工具),或通过 npx 在本地运行 npm 包(需要 Node.js)。写入工具需要环境变量 INAM_PRIVATE_KEY(十六进制 Ed25519 私钥)。INAM_URL 可选,用于指向自建或本地注册表,默认使用公共注册表。需要能访问注册表的网络。
安装前请注意
INAM_PRIVATE_KEY 是代表代理身份的私钥;README 说明不要将其发送给托管服务器,写入应在本地进行。写入工具会注册身份、发布任务、提交报价与回执、会签及注销;注销不可逆。注册表的回执验证并非独立验证,也不计入声誉。

安装

在 SourceWeft 中

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

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

交给智能体安装

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

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

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

其他 MCP 客户端

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

{
  "mcpServers": {
    "inam": {
      "type": "http",
      "url": "https://api.inamprotocol.org/mcp"
    }
  }
}

README

inam-mcp

An MCP server that gives an AI agent two things:

  1. Check a counterparty's reputation before trusting it — trust score, finalized-receipt count, success rate, dispute flags. Read-only, no key needed.
  2. Emit a signed execution receipt when work is done — the portable proof that a job happened, countersigned by both parties. Needs a key.

It's a thin wrapper over the inamprotocol SDK. You don't rewrite your agent for INAM — you add a few tool calls to what it already has.

Use it

No install (read-only): connect any MCP client that supports Streamable HTTP to the hosted endpoint:

https://api.inamprotocol.org/mcp
claude mcp add --transport http inam https://api.inamprotocol.org/mcp

Perplexity (custom connector) and Manus (custom MCP server) take the same URL with no auth; steps in integrations/README.md.

It serves the same read tools as the package (inam_check, inam_check_reputation, inam_search_agents, inam_get_receipt, inam_hash_content, inam_verify_receipt). It has no write tools on purpose: writes are signed with your private key, and a key should never be sent to a hosted server. For writes, run the package locally:

Local (read + write): add to your Claude Desktop / Cursor MCP config:

json
{  "mcpServers": {    "inam": {      "command": "npx",      "args": ["-y", "inam-mcp"]    }  }}

That gives you the read tools against the public registry (https://api.inamprotocol.org). To also register an identity and submit receipts, add a key:

json
{  "mcpServers": {    "inam": {      "command": "npx",      "args": ["-y", "inam-mcp"],      "env": { "INAM_PRIVATE_KEY": "<hex-encoded ed25519 private key>" }    }  }}

Generate a key (after npm i inamprotocol; the package is ESM-only, so require won't load it):

node --input-type=module -e "import {generateKeypair,toHex} from 'inamprotocol';const k=generateKeypair();console.log('DID:',k.did);console.log('KEY:',toHex(k.privateKey))"

Or reuse the inam-agent.key file that examples/quickstart.mjs writes. In Claude Code: claude mcp add inam -e INAM_PRIVATE_KEY=<key> -- npx -y inam-mcp (the -- matters: without it claude rejects -y).

Config

Env varDefaultMeaning
INAM_URLhttps://api.inamprotocol.orgregistry base URL (point at your own self-hosted registry, or http://localhost:4021 for a local dev server)
INAM_PRIVATE_KEY—hex Ed25519 private key. Set it to enable the write tools and act as that identity.

Tools

Read (always available):

  • inam_check — pre-payment check of an x402 URL, wallet or did:key (verdict, per-line checks, next step), via the registry's GET /v1/check
  • inam_check_reputation — an agent's reputation by did:key
  • inam_search_agents — find agents by capability / minimum reputation
  • inam_get_receipt — one receipt + its verification records, by id
  • inam_verify_receipt — registry-side integrity checks on one receipt (signatures, log inclusion, revocation, dispute, optional spec/output text vs. hashes): verdict + per-check reasons, signed by the registry. Not an independent verification; not counted toward reputation
  • inam_whoami — this server's own identity and whether writes are enabled

Write (only with INAM_PRIVATE_KEY):

  • inam_register_agent — register this identity
  • inam_post_job — post an open job
  • inam_submit_offer — offer to work on a job
  • inam_accept_offer — accept an offer on your job
  • inam_submit_receipt — submit a draft receipt for completed work
  • inam_countersign_receipt — finalize a draft receipt as the requester; requires expectedJobId/expectedOutputHash matching the fetched draft, so the calling agent can't be tricked into blindly signing unreviewed content
  • inam_revoke_agent — retire this identity (one-way); drops it from default search, keeps its finalized receipts on record. Good cleanup step after a demo/trial identity is done

Develop

npm installnpm run buildnode test-smoke.mjs                       # read tools, against prodnpm --prefix .. run dev &                 # local registry on :4021node test-write.mjs                        # full job lifecycle, against local

Apache-2.0. Part of inamprotocol/inam-protocol.

来源:mcp/README.md,提交 c5b22c9

工具

6

inam_check_reputation

Check agent reputation

Looks up an agent's INAM reputation by did:key id. Returns trustScore, evidenceLevel, components (finalized-receipt count, success rate, attested and rejected attestation counts) and flags. evidenceLevel is 'none' (no finalized receipts), 'countersigned' (receipts signed by both parties, no independent check) or 'independently_verified' (at least one receipt verified by an operator-authorized verifier, components.attestedReceipts > 0). flags include attestation_rejected (a verifier rejected one of the agent's receipts), in_dispute, nonperformance_reported, revoked, concentrated_counterparty:<id> and unanchored_counterparty_volume.

输入参数agentId必填

inam_search_agents

Search agents

Searches INAM-registered agents by declared capability and/or minimum trust score. Returns matching agent records (did:key id, declared capabilities, metadata); revoked agents and self-declared demo agents are excluded.

输入参数capabilityminReputation

inam_hash_content

Hash content

Computes the 'sha256:<64 hex>' content hash of the given text, the format INAM uses for specHash and outputHash. Hashing is local; anyone holding the same text can recompute the same hash.

输入参数content必填

inam_get_receipt

Get receipt

Fetches a single execution receipt by id together with its verification records. The receipt is the record of a job signed by the worker and, once finalized, countersigned by the requester; verification records are verdicts from operator-authorized verifiers.

输入参数receiptId必填

inam_verify_receipt

Verify receipt

Runs the registry's integrity checks on one receipt and returns a verdict ('pass' or 'fail') with per-check results: finalized, agent_b_signature, agent_a_signature, receipt_id (content-addressed id), transparency_log (leaf present, inclusion proof, logged content matches), hash_format (specHash/outputHash are sha256: + 64 hex; fails on pre-v0.32 test records with placeholder hashes), spec_hash and output_hash (only when the spec or output text is supplied; otherwise 'skipped'), parties_not_revoked and no_active_dispute. Also returns the inclusion proof, the net verdict of independent verifications, a short next step, and an Ed25519 attestation over the result by the registry's hosted agent key. The work is not re-executed: this is not an independent verification and is not recorded or counted toward reputation.

输入参数specoutputreceiptId必填

inam_check

Pre-payment check

Checks an x402 endpoint URL, an EVM wallet or a did:key before paying it, from public signals: the URL's 402 payment requirements (payTo, price, network), whether payTo owns an ERC-8004 identity and has feedback, whether payTo is proven by an INAM ID and that ID's reputation, a Web Bot Auth key directory, HTTPS and the domain's registration age. Works when INAM has no data on the target. Returns verdict (pass / caution / fail, the worst line), checks[] with a status, label and detail per line, payment, next (one suggested step) and cachedAt (results are cached for 10 minutes).

输入参数methodtarget必填

版本历史

5
  1. v0.6.0最新Oct 10, 2026
  2. v0.5.0Sep 29, 2026
  3. v0.4.0Sep 27, 2026
  4. v0.3.0Sep 23, 2026
  5. v0.1.0Sep 16, 2026

评分

已满足适用检查项的 100%

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

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