MCP server overview
what is Upi Deeplinks?
Upi Deeplinks is a Model Context Protocol (MCP) server that enables Claude (or other MCP-aware agents) to generate and manage UPI payment deeplinks using Setu’s payment infrastructure. It exposes payment management tools (create links, expire links, refunds, status checks) and supports sandbox testing.
how to use Upi Deeplinks?
- Provide required environment variables: UPI_DEEPLINKS_SCHEME_ID, UPI_DEEPLINKS_SECRET, UPI_DEEPLINKS_PRODUCT_INSTANCE_ID (optional: SETU_AUTH_TYPE, SETU_MODE).
- Add the MCP server entry to your Claude desktop config (pointing to command
uvxand argssetu_mcp_upi_deeplinks). - Start the MCP server (via the uvx command) and invoke the provided tools from the MCP-enabled assistant.
- For development: use
uv sync,uv build, anduv publishto build and publish the package. Use the MCP Inspector (npx @modelcontextprotocol/inspector ...) for debugging.
key features
- Tools to create UPI payment links, expire links, initiate refunds, check payment status, and mock payments (sandbox).
- Returns UPI deeplink details including UPI ID and short URL when creating links.
- Sandbox mode with mock-payment for testing flows.
- Configurable via environment variables and integratable as an MCP server for Claude.
- Packaged for Python distribution with standard build/publish commands.
use cases
- Generating UPI payment links in conversational assistants for quick payments.
- Managing payment lifecycle: expire links, check status, and process refunds from an agent-driven flow.
- Testing payment flows in sandbox using mock-payment before going live.
- Embedding into support or billing workflows where an AI agent creates and tracks customer payments.
FAQ
- How do I configure credentials?
Set UPI_DEEPLINKS_SCHEME_ID, UPI_DEEPLINKS_SECRET, and UPI_DEEPLINKS_PRODUCT_INSTANCE_ID in the environment or via the MCP server entry in the Claude config.
- Is this production-ready or sandbox?
The server supports both but defaults to SANDBOX. Use SETU_MODE to switch to production once credentials and compliance are ready.
- What inputs are required to create a payment link?
Required: amount (in paise), bill_id, payee_name. Optional: note.
- How can I test payments without real money?
Use the mock-payment tool (sandbox mode) specifying bill_id, upi_id, and amount in Rupees.
- How do I debug MCP interactions?
Use the MCP Inspector (npx @modelcontextprotocol/inspector uv …) to run and inspect MCP messages and lifecycle.
- How do I publish this package?
Use
uv publishafter building (uv build) and syncing (uv sync). Provide PyPI credentials via command flags or environment variables.