@authproof/mcp-server
v0.3.0
Published
Secure API access for AI agents. AuthProof lets agents discover projects, self-register, and make signed, non-replayable requests without shared API keys.
Maintainers
Readme
@authproof/mcp-server
MCP (Model Context Protocol) server for AuthProof. It lets AI agents discover AuthProof projects, self-register, and make signed, non-replayable HTTP requests without carrying shared API keys.
What it does
AuthProof replaces shared API keys with signed, per-request authentication:
- Agents can discover APIs that accept AuthProof registrations
- Agents can generate a wallet locally and self-register
- Each outbound request is signed and attributable to a specific agent
- The private key never leaves the agent runtime
- Replayed requests are rejected server-side
This package gives MCP-compatible clients a native tool layer for that flow.
Distribution modes
stdio MCP: install withnpx -y @authproof/mcp-serverremote MCP: host the server at an HTTP endpoint such ashttps://authproof.io/mcp
Install
Most MCP clients can launch the server directly with npx:
{
"mcpServers": {
"authproof": {
"command": "npx",
"args": ["-y", "@authproof/mcp-server"],
"env": {
"AUTHPROOF_SERVER": "https://authproof.io"
}
}
}
}If the agent already has a wallet, also provide AGENT_PRIVATE_KEY. If not, the register_authproof_agent tool can generate one during onboarding.
Autonomous flow
- Call
discover_authproof_projectsto find APIs accepting agents - Call
register_authproof_agentto generate a wallet and request access - Call
check_authproof_registration_statusif approval is pending - Call
send_signed_authproof_requestto make authenticated requests - If credits run out (402), use
send_paid_authproof_requestto auto-pay with USDC and retry
Tools
discover_authproof_projects
Browse projects on an AuthProof server that accept autonomous agents.
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| limit | number | No | Max projects to return. Defaults to 10. |
register_authproof_agent
Generate a wallet locally and register the agent with a project.
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| projectId | string | Yes | Project to register with |
| name | string | No | Human-readable agent name |
Returns the generated private key when one did not already exist. Persist it immediately.
check_authproof_registration_status
Poll whether the current agent wallet has been approved for a project.
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| projectId | string | Yes | Project to check |
send_signed_authproof_request
Make an authenticated HTTP request. Each request is signed with the agent wallet per ERC-8128.
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| url | string | Yes | URL to fetch |
| method | string | No | HTTP method. Defaults to GET. |
| headers | object | No | Request headers |
| body | string | No | Request body |
send_paid_authproof_request
Same as send_signed_authproof_request, but automatically handles 402 Payment Required responses by paying on-chain with USDC. Requires AUTHPROOF_RPC_URL to be set.
When a 402 is returned, the tool:
- Requests a payment quote from the server
- Sends a USDC transfer on-chain
- Verifies the payment with the server
- Retries the original request
The response includes a payment object with txHash, receiptId, and amount when a payment was made.
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| url | string | Yes | URL to fetch |
| method | string | No | HTTP method. Defaults to GET. |
| headers | object | No | Request headers |
| body | string | No | Request body |
get_authproof_wallet_info
Return the current wallet address and chain ID.
Environment variables
| Variable | Required | Description |
|----------|----------|-------------|
| AUTHPROOF_SERVER | No | AuthProof host. Defaults to http://localhost:3000. |
| AGENT_PRIVATE_KEY | No | Existing agent wallet private key. Optional because register_authproof_agent can generate one. |
| AUTHPROOF_CHAIN_ID | No | Chain ID used for signing. Defaults to 84532 (Base Sepolia). |
| AUTHPROOF_RPC_URL | No | JSON-RPC URL for the payment chain (e.g. https://mainnet.base.org). Required for paid_fetch. |
Example
discover_authproof_projects({})
register_authproof_agent({ projectId: "proj_123", name: "research-agent" })
check_authproof_registration_status({ projectId: "proj_123" })
send_signed_authproof_request({
url: "https://api.example.com/orders",
method: "POST",
headers: { "content-type": "application/json" },
body: "{\"sku\":\"hoodie-001\"}"
})Related surfaces
- Docs: https://authproof.io/docs
- Agent-readable docs: https://authproof.io/llms.txt
- Full LLM context: https://authproof.io/llms-full.txt
- Agent integration spec: https://authproof.io/agents.json
- Discovery endpoint: https://authproof.io/.well-known/authproof
- ERC-8128 discovery: https://authproof.io/.well-known/erc8128
- Remote MCP endpoint: https://authproof.io/mcp
