Agent Toolkit for Mastercard Developers Platform
The Mastercard Developers Agent Toolkit allows popular agent frameworks (currently Model Context Protocol - MCP) to integrate with Mastercard Developers for service discovery and integration guides.
``bash`
npm install --save @mastercard/developers-agent-toolkit
- Node 18+
You can optionally specify service or apiSpecification as part of the configuration.
- service: URL of the documentation of a service that you want the MCP to focus on e.g. https://developer.mastercard.com/mdes-customer-service/documentationapiSpecification
- : URL of the API specification that you want the MCP tools to focus on e.g. https://static.developer.mastercard.com/content/match/swagger/match-pro.yaml. You can get the link from Download Spec button in the API Reference page of service.service
NOTE: This will override any value provided in configuration.
If you specify service or api-specification then the get-services-list tool will be disabled.
`typescript
import { MastercardDevelopersAgentToolkit } from '@mastercard/developers-agent-toolkit/mcp';
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
const server = new MastercardDevelopersAgentToolkit({
configuration: {
service: 'https://developer.mastercard.com/open-finance-us/documentation',
},
});
async function main() {
const transport = new StdioServerTransport();
await server.connect(transport);
console.error('Mastercard Developers MCP Server running on stdio');
}
main().catch((error) => {
console.error('Fatal error in main():', error);
process.exit(1);
});
``
- Mastercard Developers Platform
- Model Context Protocol
- MCP SDKs