home / mcp / mcp-a2a-ap2-im-hungry mcp server

mcp-a2a-ap2-im-hungry MCP Server

Provides end-to-end MCP flow for A2A food delivery with AP2 Mandate-based payments.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "tas1337-mcp-a2a-ap2-im-hungry": {
      "url": "http://localhost:8000/mcp"
    }
  }
}

You operate an MCP server that combines A2A food-delivery interactions with AP2 payments using Mandates. You can discover restaurants, view menus, place orders, and authorize payments securely, all within a unified MCP workflow. This server enables a seamless experience where user-approved mandates authorize payments and orders through connected food-delivery and payment agents.

How to use

Connect your MCP client to the MCP Server at the provided endpoint and perform end-to-end flows that cover both food delivery and payments. You can search for restaurants, retrieve menus, compare delivery estimates, place orders with a chosen delivery partner, and process payments only after the user authorizes a Mandate. The Mandate is cryptographically signed by the user and is required for payment processing.

How to install

Prerequisites: ensure Node.js is installed on your system. You can verify by running node -v and npm -v.

Step 1: Clone the project repository.

Step 2: Install dependencies.

Step 3: Start the MCP server.

Configuration examples and startup

{
  "mcpServers": {
    "a2a_ap2_mcp": {
      "url": "http://localhost:8000/mcp",
      "args": []
    }
  }
}

Additional notes

This server exposes the following services and ports for local development and testing. The MCP Server runs at http://localhost:8000/mcp, the Registry is at http://localhost:8004, A2A adapters for delivery partners run on ports 8001–8003, and the Stripe AP2 service runs at http://localhost:8005.

Security and usage tips

Mandates must be created by a user authorization service and then provided to the agent for payment processing. An agent should never generate mandates on its own. Always verify mandate validity, expiration, and amount before proceeding with a payment.

Troubleshooting

If you cannot reach the MCP Server at http://localhost:8000/mcp, check that the server is running and that there are no port conflicts. Review the startup logs for any errors related to A2A, AP2, or registry connectivity.

Available tools

search_restaurants

Search for restaurants and available delivery partners using A2A protocols.

get_menu

Retrieve menus from discovered restaurants via A2A.

place_order

Place an order with a chosen delivery partner using A2A.

process_payment

Process payment through Stripe when a valid Mandate is provided (AP2).

process_refund

Issue refunds via Stripe when needed, using Mandates to authorize the action.