惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 三生石上(FineUI控件)
U
Unit 42
人人都是产品经理
人人都是产品经理
罗磊的独立博客
Recent Announcements
Recent Announcements
云风的 BLOG
云风的 BLOG
aimingoo的专栏
aimingoo的专栏
T
Tailwind CSS Blog
GbyAI
GbyAI
Blog — PlanetScale
Blog — PlanetScale
I
InfoQ
Last Week in AI
Last Week in AI
宝玉的分享
宝玉的分享
B
Blog RSS Feed
WordPress大学
WordPress大学
腾讯CDC
H
Help Net Security
博客园 - Franky
博客园 - 【当耐特】
博客园 - 聂微东
Stack Overflow Blog
Stack Overflow Blog
B
Blog
Vercel News
Vercel News
博客园 - 司徒正美

Hacker News: Show HN

PurrrrrFocus: Pomodoro Timer App - App Store Workflow Engine — Multi-Step Orchestration for Bun RapidPhoto: Pro Photo Editor App - App Store GitHub - DheerG/swarms: Achieve extraordinary results with claude code across a variety of tasks SPICE simulation → oscilloscope → verification with Claude Code — Lucas Gerads Show HN: VCoding – A 5 MB native Windows IDE with no dynamic dependencies Show HN: LLMs don't hallucinate because they're bad at math, it's the format GitHub - Agent-FM/agentfm-core: AgentFM is a peer-to-peer network that turns everyday computers into a decentralized AI supercomputer. AgentFM lets you run massive AI workloads directly across a global mesh of idle CPUs and GPUs. Show HN: Tracking Top US Science Olympiad Alumni over Last 25 Years GitHub - Potarix/agent-hub: One place to talk to all your agents Show HN: Runtime security for AI agents(injection,tool abuse, data exfiltration) GitHub - dubeyKartikay/lazyspotify: Terminal Spotify client for macOS and Linux GitHub - the-banana-tool/king-louie: Easy to use GUI Personal AI Assistant. Win/Linux/Mac. Show HN I made my vacation rental bookable by AI agents–no Airbnb, 0% commission GitHub - basteez/jsf-autoreload: maven plugin to enable hot reload on jsf projects uvm32/hosts/host-gdbstub at main · ringtailsoftware/uvm32 GitHub - labsai/EDDI: Config-driven engine that turns JSON into production-grade AI agents. Multi-agent orchestration, 12+ LLM providers, MCP/A2A protocols, RAG, persistent memory, and enterprise compliance (EU AI Act, GDPR, HIPAA). Built on Quarkus. GitHub - glitchnsec/fortyone-oss: AI Executive Assistant Platform Quickstart | Alien GitHub - muxshed/shed: One stream in, or many. Every destination, simultaneously. No cloud middleman, no per-channel fees, no limits. GitHub - ocrbase-hq/ocrbase: 📄 PDF/IMG ->.MD/JSON Document OCR API for PaddleOCR and GLMOCR. Self-hostable. GitHub - impactjo/home-memory: MCP server that lets your AI assistant remember everything about your home. GitHub - Sets88/dbcls: DbCls is a powerful terminal database client that supports various databases GitHub - neptun2000/heor-agent-mcp GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh RollQuation: Math Puzzles - Apps on Google Play GitHub - dropbox/witchcraft Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis GitHub - opentalon/opentalon: OpenTalon is an open-source platform built from the ground up in Go as a robust alternative to OpenClaw LinkedIn™ 职位抓取工具 - Chrome 应用商店
GitHub - mustafabagdatli-git/mcp-identity: Per-request cr...
mustafabagda · 2026-05-06 · via Hacker News: Show HN

Per-request cryptographic user attestation for MCP servers.

MCP already has OAuth 2.1. It tells you who the user is at session level. That's not the problem this solves.

