JSPM

@mastercard/developers-agent-toolkit

0.1.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 154
  • Score
    100M100P100Q92679F
  • License MIT

Agent Toolkit for Mastercard Developers Platform

Package Exports

  • @mastercard/developers-agent-toolkit/mcp

Readme

Mastercard Agent Toolkit - TypeScript

mastercard developers logo

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.

Installation

npm install --save @mastercard/developers-agent-toolkit

Requirements

  • Node 18+

Usage

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/documentation
  • apiSpecification: 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. NOTE: This will override any value provided in service configuration.

If you specify service or api-specification then the get-services-list tool will be disabled.

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);
});

References