Model Context Protocol (MCP)
Enable AI agent interactions with the Moneris API using MCP
Overview
The Moneris Model Context Protocol (MCP) server exposes tools that MCP-compatible AI agents can use to interact with the Moneris APIs for payment processing, customer management, subscriptions, and more.
If you use an AI-powered code editor like Cursor, VS Code, or Claude Code, you can connect it to the Moneris MCP server. The same goes for general-purpose tools like GitHub Copilot and Claude.
Remote server
Moneris hosts a streamable HTTP MCP server at:
- Sandbox:
https://mcp.sb.moneris.io/ - Production:
https://mcp.moneris.io/
By the end of this guide, your agent will make authenticated requests to the Moneris API.
Prerequisites
- A Moneris merchant account with API access.
- Your Moneris API credentials (API key and Merchant ID).
- MCP-compatible AI-powered tools such as: Cursor, VS Code, Claude.
Step 1: Configure the Moneris MCP server in your editor
Before your AI agent can interact with the Moneris API, it needs to know where the MCP server lives. This step registers the remote Moneris MCP server with your editor so all subsequent tool calls route through it.
Add the Moneris MCP server configuration to your editor. The Moneris remote MCP server is hosted at https://mcp.sb.moneris.io/.
Add the following to your ~/.cursor/mcp.json file:
{
"mcpServers": {
"moneris": {
"url": "https://mcp.sb.moneris.io/",
"headers": {
"x-api-key": "${env:MONERIS_API_KEY}",
"x-merchant-id": "${env:MONERIS_MERCHANT_ID}"
}
}
}
}To learn more, see the Cursor MCP documentation.
Step 2: Process your first payment with an AI agent
This scenario walks through creating a customer and processing a basic payment using your AI agent and the Moneris MCP server.
Prerequisites
- Step 1 completed.
- A valid stored payment method ID, created outside of MCP, LLM, or agent interactions.
2.1 Create a customer (optional)
Example prompt: Create a customer with the first name Jane, last name Doe, and email [email protected].
Expected output: Customer ID.
2.2 Create a payment
Example prompt: Create a CAD payment for $10.00 using stored payment method ID <STORED_PAYMENT_METHOD_ID> and capture it automatically.
Expected output: Payment ID.
Additional notes
- Payments are processed immediately when
automaticCaptureis set totrue. - Enable human confirmation for payment-related tools.
Security considerations
- Raw card data. Never pass raw card data in chat messages or to LLMs / agents.
- MCP server scope. The Moneris MCP server doesn't request or expect raw card data.
- Stored payment methods. Use Moneris stored payment method IDs instead of raw card data.
- Credentials in chat. Avoid passing Merchant IDs or API keys in chat messages.
- Hardcoded secrets. Never hardcode secrets in source code or version control.
- Environment separation. Always use sandbox credentials for development and testing.
- Tool confirmation. Enable human confirmation for payment-related tools in production.
- HTTPS. Always use HTTPS in production environments.
Error handling
The MCP server returns errors for:
- Network connectivity issues
- Authentication failures
- Invalid request parameters
- API rate limiting
- Server errors
Errors are returned in a consistent JSON-RPC format with a descriptive message field to help with debugging.
Available tools
The server exposes the following MCP tools for interacting with the Moneris API. We recommend enabling human confirmation for tools and exercising caution when combining the Moneris MCP server with other MCP servers to avoid unintended transactions.
| Resource | Tool | Description |
|---|---|---|
| Payments | create_payment | Create a payment using a payment method ID only |
retrieve_payment | Retrieve a payment by ID | |
list_payments | List payments with pagination and filtering | |
cancel_payment | Cancel a payment | |
complete_payment | Complete a payment (for two-step transactions) | |
| Refunds | retrieve_refund | Retrieve a refund by ID |
list_refunds | List refunds with pagination and filtering | |
| Payment methods | retrieve_payment_method | Retrieve a payment method by ID |
list_payment_methods | List payment methods with pagination | |
| Card validation | retrieve_card_validation | Retrieve card validation results |
list_card_validations | List card validations with pagination | |
| Customers | create_customer | Create a new customer |
retrieve_customer | Retrieve customer details by ID | |
list_customers | List customers with pagination and filtering | |
| Multi-currency pricing | mcpRate | Lock exchange rates for multi-currency payments or refunds |
getMultiCurrencyPricingRateById | Retrieve the locked MCP rate details by lookup ID | |
| Subscriptions | list_subscriptions | Retrieves a list of subscriptions |
retrieve_subscription | Retrieve subscription details by subscription ID | |
| Surcharge | surcharge_lookup | Performs a surcharge lookup to determine if a payment method is eligible for surcharge |
Support
For issues related to:
- Moneris API: Contact Moneris support or refer to the Moneris Developer Portal.
- MCP server: Check the server logs and ensure proper configuration. Contact [email protected] for any product feedback.
- Integration: Verify your API credentials and network connectivity.
See also
- Moneris Developer Portal
- Model Context Protocol Specification
- Cursor MCP documentation
- VS Code MCP server documentation
- Claude Code MCP documentation