The problem: OAuth proves a service is connected and a user authenticated. It does not prove that a specific user authorized this exact request, over this exact payload, at this exact moment. For high-stakes tool calls — deleting data, sending messages, executing transactions — "the session was valid" is not the same as "the user signed off on this." There is no non-repudiation. There is no per-request audit trail. If something goes wrong, you cannot prove who authorized what.

The fix: One HTTP header. Every request signed by the user's key over the exact payload. Your server verifies it in milliseconds. Works alongside OAuth — additive, not a replacement.

Use mcp-identity when your MCP server does anything a user might later dispute: financial operations, data deletion, external communications, or any autonomous agent action taken on a user's behalf.


Install

pip install mcp-identity

Quickstart

Server side (add to any MCP server)

from mcp_identity.middleware import MCPIdentityMiddleware, InMemoryNonceStore

# Wrap your ASGI app
app = MCPIdentityMiddleware(
    app=your_mcp_app,
    nonce_store=InMemoryNonceStore(),  # swap for Redis in production
    mode="permissive",                 # start here; switch to "strict" later
    timestamp_window_seconds=30,
)

# In your handler, inspect the result:
async def handle(scope, receive, send):
    identity = scope["mcp_identity"]
    if identity.status == "verified":
        print(f"Request from {identity.did}")

Client side (sign outgoing requests)

from mcp_identity import generate_identity, sign_request
from mcp_identity.identity import save_identity, load_identity
from pathlib import Path

# Generate once, save to disk
identity = generate_identity()
save_identity(identity, Path("~/.mcp-identity/key.json").expanduser())

# Load on subsequent runs
identity = load_identity(Path("~/.mcp-identity/key.json").expanduser())

# Sign each request
body = b'{"tool": "list_files", "args": {}}'
header_value = sign_request(identity, body)

# Add to your HTTP request
headers = {"X-MCP-Identity-Attestation": header_value}

Modes

Mode No header Invalid signature
strict HTTP 401 HTTP 401
permissive Pass through (logged as UNVERIFIED) HTTP 401

Start with permissive during rollout. Switch to strict once all clients sign.

Distributed deployments

InMemoryNonceStore is for single-instance use only. For load-balanced deployments, implement the NonceStore protocol:

from mcp_identity.middleware import NonceStore
import redis

class RedisNonceStore:
    def __init__(self, client: redis.Redis):
        self._r = client

    def is_seen(self, nonce: str) -> bool:
        return self._r.exists(f"nonce:{nonce}") == 1

    def mark_seen(self, nonce: str, ttl_seconds: int) -> None:
        self._r.setex(f"nonce:{nonce}", ttl_seconds, "1")

⚠ Without a shared nonce store, replay protection is silently inactive across instances.

How it works

Each request carries X-MCP-Identity-Attestation — a base64url-encoded JSON object:

{
  "did": "did:key:z...",
  "timestamp": "2026-05-05T12:00:00Z",
  "nonce": "a3f2c1d4e5b607182930a4b5",
  "body_hash": "e3b0c4...",
  "signature": "3a9f2c..."
}

The signature covers did|timestamp|nonce|body_hash with ed25519. The server verifies timestamp window (default 30s), body integrity, nonce uniqueness, and signature — in that order.

Full protocol details: SPEC.md

Relationship to OAuth 2.1

mcp-identity is not an alternative to OAuth. Use both:

Concern Solution
Who is this user? OAuth 2.1 (MCP spec)
Did this user authorize this exact request? mcp-identity
Can I prove it later? mcp-identity audit trail

OAuth handles session identity and service authorization. mcp-identity handles per-request non-repudiation. They solve different problems at different layers.

Known constraints (v0)

  • Key management: v0 assumes technically capable users who can manage a keypair file. UX for non-technical users (browser extension, wallet integration) is v0.5.
  • Single conformance implementation: Python only. Other language implementations welcome — use the SPEC.md test vectors to verify compatibility.
  • No key rotation: Keypair is fixed at generation time. Rotation and revocation are v0.5.

License

MIT