| Crates.io | tap-mcp |
| lib.rs | tap-mcp |
| version | 0.4.0 |
| created_at | 2025-06-04 06:35:19.214901+00 |
| updated_at | 2025-06-17 07:37:52.097232+00 |
| description | Model Context Protocol server for TAP Node functionality |
| homepage | |
| repository | https://github.com/TransactionAuthorizationProtocol/tap-rs |
| max_upload_size | |
| id | 1699850 |
| size | 472,789 |
A Model Context Protocol (MCP) server that provides AI applications with standardized access to Transaction Authorization Protocol (TAP) functionality. This enables LLMs and AI agents to create, manage, and monitor TAP transactions through a well-defined interface.
TAP-MCP is a thin wrapper around TAP Node that exposes transaction authorization functionality through the Model Context Protocol standard. This enables AI applications to:
~/.tap/{sanitized_did}/transactions.dbKey design principles:
agent_did parameter to specify which agent signs the message# Clone the repository
git clone https://github.com/notabene-id/tap-rs.git
cd tap-rs/tap-mcp
# Build the project
cargo build --release
# Install globally (optional)
cargo install --path .
Run the MCP server with default settings:
cargo run
The server will:
~/.tap as the TAP root directory# Use specific agent DID for organized storage
cargo run -- --agent-did "did:web:example.com"
# This creates database at ~/.tap/did_web_example.com/transactions.db
# Use custom TAP root directory
cargo run -- --tap-root /path/to/custom/tap
# Enable debug logging
cargo run -- --debug
# Show all options
cargo run -- --help
TAP-MCP uses stdio transport, making it compatible with MCP clients like Claude Desktop:
{
"mcpServers": {
"tap": {
"command": "/path/to/tap-mcp",
"args": ["--tap-root", "/your/tap/directory"]
}
}
}
TAP-MCP provides 29 comprehensive tools covering the complete TAP transaction lifecycle:
tap_create_agentCreate a new TAP agent with auto-generated DID. Agents are cryptographic identities; roles and party associations are specified per transaction.
{
"label": "My Settlement Agent"
}
Returns:
{
"@id": "did:key:z6MkpGuzuD38tpgZKPfmLmmD8R6gihP9KJhuopMuVvfGzLmc",
"label": "My Settlement Agent",
"created_at": "2024-01-15T10:30:00Z"
}
tap_list_agentsList all configured agents from ~/.tap/keys.json.
{
"filter": {
"has_label": true
},
"limit": 50,
"offset": 0
}
tap_add_agentsAdd agents to an existing TAP transaction (TAIP-5). Allows adding settlement addresses, compliance officers, or other agents to handle the transaction.
{
"agent_did": "did:key:z6MkpGuzuD38tpgZKPfmLmmD8R6gihP9KJhuopMuVvfGzLmc",
"transaction_id": "tx-12345",
"agents": [
{
"@id": "did:example:new-settlement-agent",
"role": "SettlementAddress",
"for": "did:example:alice"
},
{
"@id": "did:example:compliance-officer",
"role": "ComplianceOfficer",
"for": "did:example:bob"
}
]
}
tap_remove_agentRemove an agent from a TAP transaction (TAIP-5). Removes an agent's authorization to act on behalf of a party in the transaction.
{
"agent_did": "did:key:z6MkpGuzuD38tpgZKPfmLmmD8R6gihP9KJhuopMuVvfGzLmc",
"transaction_id": "tx-12345",
"agent_to_remove": "did:example:old-settlement-agent"
}
tap_replace_agentReplace an agent in a TAP transaction (TAIP-5). Atomically replaces one agent with another while maintaining continuity.
{
"agent_did": "did:key:z6MkpGuzuD38tpgZKPfmLmmD8R6gihP9KJhuopMuVvfGzLmc",
"transaction_id": "tx-12345",
"original_agent": "did:example:old-agent",
"new_agent": {
"@id": "did:example:new-agent",
"role": "SettlementAddress",
"for": "did:example:alice"
}
}
tap_create_transferInitiate a new TAP transfer transaction (TAIP-3). Requires specifying which agent will sign the message.
{
"agent_did": "did:key:z6MkpGuzuD38tpgZKPfmLmmD8R6gihP9KJhuopMuVvfGzLmc",
"asset": "eip155:1/erc20:0xa0b86a33e6a4a3c3fcb4b0f0b2a4b6e1c9f8d5c4",
"amount": "100.50",
"originator": {
"@id": "did:example:alice"
},
"beneficiary": {
"@id": "did:example:bob"
},
"agents": [
{
"@id": "did:example:settlement-agent",
"role": "SettlementAddress",
"for": "did:example:alice"
}
],
"memo": "Payment for services"
}
tap_authorizeAuthorize a TAP transaction (TAIP-4). The agent_did specifies which agent signs the authorization.
{
"agent_did": "did:key:z6MkpGuzuD38tpgZKPfmLmmD8R6gihP9KJhuopMuVvfGzLmc",
"transaction_id": "tx-12345",
"settlement_address": "eip155:1:0x742d35cc6bbf4c04623b5daa50a09de81bc4ff87",
"expiry": "2024-12-31T23:59:59Z"
}
tap_rejectReject a TAP transaction (TAIP-4). The agent_did specifies which agent signs the rejection.
{
"agent_did": "did:key:z6MkpGuzuD38tpgZKPfmLmmD8R6gihP9KJhuopMuVvfGzLmc",
"transaction_id": "tx-12345",
"reason": "Insufficient compliance verification"
}
tap_cancelCancel a TAP transaction (TAIP-5). The agent_did specifies which agent signs the cancellation.
{
"agent_did": "did:key:z6MkpGuzuD38tpgZKPfmLmmD8R6gihP9KJhuopMuVvfGzLmc",
"transaction_id": "tx-12345",
"by": "did:example:alice",
"reason": "Change of plans"
}
tap_settleSettle a TAP transaction (TAIP-6). The agent_did specifies which agent signs the settlement.
{
"agent_did": "did:key:z6MkpGuzuD38tpgZKPfmLmmD8R6gihP9KJhuopMuVvfGzLmc",
"transaction_id": "tx-12345",
"settlement_id": "eip155:1:0xabcd1234567890abcdef1234567890abcdef1234",
"amount": "100.50"
}
tap_list_transactionsList transactions with filtering and pagination support. Shows only transactions from the specified agent's storage.
{
"agent_did": "did:key:z6MkpGuzuD38tpgZKPfmLmmD8R6gihP9KJhuopMuVvfGzLmc",
"filter": {
"message_type": "Transfer",
"thread_id": "thread-abc123",
"from_did": "did:example:alice",
"to_did": "did:example:bob",
"date_from": "2024-01-01T00:00:00Z",
"date_to": "2024-12-31T23:59:59Z"
},
"sort": {
"field": "created_time",
"order": "desc"
},
"limit": 100,
"offset": 0
}
tap_update_policiesUpdate policies for a TAP transaction (TAIP-7). Allows agents to update transaction policies such as authorization requirements, compliance rules, or operational constraints.
{
"agent_did": "did:key:z6MkpGuzuD38tpgZKPfmLmmD8R6gihP9KJhuopMuVvfGzLmc",
"transaction_id": "tx-12345",
"policies": [
{
"@type": "RequireAuthorization",
"authorizer": "did:example:compliance-officer",
"threshold": "100.00",
"currency": "USD"
},
{
"@type": "RequirePresentation",
"requested_attributes": ["name", "address", "dateOfBirth"],
"purpose": "KYC compliance"
},
{
"@type": "TransactionLimit",
"max_amount": "10000.00",
"period": "daily"
}
]
}
tap_list_customersLists all customers (parties) that a specific agent acts on behalf of. Analyzes transaction history to identify parties represented by the agent and includes metadata about each party.
{
"agent_did": "did:key:z6MkpGuzuD38tpgZKPfmLmmD8R6gihP9KJhuopMuVvfGzLmc",
"limit": 50,
"offset": 0
}
Returns:
{
"customers": [
{
"@id": "did:example:alice",
"metadata": {
"name": "Alice Smith",
"company": "ACME Corp"
},
"transaction_count": 5,
"transaction_ids": ["tx-123", "tx-456", "tx-789"]
}
],
"total": 1
}
tap_list_connectionsLists all counterparties (connections) that a specific party has transacted with. Searches across all agent databases to find transaction relationships and includes role information.
{
"party_id": "did:example:alice",
"limit": 50,
"offset": 0
}
Returns:
{
"connections": [
{
"@id": "did:example:bob",
"metadata": {
"name": "Bob Johnson",
"company": "Widget Inc"
},
"transaction_count": 3,
"transaction_ids": ["tx-123", "tx-456", "tx-789"],
"roles": ["beneficiary", "originator"]
}
],
"total": 1
}
tap_get_customer_detailsGet detailed information about a specific customer, including all their profile data and transaction history.
{
"agent_did": "did:key:z6MkpGuzuD38tpgZKPfmLmmD8R6gihP9KJhuopMuVvfGzLmc",
"customer_id": "did:example:alice"
}
tap_generate_ivms101Generate IVMS101 travel rule data from a customer's profile. Converts stored customer information into the IVMS101 format required for FATF travel rule compliance.
{
"agent_did": "did:key:z6MkpGuzuD38tpgZKPfmLmmD8R6gihP9KJhuopMuVvfGzLmc",
"customer_id": "did:example:alice"
}
Returns IVMS101-formatted data for the customer's natural or legal person information.
tap_update_customer_profileUpdate customer profile data using Schema.org vocabulary. Stores structured customer information in the agent's database.
{
"agent_did": "did:key:z6MkpGuzuD38tpgZKPfmLmmD8R6gihP9KJhuopMuVvfGzLmc",
"customer_id": "did:example:alice",
"profile_data": {
"givenName": "Alice",
"familyName": "Smith",
"addressCountry": "US",
"addressRegion": "CA",
"addressLocality": "San Francisco",
"postalCode": "94105",
"streetAddress": "123 Main St"
}
}
tap_update_customer_from_ivms101Update customer profile from IVMS101 data. Converts IVMS101 travel rule data into Schema.org format and stores it in the customer profile.
{
"agent_did": "did:key:z6MkpGuzuD38tpgZKPfmLmmD8R6gihP9KJhuopMuVvfGzLmc",
"customer_id": "did:example:alice",
"ivms101_data": {
"naturalPerson": {
"name": {
"nameIdentifier": [
{
"primaryIdentifier": "Smith",
"secondaryIdentifier": "Alice",
"nameIdentifierType": "LEGL"
}
]
},
"geographicAddress": [
{
"addressType": "HOME",
"townLocationName": "San Francisco",
"countrySubDivision": "CA",
"country": "US",
"postCode": "94105"
}
]
}
}
}
tap_trust_pingSend a trust ping message (DIDComm standard) to verify connectivity and agent availability.
{
"agent_did": "did:key:z6MkpGuzuD38tpgZKPfmLmmD8R6gihP9KJhuopMuVvfGzLmc",
"recipient_did": "did:example:bob",
"comment": "Testing connection"
}
tap_basic_messageSend a basic text message (DIDComm standard) for human-readable communication between agents.
{
"agent_did": "did:key:z6MkpGuzuD38tpgZKPfmLmmD8R6gihP9KJhuopMuVvfGzLmc",
"recipient_did": "did:example:bob",
"content": "Please review the pending transaction"
}
tap_revertRequest reversal of a settled transaction (TAIP-14). Used for compliance reversals or dispute resolutions.
{
"agent_did": "did:key:z6MkpGuzuD38tpgZKPfmLmmD8R6gihP9KJhuopMuVvfGzLmc",
"transaction_id": "tx-12345",
"settlement_address": "eip155:1:0x742d35cc6bbf4c04623b5daa50a09de81bc4ff87",
"reason": "Compliance investigation required"
}
tap_list_deliveries_by_recipientList message deliveries to a specific recipient, showing delivery status and retry information.
{
"agent_did": "did:key:z6MkpGuzuD38tpgZKPfmLmmD8R6gihP9KJhuopMuVvfGzLmc",
"recipient_did": "did:example:bob",
"limit": 50,
"offset": 0
}
tap_list_deliveries_by_messageList all delivery attempts for a specific message ID.
{
"agent_did": "did:key:z6MkpGuzuD38tpgZKPfmLmmD8R6gihP9KJhuopMuVvfGzLmc",
"message_id": "msg-12345",
"limit": 50,
"offset": 0
}
tap_list_deliveries_by_threadList all message deliveries for a transaction thread.
{
"agent_did": "did:key:z6MkpGuzuD38tpgZKPfmLmmD8R6gihP9KJhuopMuVvfGzLmc",
"thread_id": "tx-12345",
"limit": 50,
"offset": 0
}
tap_query_databaseExecute direct SQL queries on the agent's database for advanced analysis. Read-only access.
{
"agent_did": "did:key:z6MkpGuzuD38tpgZKPfmLmmD8R6gihP9KJhuopMuVvfGzLmc",
"query": "SELECT COUNT(*) as total, message_type FROM messages WHERE created_time > datetime('now', '-7 days') GROUP BY message_type",
"params": []
}
tap_get_database_schemaGet the complete database schema for understanding the data structure.
{
"agent_did": "did:key:z6MkpGuzuD38tpgZKPfmLmmD8R6gihP9KJhuopMuVvfGzLmc"
}
tap_list_receivedLists raw received messages with filtering and pagination support. Shows all incoming messages (JWE, JWS, or plain) before processing.
{
"agent_did": "did:key:z6MkpGuzuD38tpgZKPfmLmmD8R6gihP9KJhuopMuVvfGzLmc",
"status": "pending",
"source_type": "https",
"limit": 50,
"offset": 0
}
tap_get_pending_receivedGets pending received messages that haven't been processed yet. Useful for debugging message processing issues.
{
"agent_did": "did:key:z6MkpGuzuD38tpgZKPfmLmmD8R6gihP9KJhuopMuVvfGzLmc",
"limit": 50
}
tap_view_raw_receivedViews the raw content of a received message. Shows the complete raw message as received (JWE, JWS, or plain JSON).
{
"agent_did": "did:key:z6MkpGuzuD38tpgZKPfmLmmD8R6gihP9KJhuopMuVvfGzLmc",
"received_id": 42
}
tap://agentsRead-only access to agent information.
tap://agents # All agents with their DIDs and labels
tap://messagesAccess to transaction messages and history from agent-specific storage.
tap://messages?agent_did=did:key:z6Mk... # Messages for specific agent (required)
tap://messages?agent_did=did:key:z6Mk...&direction=incoming # Filter by direction
tap://messages?agent_did=did:key:z6Mk...&direction=outgoing # Outgoing messages only
tap://messages?agent_did=did:key:z6Mk...&thread_id=abc123 # Filter by thread
tap://messages?agent_did=did:key:z6Mk...&type=Transfer # Filter by message type
tap://messages?agent_did=did:key:z6Mk...&limit=100&offset=50 # Pagination
tap://messages/msg-id-123 # Specific message
tap://deliveriesAccess to message delivery tracking information.
tap://deliveries?agent_did=did:key:z6Mk... # Delivery records for specific agent
tap://deliveries?message_id=msg-123 # Deliveries for specific message
tap://deliveries?recipient_did=did:example:bob # Deliveries to specific recipient
tap://deliveries?delivery_type=https # Filter by delivery type (https/internal/return_path/pickup)
tap://deliveries?status=failed # Filter by status (pending/success/failed)
tap://deliveries?limit=50&offset=100 # Pagination
tap://deliveries/123 # Specific delivery record by ID
tap://schemasJSON schemas for TAP message types.
tap://schemas # All schemas
tap://receivedAccess to raw received messages before processing.
tap://received?agent_did=did:key:z6Mk... # Received messages for specific agent
tap://received?agent_did=did:key:z6Mk...&status=pending # Filter by status (pending/processed/failed)
tap://received?agent_did=did:key:z6Mk...&source_type=https # Filter by source type
tap://received?agent_did=did:key:z6Mk...&limit=50&offset=100 # Pagination
tap://received/123 # Specific received message by ID
TAP_ROOT: Default TAP root directory (default: ~/.tap)TAP_DB_PATH: Database file path (default: $TAP_ROOT/tap-node.db)RUST_LOG: Logging level (debug, info, warn, error)~/.tap/ # TAP root directory
├── keys.json # Agent keys storage
├── did_key_z6MkpGuzuD38tpgZKPfm/ # Auto-generated agent directory
│ └── transactions.db # SQLite database for this agent
├── did_web_example.com/ # Manual agent directory
│ └── transactions.db # SQLite database for this agent
└── logs/ # Log files directory
Automatic Storage Initialization: When you create a new agent using tap_create_agent, TAP-MCP automatically:
: with _)Agent-Specific Storage: Each transaction operation (create, authorize, reject, cancel, settle, list) uses the storage database specific to the agent_did parameter. This ensures:
to field following DIDComm specification# Create settlement agent for originator
echo '{"label": "Alice Settlement Agent"}' | \
tap-mcp-client call tap_create_agent
# Create compliance agent for beneficiary
echo '{"label": "Bob Compliance Agent"}' | \
tap-mcp-client call tap_create_agent
echo '{
"agent_did": "did:key:z6MkpGuzuD38tpgZKPfmLmmD8R6gihP9KJhuopMuVvfGzLmc",
"asset": "eip155:1/erc20:0xa0b86a33e6a4a3c3fcb4b0f0b2a4b6e1c9f8d5c4",
"amount": "250.00",
"originator": {"@id": "did:example:alice"},
"beneficiary": {"@id": "did:example:bob"},
"agents": [
{"@id": "did:key:z6MkpGuzuD38tpgZKPfmLmmD8R6gihP9KJhuopMuVvfGzLmc", "role": "SettlementAddress", "for": "did:example:alice"},
{"@id": "did:key:z6MkhVTKxFiPPR8RdLYgfJxL8jmCW6e4NPEFhR6BEhPo8Lyy", "role": "Compliance", "for": "did:example:bob"}
]
}' | tap-mcp-client call tap_create_transfer
echo '{
"agent_did": "did:key:z6MkpGuzuD38tpgZKPfmLmmD8R6gihP9KJhuopMuVvfGzLmc",
"transaction_id": "tx-abc123",
"settlement_address": "eip155:1:0x742d35cc6bbf4c04623b5daa50a09de81bc4ff87",
"expiry": "2024-12-31T23:59:59Z"
}' | tap-mcp-client call tap_authorize
echo '{
"agent_did": "did:key:z6MkpGuzuD38tpgZKPfmLmmD8R6gihP9KJhuopMuVvfGzLmc",
"transaction_id": "tx-abc123",
"settlement_id": "eip155:1:0xabcd1234567890abcdef1234567890abcdef1234",
"amount": "250.00"
}' | tap-mcp-client call tap_settle
# List all transactions for a specific agent
echo '{"agent_did": "did:key:z6MkpGuzuD38tpgZKPfmLmmD8R6gihP9KJhuopMuVvfGzLmc"}' | \
tap-mcp-client call tap_list_transactions
# List recent transfers for an agent
echo '{"agent_did": "did:key:z6MkpGuzuD38tpgZKPfmLmmD8R6gihP9KJhuopMuVvfGzLmc", "filter": {"message_type": "Transfer"}, "limit": 10}' | \
tap-mcp-client call tap_list_transactions
# List recent messages
tap-mcp-client resource tap://messages
# Check delivery status for the transaction
tap-mcp-client resource tap://deliveries?agent_did=did:key:z6MkpGuzuD38tpgZKPfmLmmD8R6gihP9KJhuopMuVvfGzLmc
# Check failed deliveries
tap-mcp-client resource tap://deliveries?status=failed
# List customers that the agent represents
echo '{"agent_did": "did:key:z6MkpGuzuD38tpgZKPfmLmmD8R6gihP9KJhuopMuVvfGzLmc"}' | \
tap-mcp-client call tap_list_customers
# List connections for a specific party
echo '{"party_id": "did:example:alice"}' | \
tap-mcp-client call tap_list_connections
If a transaction needs to be rejected instead of authorized:
# Reject with reason
echo '{
"agent_did": "did:key:z6MkpGuzuD38tpgZKPfmLmmD8R6gihP9KJhuopMuVvfGzLmc",
"transaction_id": "tx-abc123",
"reason": "Insufficient compliance verification"
}' | tap-mcp-client call tap_reject
Either party can cancel a transaction before settlement:
# Cancel transaction
echo '{
"agent_did": "did:key:z6MkpGuzuD38tpgZKPfmLmmD8R6gihP9KJhuopMuVvfGzLmc",
"transaction_id": "tx-abc123",
"by": "did:example:alice",
"reason": "Change of plans"
}' | tap-mcp-client call tap_cancel
To configure Claude Desktop to use TAP-MCP, you need to add the server configuration to your Claude Desktop settings. The configuration file location depends on your operating system:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
First, build and install TAP-MCP:
cd /path/to/tap-rs/tap-mcp
cargo build --release
sudo cp target/release/tap-mcp /usr/local/bin/
Then add this configuration to your Claude Desktop config file:
{
"mcpServers": {
"tap": {
"command": "tap-mcp",
"env": {
"TAP_ROOT": "/your/tap/directory",
"RUST_LOG": "info"
}
}
}
}
Add this configuration to your Claude Desktop config file:
{
"mcpServers": {
"tap": {
"command": "cargo",
"args": [
"run",
"--manifest-path",
"/path/to/tap-rs/tap-mcp/Cargo.toml",
],
"env": {
"TAP_ROOT": "/your/tap/directory",
"RUST_LOG": "info"
}
}
}
}
--agent-did: (Optional) Specify an agent DID for organized storage. Creates database at ~/.tap/{sanitized-did}/--tap-root: (Optional) Custom TAP root directory (default: ~/.tap)--debug: Enable debug loggingTAP_ROOT: Environment variable alternative to --tap-rootRUST_LOG: Control log level (debug, info, warn, error){
"mcpServers": {
"tap-production": {
"command": "tap-mcp",
"args": [
"--agent-did", "did:web:mycompany.com:agents:settlement",
"--tap-root", "/home/user/.tap-production"
],
"env": {
"RUST_LOG": "info"
}
},
"tap-development": {
"command": "cargo",
"args": [
"run",
"--manifest-path", "/home/user/code/tap-rs/tap-mcp/Cargo.toml",
"--",
"--debug",
"--agent-did", "did:web:localhost:8080:dev-agent"
],
"env": {
"TAP_ROOT": "/tmp/tap-dev",
"RUST_LOG": "debug"
}
}
}
}
After updating your Claude Desktop configuration:
You should see tools like tap_create_agent, tap_create_transfer, tap_authorize, etc.
If TAP-MCP doesn't appear in Claude Desktop:
command and manifest-path are correct# Test the command manually
cargo run --manifest-path /path/to/tap-rs/tap-mcp/Cargo.toml -- --help
# Or if using the binary
tap-mcp --help
Once configured, you can interact with TAP through Claude Desktop by asking questions like:
import asyncio
from mcp import ClientSession, StdioServerParameters
from mcp.client.stdio import stdio_client
async def main():
async with stdio_client(
StdioServerParameters(
command="tap-mcp",
args=["--tap-root", "/your/tap/directory"]
)
) as (read, write):
async with ClientSession(read, write) as session:
# Initialize the session
await session.initialize()
# List available tools
tools = await session.list_tools()
print(f"Available tools: {[tool.name for tool in tools.tools]}")
# Create an agent
agent_result = await session.call_tool(
"tap_create_agent",
{
"label": "Test Exchange Agent"
}
)
print(f"Agent created: {agent_result}")
# Create a transfer transaction
transfer_result = await session.call_tool(
"tap_create_transfer",
{
"agent_did": "did:key:z6MkpGuzuD38tpgZKPfmLmmD8R6gihP9KJhuopMuVvfGzLmc",
"asset": "eip155:1/erc20:0xa0b86a33e6a4a3c3fcb4b0f0b2a4b6e1c9f8d5c4",
"amount": "100.00",
"originator": {"@id": "did:example:alice"},
"beneficiary": {"@id": "did:example:bob"},
"agents": [
{"@id": "did:example:test-agent", "role": "Exchange", "for": "did:example:alice"}
]
}
)
print(f"Transfer created: {transfer_result}")
# Authorize the transaction
auth_result = await session.call_tool(
"tap_authorize",
{
"agent_did": "did:key:z6MkpGuzuD38tpgZKPfmLmmD8R6gihP9KJhuopMuVvfGzLmc",
"transaction_id": "tx-12345",
"settlement_address": "eip155:1:0x742d35cc6bbf4c04623b5daa50a09de81bc4ff87"
}
)
print(f"Transaction authorized: {auth_result}")
# List recent transactions
list_result = await session.call_tool(
"tap_list_transactions",
{
"agent_did": "did:key:z6MkpGuzuD38tpgZKPfmLmmD8R6gihP9KJhuopMuVvfGzLmc",
"limit": 10,
"filter": {"message_type": "Transfer"}
}
)
print(f"Recent transfers: {list_result}")
# List customers of the agent
customers_result = await session.call_tool(
"tap_list_customers",
{
"agent_did": "did:key:z6MkpGuzuD38tpgZKPfmLmmD8R6gihP9KJhuopMuVvfGzLmc"
}
)
print(f"Agent customers: {customers_result}")
# List connections for a specific party
connections_result = await session.call_tool(
"tap_list_connections",
{
"party_id": "did:example:alice"
}
)
print(f"Party connections: {connections_result}")
if __name__ == "__main__":
asyncio.run(main())
Database Connection Errors
# Ensure TAP Node has initialized the database
tap-node init --db-path ~/.tap/tap-node.db
Permission Errors
# Check file permissions
chmod 755 ~/.tap
chmod 644 ~/.tap/tap-node.db
Missing Dependencies
# Rebuild with all features
cargo clean
cargo build --features full
Enable detailed logging for troubleshooting:
RUST_LOG=debug cargo run -- --debug
Test basic MCP connectivity:
# Send a simple initialize request
echo '{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": "2024-11-05", "capabilities": {}, "clientInfo": {"name": "test"}}}' | cargo run
# Run all tests
cargo test
# Run with output
cargo test -- --nocapture
# Run specific test
cargo test test_create_agent
src/tools/src/tools/mod.rssrc/tools/schema.rsThis project is licensed under the MIT License - see the LICENSE file for details.