Overview
The MCP (Model Context Protocol) server provides a standardized interface for AI agents to interact with the Agentic Wallet platform. It exposes curated tools and a generic gateway proxy for schema-validated API access. Port:3008 (default)
Architecture
The MCP server acts as a tool invocation layer between AI agents and the API Gateway.Endpoints
List Tools
Get all available MCP tools with descriptions.Call Tool
Invoke a specific MCP tool with arguments.Available Tools
The MCP server provides 70+ curated tools across all platform capabilities.Wallet Tools
Wallet Operations (7 tools)
Wallet Operations (7 tools)
Example:
Transaction Tools
Transaction Operations (10 tools)
Transaction Operations (10 tools)
Example:
Policy Tools
Policy Operations (5 tools)
Policy Operations (5 tools)
Example:
Agent Tools
Agent Operations (11 tools)
Agent Operations (11 tools)
Example:
Protocol Tools
Protocol Operations (15 tools)
Protocol Operations (15 tools)
Example:
Risk Tools
Risk & Chaos Operations (8 tools)
Risk & Chaos Operations (8 tools)
Example:
Strategy & Treasury Tools
Strategy & Treasury Operations (5 tools)
Strategy & Treasury Operations (5 tools)
Example:
Audit Tools
Audit & Metrics (2 tools)
Audit & Metrics (2 tools)
Example:
Gateway Request Tool
Thegateway.request tool provides schema-validated access to any /api/v1 endpoint.
Usage
Request Format
Schema Validation
The tool validates:pathmust match/^/api/v1/[a-zA-Z0-9/_:-]*$/methodmust be valid HTTP methodquerymust be record of string/number/booleanbodymust be valid JSON object
Examples
Error Handling
MCP tools return normalized error responses.Input Validation Errors
Invalid Tool
Missing Required Argument
Invalid Schema
Gateway Errors
When the underlying gateway request fails:Gateway Error
Authentication
The MCP server uses environment-configured credentials to authenticate with the API Gateway.Environment Configuration
x-api-key: FromAPI_KEYenv varx-tenant-id: FromTENANT_IDenv var (if set)content-type:application/json
Health Check
Using the SDK
The TypeScript SDK includes an MCP client for tool invocation.SDK MCP Client
Integration Patterns
AI Agent Tool Use
Agent Integration
Orchestrator Pattern
Workflow Orchestration
Tool Discovery
Agents can dynamically discover available tools at runtime.Dynamic Tool Discovery
Best Practices
Use typed tools over gateway.request
Use typed tools over gateway.request
Prefer named tools like
wallet.create instead of gateway.request for better type safety and validation.Handle errors gracefully
Handle errors gracefully
Always wrap MCP calls in try-catch and parse error messages for structured error codes and stages.
Cache tool list
Cache tool list
Call
mcp.tools() once at startup and cache the result rather than fetching on every operation.Validate arguments
Validate arguments
Validate tool arguments client-side before calling to reduce round-trips and error noise.
Next Steps
CLI Integration
Use the command-line interface
SDK Integration
Integrate with TypeScript SDK
SKILLS Contract
Review agent integration contract
API Reference
Explore REST API endpoints