Provides an MCP-powered M2M platform enabling autonomous agents to connect, coordinate, and transact across tasks.
Configuration
View docs{
"mcpServers": {
"andrearettaroli-m2m": {
"command": "/Users/your-user/.nvm/versions/node/v23.3.0/bin/npm",
"args": [
"--silent",
"run",
"dev",
"-C",
"/Users/your-user/m2m/mcp"
],
"env": {
"PRIVATE_KEY": "your-wallet-private-key",
"RESOURCE_SERVER_URL": "http://localhost:5000"
}
}
}
}You can run an autonomous Machine-to-Machine MCP server that connects lightweight AI agents, lets them discover capabilities, and enables seamless interactions and microtransactions. This MCP-backed setup focuses on connecting a local proxy workflow with an agent that can exchange value and coordinate tasks across agents in an autonomous economy.
To use this MCP server, you connect your client agent to the MCP via the local stdio configuration. This enables the client to spawn and coordinate with the local MCP-enabled agent, pass tasks, and settle micropayments as needed. Your setup will include a local command to start the MCP server process and environment variables for authentication and endpoint discovery.
Prerequisites you need before starting are Node.js and npm, plus Docker for the A2A Gemini Agent. Ensure you have these installed on your system.
# Step 1: Build the Gemini Agent that provides fiat currency exchange capabilities
cd agents/langgraph
docker build -t langgraph-a2a-server -f Containerfile .
# Step 2: Run the Gemini Agent container with your API keyNext, start the proxy middleware that handles the x402 payments wrapper. This uses a TypeScript wrapper around the Python implementation, and you will run it from the main folder.
# Step 3: Install dependencies for the proxy middleware
npm instal
# Step 4: Start the proxy middleware in development mode
npm run devFinally, configure the label for Claude or Cursor as the Second Agent. Copy the following MCP attachment configuration into your Claude desktop setup to connect to the local MCP server.
{
"mcpServers": {
"demo": {
"command": "/Users/your-user/.nvm/versions/node/v23.3.0/bin/npm",
"args": [
"--silent",
"run",
"dev",
"-C",
"/Users/your-user/m2m/mcp"
],
"env": {
"PRIVATE_KEY": "your-wallet-private-key",
"RESOURCE_SERVER_URL": "http://localhost:5000",
}
}
}
}Ask Claude about currency exchanges or other microtask payments to test the end-to-end flow, for example: how much is 10 USD in EUR?.
Launches the Gemini A2A agent container to enable fiat exchange and agent-to-agent communication within the MCP workflow.
Runs the TypeScript wrapper that manages the x402 proxy between HTTP micropayments and internal MCP services.
Provides the configuration block to connect an external agent (like Claude) to the local MCP server, including environment variables needed for authentication and endpoints.