Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "mastercard-developers",
"metadata": {
"description": "Official Mastercard Developers plugins and skills for AI coding agents, including the Mastercard Developers MCP server and best practices for building integrations with Mastercard APIs."
},
"owner": {
"name": "Mastercard",
"email": "apisupport@mastercard.com"
},
"plugins": [
{
"name": "mastercard-developers",
"source": "./providers/claude/plugin/",
"description": "Mastercard Developers",
"version": "1.0.0",
"author": {
"name": "Mastercard"
}
}
]
}
27 changes: 27 additions & 0 deletions .codex-plugin/marketplace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "mastercard-developers",
"metadata": {
"description": "Official Mastercard Developers plugins and skills for AI coding agents, including the Mastercard Developers MCP server and best practices for building integrations with Mastercard APIs."
},
"owner": {
"name": "Mastercard",
"email": "apisupport@mastercard.com"
},
"plugins": [
{
"name": "mastercard-developers",
"version": "1.0.0",
"source": {
"source": "git-subdir",
"url": "https://github.com/Mastercard/developers-agent-toolkit.git",
"path": "providers/codex/plugin",
"ref": "main"
},
"policy": {
"installation": "AVAILABLE",
"authentication": "NONE"
},
"category": "Finance"
}
]
}
21 changes: 21 additions & 0 deletions .cursor-plugin/marketplace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "mastercard-developers",
"metadata": {
"description": "Official Mastercard Developers plugins and skills for AI coding agents, including the Mastercard Developers MCP server and best practices for building integrations with Mastercard APIs."
},
"owner": {
"name": "Mastercard",
"email": "apisupport@mastercard.com"
},
"plugins": [
{
"name": "mastercard-developers",
"source": "./providers/cursor/plugin/",
"description": "Mastercard Developers",
"version": "1.0.0",
"author": {
"name": "Mastercard"
}
}
]
}
Binary file added .github/assets/md-prompt-output1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/assets/md-prompt-output2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/assets/md-prompt.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions .github/workflows/guard-skills.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Guard Skills Sync
'on':
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
workflow_dispatch:
jobs:
skills-in-sync:
name: Verify provider skills match canonical skills/
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: 'Use Node.js 20.x'
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Check skills are in sync
run: node scripts/sync.js --check
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.DS_Store
.vscode
.idea
*.iml
.eslintcache
.npmrc
.mcpregistry*
108 changes: 108 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,114 @@ main().catch((error) => {

For more details, checkout [typescript](typescript/README.md) directory

## Agent Plugins
Comment thread
kshamajha marked this conversation as resolved.

[Agent skills](https://agentskills.io/home) are instructions that agents can use to build faster and more accurately. This repository provides official plugins that bundle the `mastercard-developers-bestpractice` skill together with the Mastercard Developers MCP server for popular agent harnesses.

If you use one of these harnesses, we recommend installing the plugin, which includes the MCP server and updates automatically.

> **Note:** The curated marketplace commands below (`@claude-plugins-official`, `@openai-curated`, and the Cursor slash command) work once the plugin is accepted into each vendor's registry. Until then, use the GitHub-based install shown under [Install from this repository](#install-from-this-repository).

### Claude Code

```bash
claude plugin install mastercard-developers@claude-plugins-official
```

### Codex

```bash
codex plugin add mastercard-developers@openai-curated
```

### Cursor

```bash
/add-plugin mastercard-developers
```

### Manual installation

> Manually installed skills don't auto-update. Run `npx skills update -y` to get the latest versions.

```bash
npx skills add Mastercard/developers-agent-toolkit
```

### Install from this repository

Before the plugins are listed in the curated marketplaces, you can install
directly from this GitHub repository.

**Claude Code** - add this repo as a marketplace, then install:

```bash
claude plugin marketplace add Mastercard/developers-agent-toolkit
claude plugin install mastercard-developers@mastercard-developers
```

**Skills only** (any supported agent) - install the skill straight from the repo:

```bash
npx skills add Mastercard/developers-agent-toolkit
```

Plugin sources live under [`providers/`](providers/), and the marketplace manifests are `.claude-plugin/marketplace.json`, `.codex-plugin/marketplace.json`, and `.cursor-plugin/marketplace.json`.

### Using the skill

Once the plugin (or MCP server) is installed, just prompt your agent in
plain language. The skill guides the agent to call the Mastercard
Developers MCP tools instead of relying on training data.

Try a prompt like:

```text
Using the Mastercard Developers tools, list the available services,
then show me the API operations for the Mastercard Locations API and
explain how to authenticate with OAuth 1.0a.
```

![Prompting the agent with the Mastercard Developers skill](.github/assets/md-prompt.jpg)

Results will include the service list, the API operations for the Locations API,
and details about the OAuth 1.0a integration:

![Service list and Locations API operations returned by the agent](.github/assets/md-prompt-output1.jpg)

![OAuth 1.0a integration details returned by the agent](.github/assets/md-prompt-output2.jpg)

Behind the scenes the agent chains the MCP tools to answer this, for example:

1. `get-services-list` - discover available Mastercard products/services.
2. `get-api-operation-list` - list operations for the chosen service's spec.
3. `get-documentation-page` - discover the correct swagger spec path.
4. `get-oauth10a-integration-guide` - pull the official authentication guide.

You don't call these tools directly - just describe your goal and the
agent selects the right tools.

### Editing skills

The [`skills/`](skills/) directory at the repository root is the **single source of truth** for every agent skill (for example `mastercard-developers-bestpractice`). Each provider under `providers/*/plugin/skills/` holds a synchronized copy - do not edit those copies directly.

To update a skill:

1. Edit the canonical file under `skills/` (e.g. `skills/mastercard-developers-bestpractice/SKILL.md`).
2. Run the sync script from the repository root to propagate the change to every provider:

```bash
node scripts/sync.js
```

To verify (without writing) that the provider copies match the canonical source - useful in CI or a pre-commit hook - run:

```bash
node scripts/sync.js --check
```

This exits non-zero if any provider skill is missing or out of sync.

## Contributing

Contributions are welcome. Please feel free to submit a pull request or open an issue to report a bug or suggest a feature.
Expand Down
54 changes: 54 additions & 0 deletions providers/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Provider Plugins

This directory contains plugins for different AI code editors and agent harnesses.

Most providers share the same vendor-specific layout:

```
providers/<provider>/plugin/
├── skills/ # Agent skills (mastercard-developers-bestpractice)
├── .mcp.json | mcp.json # Mastercard Developers MCP server wiring
└── .<provider>-plugin/ # Provider-specific plugin manifest (plugin.json)
```

The exception is `agent-plugins`, which follows the portable
[Agent Plugins v1](https://agent-plugins.org/specification) layout instead: a
root `plugin.json` (no `.<provider>-plugin/` subdirectory). See the table below.

## Providers

| Provider | Plugin manifest | MCP config |
|----------|-----------------|------------|
| `claude` | `.claude-plugin/plugin.json` | `.mcp.json` |
| `codex` | `.codex-plugin/plugin.json` | `.mcp.json` |
| `cursor` | `.cursor-plugin/plugin.json` | `mcp.json` |
| `agent-plugins` | `plugin.json` (root) | `mcp.json` |

The `agent-plugins` entry is a portable **[Agent Plugins v1](https://agent-plugins.org/specification)**
package: one vendor-neutral directory (`plugin.json` + `mcp.json` + `skills/`)
that any conformant client can load without a provider-specific manifest. It
collapses the duplicated per-vendor "box" into a single layout. Client-only
presentation data is kept in the vendor folders (e.g. `providers/codex/`) for
now; the Agent Plugins schema reserves `extensions.<reverse.domain>` for it if
needed later. See
[`agent-plugins/plugin/README.md`](agent-plugins/plugin/README.md).

## MCP server

Every plugin connects to the remote Mastercard Developers MCP server at
`https://developer.mcp.mastercard.com`, which requires **no authentication**.
A local `npx -y @mastercard/developers-mcp` alternative is documented in the
skill.

## Skills

Each plugin ships the `mastercard-developers-bestpractice` skill under
`skills/`. The skill instructs agents on how to set up the Mastercard
Developers MCP server (remote and local) and how to reach Mastercard
documentation in `llms.txt` format.

> **Do not edit the skill copies under `providers/*/plugin/skills/`.** They are
> generated from the canonical [`skills/`](../skills/) directory at the
> repository root. Edit the canonical file, then run `node scripts/sync.js`
> to propagate the change to every provider. `node scripts/sync.js --check`
> (also run in CI) verifies the copies are in sync.
51 changes: 51 additions & 0 deletions providers/agent-plugins/plugin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Agent Plugin (portable)

This directory is a portable **[Agent Plugins v1](https://agent-plugins.org/specification)**
package — a single, vendor-neutral layout that any conformant client (Claude
Code, Codex, Cursor, Gemini CLI, Antigravity, …) can load without a
provider-specific manifest.

```
plugin/
├── plugin.json # Agent Plugins manifest ($schema + name + metadata)
├── mcp.json # MCP server wiring (type: streamable-http)
└── skills/ # mastercard-developers-bestpractice (synced from /skills)
```

## Why this exists

The `providers/claude`, `providers/codex`, and `providers/cursor` folders each
carry a near-identical copy of the same skill + MCP server wrapped in a
different vendor manifest shape. Agent Plugins collapses that duplicated "box"
into one portable directory:

| Concern | Vendor-specific plugins | Agent Plugin |
| --- | --- | --- |
| Manifest | `.claude-plugin/`, `.codex-plugin/`, `.cursor-plugin/` | single root `plugin.json` |
| MCP config | `.mcp.json` / `mcp.json`, `type: "http"` | `mcp.json`, `type: "streamable-http"` |
| Client-only fields | top-level (e.g. Codex `interface`) | `extensions.<reverse.domain>` (sanctioned home; see note) |

> **Client-only metadata is intentionally not duplicated here yet.** The Codex
> `interface` block (catalog display name, category, brand color, etc.) still
> lives in [`providers/codex/`](../../codex/). The Agent Plugins schema is
> closed, so any such client-specific data would have to move under
> `extensions."<reverse.domain>"` — but the exact namespace a client reads is
> client-defined and unverified for us, so we keep the portable manifest lean
> and vendor-neutral until a client confirms both native `plugin.json` loading
> and its extension namespace.

## Notable spec differences from the vendor copies

- **MCP transport type** is `"streamable-http"` (the Agent Plugins value for a
remote MCP endpoint), not the vendor-native `"http"`.
- **`$schema` is required** on both `plugin.json` and `mcp.json`.
- **Client-specific data** (e.g. the Codex `interface` block) is **not**
duplicated here — it stays in [`providers/codex/`](../../codex/). If a client
ever needs it in the portable manifest, it must go under
`extensions."<reverse.domain>"`, because the manifest schema is closed and
rejects unknown top-level fields.

## Skills

The `skills/` copy is generated from the canonical [`/skills`](../../../skills)
directory by `node scripts/sync.js`. Do not edit it directly.
9 changes: 9 additions & 0 deletions providers/agent-plugins/plugin/mcp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "https://agent-plugins.org/schemas/1.0.0/mcp.schema.json",
"mcpServers": {
"mastercard-developers": {
"type": "streamable-http",
"url": "https://developer.mcp.mastercard.com"
}
}
}
25 changes: 25 additions & 0 deletions providers/agent-plugins/plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
"name": "mastercard-developers",
"version": "1.0.0",
"description": "Mastercard Developers plugin to help build integrations with Mastercard APIs, including best practices and the Mastercard Developers MCP server.",
"author": {
"name": "Mastercard",
"url": "https://developer.mastercard.com"
},
"homepage": "https://developer.mastercard.com",
"repository": "https://github.com/Mastercard/developers-agent-toolkit",
"license": "MIT",
"keywords": [
"mastercard",
"mastercard-developers",
"payments",
"api",
"open-banking",
"open-finance",
"integration",
"mcp",
"modelcontextprotocol",
"agent-toolkit"
]
}
Loading
Loading