Skip to content
Merged
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
12 changes: 10 additions & 2 deletions packages/plugin/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mpp-inspector",
"description": "Inspect, debug, and test Machine Payments Protocol (HTTP 402) endpoints directly from your AI coding assistant",
"description": "Inspect, debug, and test Machine Payments Protocol (HTTP 402) endpoints directly from Claude Code",
"version": "0.1.0",
"author": {
"name": "MPP Inspector Contributors",
Expand All @@ -17,5 +17,13 @@
"tempo",
"debugging",
"mcp"
]
],
"commands": ["./skills/"],
"mcpServers": {
"mpp-inspector": {
"command": "node",
"args": ["${CLAUDE_PLUGIN_ROOT}/dist/index.js"]
}
},
"hooks": "./hooks/hooks.json"
}
3 changes: 2 additions & 1 deletion packages/plugin/hooks/hooks.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
"hooks": {
"SessionStart": [
{
"matcher": "startup|resume",
"hooks": [
{
"type": "command",
"command": "node ${CLAUDE_PLUGIN_ROOT}/dist/hooks/session-check.js",
"command": "node \"${CLAUDE_PLUGIN_ROOT}/dist/hooks/session-check.js\"",
"timeout": 5000
}
]
Expand Down
3 changes: 1 addition & 2 deletions packages/plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
"dist",
".claude-plugin",
"skills",
"hooks",
".mcp.json"
"hooks"
],
"scripts": {
"build": "tsup",
Expand Down
27 changes: 27 additions & 0 deletions packages/plugin/skills/mpp-flow/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
description: Dry-run the full MPP (Machine Payments Protocol) payment flow against a URL. Steps through request, parse, sign, retry, and verify without making real transactions.
---

# MPP Flow

Dry-run the full MPP payment flow against an endpoint.

## Usage

```
/mpp-flow <url>
/mpp-flow https://mpp.dev/api/ping/paid
```

## What to do

1. Use the `mpp_flow` MCP tool with the URL provided by the user
2. Present each step of the flow:
- Step 1: Request resource (GET/POST)
- Step 2: Parse 402 challenge
- Step 3: Sign transaction (dry-run — shows what would happen)
- Step 4: Retry with credential (dry-run)
- Step 5: Verify receipt (dry-run)
3. Show timing breakdown and total flow time

If no URL is provided, use the default: `https://mpp.dev/api/ping/paid`
37 changes: 37 additions & 0 deletions packages/plugin/skills/mpp-inspect/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
description: Inspect an MPP (Machine Payments Protocol) 402 challenge from a URL. Parses the WWW-Authenticate header, decodes the base64url request payload, identifies the payment method, and runs verification checks.
---

# MPP Inspect

Inspect a 402 Payment Required challenge from an MPP endpoint.

## Usage

```
/mpp-inspect <url>
/mpp-inspect https://mpp.dev/api/ping/paid
```

## What to do

1. Use the `mpp_inspect` MCP tool with the URL provided by the user
2. Present the results clearly:
- Challenge ID, realm, method, intent
- Decoded request payload (amount, currency, recipient, chainId)
- Problem Details body if present (RFC 9457)
- Verification results (expiry, method known, amount parseable, recipient valid)
3. Explain any issues found in plain language

If no URL is provided, use the default test endpoint: `https://mpp.dev/api/ping/paid`

## Example output format

```
MPP Challenge at https://mpp.dev/api/ping/paid
- Method: Tempo (blockchain stablecoin)
- Amount: 100,000 units
- Chain: Tempo Mainnet (42431)
- Expires in: 5 minutes
- All verification checks passed ✓
```
24 changes: 24 additions & 0 deletions packages/plugin/skills/mpp-scan/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
description: Scan a domain for MPP (Machine Payments Protocol) endpoints. Checks /.well-known/mpp.json, /llms.txt, /health, and optionally probes common API paths.
---

# MPP Scan

Discover MPP endpoints on a domain.

## Usage

```
/mpp-scan <domain>
/mpp-scan mpp.dev
```

## What to do

1. Use the `mpp_scan` MCP tool with the domain provided by the user
2. Present discovered endpoints:
- Which discovery files exist (mpp.json, llms.txt, health)
- List of endpoints found with their payment methods and pricing
3. Suggest follow-up actions (e.g., inspect specific endpoints)

If the user adds `--probe`, set `probe: true` to also check common API paths.
Loading