PEAC Protocol: Signed interaction receipts

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

Portable signed records for agent, API, MCP, and cross-runtime interactions.

发布方自己的服务:Signed

已验证STDIO仅桌面开发者工具安全与监控

概览

AI 生成的概览

本地 MCP 服务器,用于 PEAC 签名交互记录,让助手验证、检查、解码、签发并打包可移植的签名回执。

可以做什么
  • 按策略和公钥验证 PEAC 签名交互记录
  • 在不验证的情况下检查记录,并解码回执 JWS 头部与载荷以做诊断
  • 在配置签发密钥与签发者标识后,根据提供的声明签发新的签名记录
  • 在配置打包目录后,用签名记录及相关产物创建证据包
  • 返回带错误码、恢复提示和审计元数据块的结构化输出
适用场景
当智能体或 LLM 应用需要校验、解码或生成可移植的交互签名记录时适用,例如确认回执真实性,或为后续审计自行签发回执。
运行要求
以 npm 包形式在本地通过 stdio 运行(也可选用本地 Streamable HTTP,默认端口 3000、绑定 127.0.0.1)。需要 Node.js 与 npx。只读工具无需任何配置;签发需通过签发密钥选项(环境变量或文件引用)提供 Ed25519 签名密钥并给出签发者标识,打包还需指定输出目录。
安装前请注意
签发与打包需要私钥;服务器声明不做隐式密钥发现,密钥必须显式提供并妥善保护。签发记录和写入证据包会在磁盘上产生数据。HTTP 传输默认仅绑定本机并拒绝所有 CORS;修改绑定地址、CORS 来源或代理信任设置会扩大暴露面。

安装

在 SourceWeft 中

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

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

@peac/mcp-server

Local MCP server for PEAC signed interaction records. It exposes tools to verify, inspect, decode, issue, and bundle PEAC records through stdio or the local Streamable HTTP transport.

Installation

bash
pnpm add @peac/mcp-server

Or run directly:

bash
npx @peac/mcp-server

What It Does

@peac/mcp-server exposes PEAC signed interaction record operations as Model Context Protocol (MCP) tools that AI agents and LLM-based applications can call. It supports both stdio and Streamable HTTP transports, with static policy checks, concurrency limits, input size guards, and structured error responses with recovery hints.

How Do I Use It?

Add to Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

json
{  "mcpServers": {    "peac": {      "command": "npx",      "args": ["-y", "@peac/mcp-server"]    }  }}

Add to Cursor or Windsurf

Add to .mcp.json at your project root:

json
{  "mcpServers": {    "peac": {      "command": "npx",      "args": ["-y", "@peac/mcp-server"]    }  }}

Streamable HTTP transport

bash
npx @peac/mcp-server --transport http --port 3000

HTTP transport provides per-session isolation, rate limiting, and RFC 9728 PRM discovery. Binds to 127.0.0.1 by default. See examples/mcp-http-quickstart/ for an end-to-end demo.

Enable receipt issuance

bash
npx @peac/mcp-server \  --issuer-key env:PEAC_ISSUER_KEY \  --issuer-id https://example.com

Start with HTTP transport

bash
npx @peac/mcp-server --transport http --port 3000

CLI options

FlagDescriptionDefault
--transport <type>Transport: stdio or httpstdio
--port <number>HTTP port3000
--host <address>HTTP bind address127.0.0.1
--issuer-key <ref>Issuer key reference (env:VAR or file:/path)None
--issuer-id <uri>Issuer identifier URINone
--policy <path>Policy configuration file pathBuilt-in default
--jwks-file <path>JWKS file for verifier key resolutionNone
--bundle-dir <path>Directory for evidence bundle outputNone
--cors-origins <list>Allowed CORS origins (comma-separated, HTTP only)None
--trust-proxy <value>Trust X-Forwarded-For (off, loopback, private)off

Programmatic usage

Handlers can be used directly without the MCP server binding:

typescript
import { createPeacMcpServer, handleVerify } from '@peac/mcp-server';import { getDefaultPolicy, computePolicyHash } from '@peac/mcp-server';
const policy = getDefaultPolicy();const policyHash = await computePolicyHash(JSON.stringify(policy));
const result = await handleVerify({  input: { jws: 'eyJ...', public_key_base64url: '...' },  policy,  context: {    version: '0.16.5',    policyHash,    protocolVersion: '2025-11-25',  },});

Available tools

ToolDescriptionAvailability
peac_verifyVerify a PEAC signed interaction record.Always
peac_inspectInspect a PEAC signed interaction record without verification.Always
peac_decodeDecode a PEAC receipt JWS header and payload for diagnostics.Always
peac_issueIssue a PEAC signed interaction record from provided claims.Requires --issuer-key and --issuer-id
peac_create_bundleCreate a PEAC bundle from signed records and related artifacts.Requires --issuer-key, --issuer-id, and --bundle-dir

All structured tool outputs include a schema-declared _meta audit block with serverVersion, policyHash, protocolVersion, and registeredTools. This is separate from the top-level MCP _meta carrier used by @peac/mappings-mcp to attach PEAC receipt references.

Integrates With

  • @peac/protocol (Layer 3): signed-record issuance and verification
  • @peac/crypto (Layer 2): JWS signing and decoding
  • @peac/schema (Layer 1): Receipt schema validation
  • @peac/kernel (Layer 0): Error codes and constants
  • @modelcontextprotocol/sdk: MCP server and transport bindings

For Agent Developers

Connect your agent to this server over stdio or HTTP to gain signed-record verification, receipt decoding, and issuance capabilities. The tools use structured outputs with error codes and next_action recovery hints so your agent can handle failures programmatically. Every response includes _meta for audit and traceability.

Read-only tools (peac_verify, peac_inspect, peac_decode) are available with no configuration. To enable issuance, provide an Ed25519 signing key via --issuer-key and --issuer-id.

For Operators

The server applies static policy checks with configurable concurrency limits, input size bounds, JWS size caps, and tool timeouts. HTTP transport binds to localhost by default with CORS deny-all. The stdout fence prevents non-JSON-RPC output from corrupting the stdio transport.

Security properties: no ambient key discovery (keys must be explicitly provided), no implicit network fetches from tool handlers, path traversal prevention on bundle output, and session isolation on HTTP transport.

License

Apache-2.0


PEAC Protocol is an open source project stewarded by Originary and community contributors.

Docs | GitHub | Originary

来源:packages/mcp-server/README.md,提交 92956eb

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.15.0最新Sep 16, 2026

评分

已满足适用检查项的 50%

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

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

其他 Signed 集成