| Crates.io | tap-mcp-bridge |
| lib.rs | tap-mcp-bridge |
| version | 0.2.0 |
| created_at | 2025-11-18 20:26:06.352816+00 |
| updated_at | 2025-12-09 23:23:00.815282+00 |
| description | A bridge library for TAP-MCP integration |
| homepage | |
| repository | https://github.com/bug-ops/tap-mcp-bridge |
| max_upload_size | |
| id | 1938968 |
| size | 417,252 |
Rust library and MCP server for Visa's Trusted Agent Protocol (TAP), enabling AI agents to securely authenticate with merchants and execute payment transactions.
| Crate | Type | Description |
|---|---|---|
tap-mcp-bridge |
Library | RFC 9421 signatures, JWE encryption, TAP protocol |
tap-mcp-server |
Binary | MCP server exposing TAP tools for Claude and other AI agents |
[dependencies]
tap-mcp-bridge = "0.1"
cargo install --path tap-mcp-server
Configure your MCP client (Claude Desktop, etc.):
{
"mcpServers": {
"tap": {
"command": "tap-mcp-server",
"env": {
"TAP_AGENT_ID": "your-agent-id",
"TAP_AGENT_DIRECTORY": "https://your-agent-directory.com",
"TAP_SIGNING_KEY": "64-hex-characters-ed25519-key"
}
}
}
}
[!IMPORTANT] Requires Rust 1.85+ (Edition 2024).
use ed25519_dalek::SigningKey;
use tap_mcp_bridge::tap::{InteractionType, TapSigner};
let signing_key = SigningKey::from_bytes(&[0u8; 32]);
let signer = TapSigner::new(signing_key, "agent-123", "https://agent.example.com");
let signature = signer.sign_request(
"POST",
"merchant.example.com",
"/checkout",
b"request body",
InteractionType::Checkout,
)?;
println!("Signature: {}", signature.signature);
println!("Signature-Input: {}", signature.signature_input);
The server exposes three tools for AI agents:
| Tool | Description |
|---|---|
checkout_with_tap |
Execute payment with TAP authentication |
browse_merchant |
Browse merchant catalog with verified identity |
verify_agent_identity |
Health check and agent verification |
# Basic checkout flow
cargo run --example basic_checkout
# Browse merchant catalog
cargo run --example browse_catalog
# Error handling patterns
cargo run --example error_handling
# TAP signature generation
cargo run --example signature_generation
# JWKS for agent directory
cargo run --example jwks_generation
# ID Token (JWT) generation
cargo run --example id_token_generation
# ACRO generation
cargo run --example acro_generation
# APC encryption/decryption
cargo run --example apc_generation
[!TIP] Set
AGENT_SIGNING_KEYenvironment variable before running examples:export AGENT_SIGNING_KEY=$(openssl rand -hex 32)
| Resource | Description |
|---|---|
| API Reference | Complete API documentation |
| Examples | Runnable code examples |
# Install tools
cargo install cargo-nextest cargo-make cargo-deny
# Quick verification
cargo make pre-commit
# Full test suite (200+ tests)
cargo nextest run --all-features
# Security audit
cargo deny check
# Documentation
cargo doc --no-deps --open
Licensed under MIT OR Apache-2.0 at your option.