Testco Toolkit
An MCP (Model Context Protocol) server that provides AI agents with tools to interact with the Testco Payment Gateway API.
Overview
The Testco Toolkit enables AI assistants to perform payment operations on behalf of merchants. It exposes Testco Gateway API capabilities as MCP tools, allowing seamless integration with AI-powered applications.
What is Testco Gateway API?
Testco Gateway API helps merchants securely handle online payments by:
- Protecting sensitive information - Secure handling of payment data
- Reducing fraud risk - Built-in fraud prevention measures
- Automating payments - Faster transactions with fewer errors
- Supporting global commerce - Multiple payment methods and currencies
- Meeting compliance standards - PCI DSS and industry regulations
Features
- Payment Links - Create shareable payment links for customers
- More tools coming soon...
Prerequisites
- Node.js 18+
- A Testco Gateway merchant account (for payment features)
- API credentials (Merchant ID, API Key)
Installation
🚀 One-Click Install with npx (Recommended)
No installation needed! Just add to your VS Code MCP configuration:
Option A: Workspace config (.vscode/mcp.json):
{
"servers": {
"Testco-gateway": {
"type": "stdio",
"command": "npx",
"args": ["-y", "Testco-gateway-agent-toolkit"]
}
}
}
Option B: Global config (%APPDATA%\Code\User\mcp.json on Windows):
{
"servers": {
"Testco-gateway": {
"type": "stdio",
"command": "npx",
"args": ["-y", "Testco-gateway-agent-toolkit"]
}
}
}
That's it! Restart VS Code and the MCP server will be available in GitHub Copilot.
Manual Installation
git clone https://scm.testco.int/stash/scm/tesco.git
cd testcotoolkit
npm install
npm run build
Usage
Running the Server
npx Testco-gateway-agent-toolkit
npm start
Using with MCP Inspector
npm run inspector
This launches the MCP Inspector UI at http://localhost:6274 for testing tools interactively.
Integrating with AI Assistants
VS Code / GitHub Copilot
Add to .vscode/mcp.json:
{
"servers": {
"Testco-gateway": {
"type": "stdio",
"command": "npx",
"args": ["-y", "Testco-gateway-agent-toolkit"]
}
}
}
Claude Desktop
Add to Claude config (%APPDATA%\Claude\claude_desktop_config.json):
{
"mcpServers": {
"Testco-gateway": {
"command": "npx",
"args": ["-y", "Testco-gateway-agent-toolkit"]
}
}
}
Other MCP Clients
{
"mcpServers": {
"Testco-gateway": {
"command": "npx",
"args": ["-y", "Testco-gateway-agent-toolkit"]
}
}
}
Available Tools
create-payment-link | Creates a payment link for a specified amount and currency |
Project Structure
├── src/
│ ├── index.ts # Server entry point
│ └── tools/ # MCP tools directory
│ ├── index.ts # Dynamic tool loader
│ ├── README.md # Tool development guide
│ └── {tool-name}/ # Individual tool folders
│ ├── description.md
│ ├── schema.ts
│ ├── handler.ts
│ └── types.ts
├── build/ # Compiled JavaScript output
├── package.json
└── tsconfig.json
Adding New Tools
See src/tools/README.md for detailed instructions on creating new tools.
Quick summary:
- Create a folder in
src/tools/ with your tool name
- Add
description.md, schema.ts, handler.ts, and types.ts
- Run
npm run build
Development
npm run build
npm run build && npm start
npm run inspector
Configuration
Configure the server using environment variables. Add them to your MCP config:
{
"servers": {
"Testco-gateway": {
"type": "stdio",
"command": "npx",
"args": ["-y", "Testco-gateway-agent-toolkit"],
"env": {
"MPGS_MERCHANT_ID": "your-merchant-id",
"MPGS_API_KEY": "your-api-key"
}
}
}
}
Environment Variables
MERCHANT_ID | Yes | MY_MERCHANT_ID | Your Testco Gateway Merchant ID |
API_KEY | Yes | MY_API_KEY | Your API authentication key |
API_BASE_URL | No | MY_API_BASE_URL | Gateway API base URL |
MERCHANT_NAME | No | Merchant | Display name on payment pages |
MERCHANT_URL | No | https://www.example.com | Your merchant website URL |
RETURN_URL | No | https://www.example.com/return | Redirect URL after payment |
DEFAULT_CURRENCY | No | USD | Default currency code |
Production URLs
| MTF (Test) | https://mtf.gateway.Testco.com |
| Production (AP) | https://ap-gateway.Testco.com |
| Production (EU) | https://eu-gateway.Testco.com |
| Production (NA) | https://na-gateway.Testco.com |
License
ISC
Links