agent-commerce-protocol-mcp 1.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Nicholas Templeman / MEOK AI Labs (CSOAI LTD, UK Companies House 16939677)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,136 @@
1
+ Metadata-Version: 2.4
2
+ Name: agent-commerce-protocol-mcp
3
+ Version: 1.0.1
4
+ Summary: Agent Commerce Protocol MCP — bridges Stripe ACP + Google AP2 + Coinbase x402 for agent payments inside ChatGPT, AP2 coalition rails, and pay-per-call x402 flows. By MEOK AI Labs.
5
+ Author-email: Nicholas Templeman <nicholas@meok.ai>
6
+ License: MIT
7
+ Project-URL: Homepage, https://meok.ai/a2a
8
+ Project-URL: Repository, https://github.com/CSOAI-ORG/agent-commerce-protocol-mcp
9
+ Project-URL: Documentation, https://meok.ai/protocols
10
+ Keywords: mcp,mcp-server,model-context-protocol,stripe,acp,agentic-commerce,ap2,x402,agent-payments,meok
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Topic :: Office/Business :: Financial
18
+ Classifier: Topic :: Internet :: WWW/HTTP
19
+ Classifier: Intended Audience :: Developers
20
+ Requires-Python: >=3.10
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ Requires-Dist: mcp[cli]>=1.3.0
24
+ Dynamic: license-file
25
+
26
+ # Agent Commerce Protocol MCP
27
+
28
+ > ## 🧱 Part of the MEOK A2A Substrate
29
+ >
30
+ > All 12 A2A primitives + Stripe ACP bridge as one signed pipeline for
31
+ > **£499/mo**. See [meok.ai/a2a](https://meok.ai/a2a).
32
+
33
+ # Bridges Stripe ACP + Google AP2 + Coinbase x402
34
+
35
+ <!-- mcp-name: io.github.CSOAI-ORG/agent-commerce-protocol-mcp -->
36
+
37
+ [![PyPI](https://img.shields.io/pypi/v/agent-commerce-protocol-mcp)](https://pypi.org/project/agent-commerce-protocol-mcp/)
38
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
39
+ [![MCP Registry](https://img.shields.io/badge/MCP_Registry-Published-green)](https://registry.modelcontextprotocol.io)
40
+
41
+ ## The "ACP" name collision
42
+
43
+ There are two protocols called "ACP" — they do different things:
44
+
45
+ | | IBM ACP | **Stripe ACP** |
46
+ |---|---|---|
47
+ | **Full name** | Agent Communication Protocol | Agentic Commerce Protocol |
48
+ | **Owner** | IBM Research (was) | Stripe + OpenAI |
49
+ | **Status** | Merged into A2A under Linux Foundation Sept 2025 | LIVE — Apache 2.0 |
50
+ | **What it does** | Agent-to-agent messaging | In-conversation payments |
51
+ | **Where you hit it** | A2A protocol stack | ChatGPT merchant flows |
52
+ | **MEOK coverage** | A2A Substrate (12 MCPs) | **THIS MCP** |
53
+
54
+ This MCP is **the Stripe ACP one** — agent payments inside ChatGPT-style flows.
55
+
56
+ ## What this gives you
57
+
58
+ The **only MCP that bridges all 3 live agent-payment protocols**:
59
+
60
+ - **Stripe ACP** — primary, for ChatGPT merchant flows
61
+ - **Google AP2** — bridged, for the 60-org Mastercard/PayPal/Adyen coalition
62
+ - **Coinbase x402** — bridged, for HTTP-402 pay-per-call without a Stripe account
63
+
64
+ Plus EU compliance overlays automatically applied to every transaction: **PSD2** (EU), **MiCA** (EU crypto), **6AMLD** (EU AML), **FinCEN BSA** (US).
65
+
66
+ Every payment intent + verification signs into the MEOK audit chain at `verify.meok.ai`.
67
+
68
+ ## Tools
69
+
70
+ | Tool | Purpose |
71
+ |---|---|
72
+ | `discover_acp_merchants(category?)` | List Stripe-ACP-compatible merchants |
73
+ | `prepare_payment_intent(merchant_id, items, currency)` | Build Stripe ACP intent |
74
+ | `sign_payment_intent(intent)` | HMAC-sign + chain into audit log |
75
+ | `verify_acp_response(response, expected_intent_id?)` | Verify merchant attestation |
76
+ | `bridge_to_ap2_mandate(intent, user_consent_jwt?)` | Convert to Google AP2 mandate |
77
+ | `bridge_to_x402_paywall(intent)` | Convert to Coinbase HTTP 402 |
78
+ | `list_supported_protocols()` | Capability discovery |
79
+
80
+ ## Quick install
81
+
82
+ ```bash
83
+ uvx agent-commerce-protocol-mcp
84
+ pip install agent-commerce-protocol-mcp
85
+ npx @meok-ai/agent-commerce-protocol-mcp
86
+ ```
87
+
88
+ Claude Desktop / Cursor / Windsurf MCP config:
89
+
90
+ ```json
91
+ {
92
+ "mcpServers": {
93
+ "agent-commerce-protocol": {
94
+ "command": "uvx",
95
+ "args": ["agent-commerce-protocol-mcp"]
96
+ }
97
+ }
98
+ }
99
+ ```
100
+
101
+ ## Why this matters for £-revenue
102
+
103
+ Stripe ACP is the protocol Stripe + OpenAI are pushing through ChatGPT's shopping interface. Every ChatGPT merchant gets Stripe ACP free with their OpenAI integration. If your agent participates in ChatGPT commerce (or any merchant flow built on Stripe Connect ACP), you need this MCP to:
104
+
105
+ 1. **Initiate signed payment intents** with audit-trail evidence for EU AI Act Article 12 + DORA Article 17
106
+ 2. **Bridge to AP2 mandates** if the merchant runs on Mastercard/PayPal/Adyen rails instead of pure Stripe
107
+ 3. **Bridge to x402** if your agent settles micropayments on-chain (Base / Polygon / Solana / Lightning)
108
+
109
+ ## Sister MCPs
110
+
111
+ Part of the MEOK **A2A** pack:
112
+
113
+ - **agent-commerce-payments-mcp** → invoicing + escrow + AML/KYC
114
+ - **agent-prompt-injection-firewall-mcp** → scan payment prompts for injection
115
+ - **agent-policy-enforcement-mcp** → gate which agents can spend
116
+ - **agent-rate-limiter-mcp** → cap call volume per session
117
+ - **agent-audit-logger-mcp** → hash-chained log of every payment intent
118
+ - **agent-identity-trust-mcp** → buyer DID resolution
119
+
120
+ Full catalogue: [meok.ai/anthropic-registry](https://meok.ai/anthropic-registry)
121
+
122
+ ## Protocol coverage + Universal PAYG
123
+
124
+ | Option | Price | Best for |
125
+ |---|---|---|
126
+ | Self-host (this MCP) | £0 — MIT | Devs |
127
+ | This MCP Starter | £29/mo | One-MCP teams |
128
+ | Universal PAYG | £29/mo + £0.0002/call | Spiky usage |
129
+ | A2A Substrate | £499/mo | All 13 A2A MCPs |
130
+ | Universe | £1,499/mo | All 48 MEOK MCPs |
131
+
132
+ Buy: https://meok.ai/a2a
133
+
134
+ ## Licence
135
+
136
+ MIT. By [MEOK AI Labs](https://meok.ai) (CSOAI LTD, UK Companies House 16939677). Founder: [Nicholas Templeman](mailto:nicholas@meok.ai).
@@ -0,0 +1,111 @@
1
+ # Agent Commerce Protocol MCP
2
+
3
+ > ## 🧱 Part of the MEOK A2A Substrate
4
+ >
5
+ > All 12 A2A primitives + Stripe ACP bridge as one signed pipeline for
6
+ > **£499/mo**. See [meok.ai/a2a](https://meok.ai/a2a).
7
+
8
+ # Bridges Stripe ACP + Google AP2 + Coinbase x402
9
+
10
+ <!-- mcp-name: io.github.CSOAI-ORG/agent-commerce-protocol-mcp -->
11
+
12
+ [![PyPI](https://img.shields.io/pypi/v/agent-commerce-protocol-mcp)](https://pypi.org/project/agent-commerce-protocol-mcp/)
13
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
14
+ [![MCP Registry](https://img.shields.io/badge/MCP_Registry-Published-green)](https://registry.modelcontextprotocol.io)
15
+
16
+ ## The "ACP" name collision
17
+
18
+ There are two protocols called "ACP" — they do different things:
19
+
20
+ | | IBM ACP | **Stripe ACP** |
21
+ |---|---|---|
22
+ | **Full name** | Agent Communication Protocol | Agentic Commerce Protocol |
23
+ | **Owner** | IBM Research (was) | Stripe + OpenAI |
24
+ | **Status** | Merged into A2A under Linux Foundation Sept 2025 | LIVE — Apache 2.0 |
25
+ | **What it does** | Agent-to-agent messaging | In-conversation payments |
26
+ | **Where you hit it** | A2A protocol stack | ChatGPT merchant flows |
27
+ | **MEOK coverage** | A2A Substrate (12 MCPs) | **THIS MCP** |
28
+
29
+ This MCP is **the Stripe ACP one** — agent payments inside ChatGPT-style flows.
30
+
31
+ ## What this gives you
32
+
33
+ The **only MCP that bridges all 3 live agent-payment protocols**:
34
+
35
+ - **Stripe ACP** — primary, for ChatGPT merchant flows
36
+ - **Google AP2** — bridged, for the 60-org Mastercard/PayPal/Adyen coalition
37
+ - **Coinbase x402** — bridged, for HTTP-402 pay-per-call without a Stripe account
38
+
39
+ Plus EU compliance overlays automatically applied to every transaction: **PSD2** (EU), **MiCA** (EU crypto), **6AMLD** (EU AML), **FinCEN BSA** (US).
40
+
41
+ Every payment intent + verification signs into the MEOK audit chain at `verify.meok.ai`.
42
+
43
+ ## Tools
44
+
45
+ | Tool | Purpose |
46
+ |---|---|
47
+ | `discover_acp_merchants(category?)` | List Stripe-ACP-compatible merchants |
48
+ | `prepare_payment_intent(merchant_id, items, currency)` | Build Stripe ACP intent |
49
+ | `sign_payment_intent(intent)` | HMAC-sign + chain into audit log |
50
+ | `verify_acp_response(response, expected_intent_id?)` | Verify merchant attestation |
51
+ | `bridge_to_ap2_mandate(intent, user_consent_jwt?)` | Convert to Google AP2 mandate |
52
+ | `bridge_to_x402_paywall(intent)` | Convert to Coinbase HTTP 402 |
53
+ | `list_supported_protocols()` | Capability discovery |
54
+
55
+ ## Quick install
56
+
57
+ ```bash
58
+ uvx agent-commerce-protocol-mcp
59
+ pip install agent-commerce-protocol-mcp
60
+ npx @meok-ai/agent-commerce-protocol-mcp
61
+ ```
62
+
63
+ Claude Desktop / Cursor / Windsurf MCP config:
64
+
65
+ ```json
66
+ {
67
+ "mcpServers": {
68
+ "agent-commerce-protocol": {
69
+ "command": "uvx",
70
+ "args": ["agent-commerce-protocol-mcp"]
71
+ }
72
+ }
73
+ }
74
+ ```
75
+
76
+ ## Why this matters for £-revenue
77
+
78
+ Stripe ACP is the protocol Stripe + OpenAI are pushing through ChatGPT's shopping interface. Every ChatGPT merchant gets Stripe ACP free with their OpenAI integration. If your agent participates in ChatGPT commerce (or any merchant flow built on Stripe Connect ACP), you need this MCP to:
79
+
80
+ 1. **Initiate signed payment intents** with audit-trail evidence for EU AI Act Article 12 + DORA Article 17
81
+ 2. **Bridge to AP2 mandates** if the merchant runs on Mastercard/PayPal/Adyen rails instead of pure Stripe
82
+ 3. **Bridge to x402** if your agent settles micropayments on-chain (Base / Polygon / Solana / Lightning)
83
+
84
+ ## Sister MCPs
85
+
86
+ Part of the MEOK **A2A** pack:
87
+
88
+ - **agent-commerce-payments-mcp** → invoicing + escrow + AML/KYC
89
+ - **agent-prompt-injection-firewall-mcp** → scan payment prompts for injection
90
+ - **agent-policy-enforcement-mcp** → gate which agents can spend
91
+ - **agent-rate-limiter-mcp** → cap call volume per session
92
+ - **agent-audit-logger-mcp** → hash-chained log of every payment intent
93
+ - **agent-identity-trust-mcp** → buyer DID resolution
94
+
95
+ Full catalogue: [meok.ai/anthropic-registry](https://meok.ai/anthropic-registry)
96
+
97
+ ## Protocol coverage + Universal PAYG
98
+
99
+ | Option | Price | Best for |
100
+ |---|---|---|
101
+ | Self-host (this MCP) | £0 — MIT | Devs |
102
+ | This MCP Starter | £29/mo | One-MCP teams |
103
+ | Universal PAYG | £29/mo + £0.0002/call | Spiky usage |
104
+ | A2A Substrate | £499/mo | All 13 A2A MCPs |
105
+ | Universe | £1,499/mo | All 48 MEOK MCPs |
106
+
107
+ Buy: https://meok.ai/a2a
108
+
109
+ ## Licence
110
+
111
+ MIT. By [MEOK AI Labs](https://meok.ai) (CSOAI LTD, UK Companies House 16939677). Founder: [Nicholas Templeman](mailto:nicholas@meok.ai).
@@ -0,0 +1,136 @@
1
+ Metadata-Version: 2.4
2
+ Name: agent-commerce-protocol-mcp
3
+ Version: 1.0.1
4
+ Summary: Agent Commerce Protocol MCP — bridges Stripe ACP + Google AP2 + Coinbase x402 for agent payments inside ChatGPT, AP2 coalition rails, and pay-per-call x402 flows. By MEOK AI Labs.
5
+ Author-email: Nicholas Templeman <nicholas@meok.ai>
6
+ License: MIT
7
+ Project-URL: Homepage, https://meok.ai/a2a
8
+ Project-URL: Repository, https://github.com/CSOAI-ORG/agent-commerce-protocol-mcp
9
+ Project-URL: Documentation, https://meok.ai/protocols
10
+ Keywords: mcp,mcp-server,model-context-protocol,stripe,acp,agentic-commerce,ap2,x402,agent-payments,meok
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Topic :: Office/Business :: Financial
18
+ Classifier: Topic :: Internet :: WWW/HTTP
19
+ Classifier: Intended Audience :: Developers
20
+ Requires-Python: >=3.10
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ Requires-Dist: mcp[cli]>=1.3.0
24
+ Dynamic: license-file
25
+
26
+ # Agent Commerce Protocol MCP
27
+
28
+ > ## 🧱 Part of the MEOK A2A Substrate
29
+ >
30
+ > All 12 A2A primitives + Stripe ACP bridge as one signed pipeline for
31
+ > **£499/mo**. See [meok.ai/a2a](https://meok.ai/a2a).
32
+
33
+ # Bridges Stripe ACP + Google AP2 + Coinbase x402
34
+
35
+ <!-- mcp-name: io.github.CSOAI-ORG/agent-commerce-protocol-mcp -->
36
+
37
+ [![PyPI](https://img.shields.io/pypi/v/agent-commerce-protocol-mcp)](https://pypi.org/project/agent-commerce-protocol-mcp/)
38
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
39
+ [![MCP Registry](https://img.shields.io/badge/MCP_Registry-Published-green)](https://registry.modelcontextprotocol.io)
40
+
41
+ ## The "ACP" name collision
42
+
43
+ There are two protocols called "ACP" — they do different things:
44
+
45
+ | | IBM ACP | **Stripe ACP** |
46
+ |---|---|---|
47
+ | **Full name** | Agent Communication Protocol | Agentic Commerce Protocol |
48
+ | **Owner** | IBM Research (was) | Stripe + OpenAI |
49
+ | **Status** | Merged into A2A under Linux Foundation Sept 2025 | LIVE — Apache 2.0 |
50
+ | **What it does** | Agent-to-agent messaging | In-conversation payments |
51
+ | **Where you hit it** | A2A protocol stack | ChatGPT merchant flows |
52
+ | **MEOK coverage** | A2A Substrate (12 MCPs) | **THIS MCP** |
53
+
54
+ This MCP is **the Stripe ACP one** — agent payments inside ChatGPT-style flows.
55
+
56
+ ## What this gives you
57
+
58
+ The **only MCP that bridges all 3 live agent-payment protocols**:
59
+
60
+ - **Stripe ACP** — primary, for ChatGPT merchant flows
61
+ - **Google AP2** — bridged, for the 60-org Mastercard/PayPal/Adyen coalition
62
+ - **Coinbase x402** — bridged, for HTTP-402 pay-per-call without a Stripe account
63
+
64
+ Plus EU compliance overlays automatically applied to every transaction: **PSD2** (EU), **MiCA** (EU crypto), **6AMLD** (EU AML), **FinCEN BSA** (US).
65
+
66
+ Every payment intent + verification signs into the MEOK audit chain at `verify.meok.ai`.
67
+
68
+ ## Tools
69
+
70
+ | Tool | Purpose |
71
+ |---|---|
72
+ | `discover_acp_merchants(category?)` | List Stripe-ACP-compatible merchants |
73
+ | `prepare_payment_intent(merchant_id, items, currency)` | Build Stripe ACP intent |
74
+ | `sign_payment_intent(intent)` | HMAC-sign + chain into audit log |
75
+ | `verify_acp_response(response, expected_intent_id?)` | Verify merchant attestation |
76
+ | `bridge_to_ap2_mandate(intent, user_consent_jwt?)` | Convert to Google AP2 mandate |
77
+ | `bridge_to_x402_paywall(intent)` | Convert to Coinbase HTTP 402 |
78
+ | `list_supported_protocols()` | Capability discovery |
79
+
80
+ ## Quick install
81
+
82
+ ```bash
83
+ uvx agent-commerce-protocol-mcp
84
+ pip install agent-commerce-protocol-mcp
85
+ npx @meok-ai/agent-commerce-protocol-mcp
86
+ ```
87
+
88
+ Claude Desktop / Cursor / Windsurf MCP config:
89
+
90
+ ```json
91
+ {
92
+ "mcpServers": {
93
+ "agent-commerce-protocol": {
94
+ "command": "uvx",
95
+ "args": ["agent-commerce-protocol-mcp"]
96
+ }
97
+ }
98
+ }
99
+ ```
100
+
101
+ ## Why this matters for £-revenue
102
+
103
+ Stripe ACP is the protocol Stripe + OpenAI are pushing through ChatGPT's shopping interface. Every ChatGPT merchant gets Stripe ACP free with their OpenAI integration. If your agent participates in ChatGPT commerce (or any merchant flow built on Stripe Connect ACP), you need this MCP to:
104
+
105
+ 1. **Initiate signed payment intents** with audit-trail evidence for EU AI Act Article 12 + DORA Article 17
106
+ 2. **Bridge to AP2 mandates** if the merchant runs on Mastercard/PayPal/Adyen rails instead of pure Stripe
107
+ 3. **Bridge to x402** if your agent settles micropayments on-chain (Base / Polygon / Solana / Lightning)
108
+
109
+ ## Sister MCPs
110
+
111
+ Part of the MEOK **A2A** pack:
112
+
113
+ - **agent-commerce-payments-mcp** → invoicing + escrow + AML/KYC
114
+ - **agent-prompt-injection-firewall-mcp** → scan payment prompts for injection
115
+ - **agent-policy-enforcement-mcp** → gate which agents can spend
116
+ - **agent-rate-limiter-mcp** → cap call volume per session
117
+ - **agent-audit-logger-mcp** → hash-chained log of every payment intent
118
+ - **agent-identity-trust-mcp** → buyer DID resolution
119
+
120
+ Full catalogue: [meok.ai/anthropic-registry](https://meok.ai/anthropic-registry)
121
+
122
+ ## Protocol coverage + Universal PAYG
123
+
124
+ | Option | Price | Best for |
125
+ |---|---|---|
126
+ | Self-host (this MCP) | £0 — MIT | Devs |
127
+ | This MCP Starter | £29/mo | One-MCP teams |
128
+ | Universal PAYG | £29/mo + £0.0002/call | Spiky usage |
129
+ | A2A Substrate | £499/mo | All 13 A2A MCPs |
130
+ | Universe | £1,499/mo | All 48 MEOK MCPs |
131
+
132
+ Buy: https://meok.ai/a2a
133
+
134
+ ## Licence
135
+
136
+ MIT. By [MEOK AI Labs](https://meok.ai) (CSOAI LTD, UK Companies House 16939677). Founder: [Nicholas Templeman](mailto:nicholas@meok.ai).
@@ -0,0 +1,11 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ server.py
5
+ agent_commerce_protocol_mcp.egg-info/PKG-INFO
6
+ agent_commerce_protocol_mcp.egg-info/SOURCES.txt
7
+ agent_commerce_protocol_mcp.egg-info/dependency_links.txt
8
+ agent_commerce_protocol_mcp.egg-info/entry_points.txt
9
+ agent_commerce_protocol_mcp.egg-info/requires.txt
10
+ agent_commerce_protocol_mcp.egg-info/top_level.txt
11
+ tests/test_acp.py
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ agent-commerce-protocol-mcp = server:main
@@ -0,0 +1,36 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "agent-commerce-protocol-mcp"
7
+ version = "1.0.1"
8
+ description = "Agent Commerce Protocol MCP — bridges Stripe ACP + Google AP2 + Coinbase x402 for agent payments inside ChatGPT, AP2 coalition rails, and pay-per-call x402 flows. By MEOK AI Labs."
9
+ readme = "README.md"
10
+ license = { text = "MIT" }
11
+ requires-python = ">=3.10"
12
+ authors = [{ name = "Nicholas Templeman", email = "nicholas@meok.ai" }]
13
+ keywords = ["mcp", "mcp-server", "model-context-protocol", "stripe", "acp", "agentic-commerce", "ap2", "x402", "agent-payments", "meok"]
14
+ classifiers = [
15
+ "Development Status :: 4 - Beta",
16
+ "License :: OSI Approved :: MIT License",
17
+ "Programming Language :: Python :: 3",
18
+ "Programming Language :: Python :: 3.10",
19
+ "Programming Language :: Python :: 3.11",
20
+ "Programming Language :: Python :: 3.12",
21
+ "Topic :: Office/Business :: Financial",
22
+ "Topic :: Internet :: WWW/HTTP",
23
+ "Intended Audience :: Developers",
24
+ ]
25
+ dependencies = ["mcp[cli]>=1.3.0"]
26
+
27
+ [project.urls]
28
+ Homepage = "https://meok.ai/a2a"
29
+ Repository = "https://github.com/CSOAI-ORG/agent-commerce-protocol-mcp"
30
+ Documentation = "https://meok.ai/protocols"
31
+
32
+ [project.scripts]
33
+ agent-commerce-protocol-mcp = "server:main"
34
+
35
+ [tool.setuptools]
36
+ py-modules = ["server"]
@@ -0,0 +1,304 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Agent Commerce Protocol MCP — Stripe ACP bridge
4
+ ================================================
5
+
6
+ By MEOK AI Labs · https://meok.ai · MIT
7
+ <!-- mcp-name: io.github.CSOAI-ORG/agent-commerce-protocol-mcp -->
8
+
9
+ WHAT THIS BRIDGES
10
+ -----------------
11
+ The Stripe + OpenAI Agentic Commerce Protocol (ACP) — the in-conversation
12
+ payments protocol used by ChatGPT merchants. Apache 2.0, designed for B2C
13
+ agent commerce.
14
+
15
+ NOTE ON THE "ACP" ACRONYM COLLISION
16
+ -----------------------------------
17
+ There are two protocols sharing the "ACP" name:
18
+ • IBM ACP (Agent Communication Protocol) — merged into A2A under Linux
19
+ Foundation in Sept 2025. Covered by MEOK A2A Substrate.
20
+ • Stripe ACP (Agentic Commerce Protocol) — THIS MCP. Separate live
21
+ protocol, ChatGPT merchant-first.
22
+
23
+ OFFERED CAPABILITIES
24
+ --------------------
25
+ - discover_acp_merchants(category): list ACP-compatible merchants
26
+ - prepare_payment_intent(merchant_id, items, currency): build ACP payload
27
+ - sign_payment_intent(intent, signing_key): HMAC-sign + chain to audit log
28
+ - verify_acp_response(response): verify merchant attestation chain
29
+ - bridge_to_ap2_mandate(intent): convert Stripe ACP intent to Google AP2
30
+ Mandate format for cross-coalition use
31
+ - bridge_to_x402_paywall(intent): convert to Coinbase HTTP 402 for
32
+ pay-per-call agent settlement
33
+
34
+ WHEN TO USE
35
+ -----------
36
+ Your agent needs to initiate a purchase inside a Stripe-merchant flow
37
+ (typically ChatGPT shopping, but applicable anywhere ACP is deployed).
38
+ You want the payment intent signed + chained into the MEOK audit log
39
+ alongside DORA Art 17, NIS2 Art 23, EU AI Act Art 12 evidence.
40
+
41
+ PRICING
42
+ -------
43
+ Free MIT self-host · £29/mo Starter · £79/mo Pro · A2A Substrate £499/mo
44
+ (https://meok.ai/a2a) · Universe £1,499/mo
45
+ (https://buy.stripe.com/cNi9AV0xS8wy5g9aqI8k90u)
46
+ """
47
+
48
+ from __future__ import annotations
49
+ import hashlib
50
+ import hmac
51
+ import json
52
+ import os
53
+ import time
54
+ from datetime import datetime, timezone
55
+ from typing import Optional
56
+ from mcp.server.fastmcp import FastMCP
57
+
58
+
59
+ mcp = FastMCP("agent-commerce-protocol")
60
+
61
+ _MEOK_API_KEY = os.environ.get("MEOK_API_KEY", "")
62
+ _HMAC_SECRET = os.environ.get("MEOK_HMAC_SECRET", "")
63
+ _STRIPE_API_KEY = os.environ.get("STRIPE_API_KEY", "") # for live ACP merchant ops
64
+
65
+
66
+ # Catalogue of demo ACP-compatible merchants — Pro tier swaps in live
67
+ # Stripe Connect merchant discovery via the ACP merchant directory.
68
+ _DEMO_MERCHANTS = [
69
+ {"id": "merch_demo_software", "name": "Generic SaaS Co", "category": "software",
70
+ "supports": ["stripe-acp", "ap2", "x402"]},
71
+ {"id": "merch_demo_grocery", "name": "ACP Demo Grocer", "category": "groceries",
72
+ "supports": ["stripe-acp"]},
73
+ {"id": "merch_demo_compliance", "name": "MEOK AI Labs", "category": "compliance",
74
+ "supports": ["stripe-acp", "ap2", "x402", "psd2-overlay", "mica-overlay"]},
75
+ ]
76
+
77
+
78
+ def _sign(payload: dict) -> str:
79
+ if not _HMAC_SECRET:
80
+ return "unsigned-no-key-configured"
81
+ body = json.dumps(payload, sort_keys=True).encode()
82
+ return hmac.new(_HMAC_SECRET.encode(), body, hashlib.sha256).hexdigest()
83
+
84
+
85
+ def _ts() -> str:
86
+ return datetime.now(timezone.utc).isoformat()
87
+
88
+
89
+ # ────────────────────────────────────────────────────────────────────────
90
+ # Tools
91
+ # ────────────────────────────────────────────────────────────────────────
92
+
93
+ @mcp.tool()
94
+ def discover_acp_merchants(category: Optional[str] = None) -> dict:
95
+ """
96
+ List Stripe-ACP-compatible merchants, optionally filtered by category.
97
+
98
+ Args:
99
+ category: Optional filter — "software", "groceries", "compliance", etc.
100
+
101
+ Returns:
102
+ {merchants: [{id, name, category, supports_protocols}]}
103
+ """
104
+ merchants = _DEMO_MERCHANTS
105
+ if category:
106
+ merchants = [m for m in merchants if m["category"].lower() == category.lower()]
107
+ return {
108
+ "merchants": merchants,
109
+ "stage": "free-tier-demo" if not _STRIPE_API_KEY else "live-via-stripe",
110
+ "hint": "Pro tier ($79/mo) queries the live Stripe Connect ACP merchant directory.",
111
+ }
112
+
113
+
114
+ @mcp.tool()
115
+ def prepare_payment_intent(
116
+ merchant_id: str,
117
+ items: list[dict],
118
+ currency: str = "GBP",
119
+ buyer_did: Optional[str] = None,
120
+ ) -> dict:
121
+ """
122
+ Build a Stripe ACP payment intent payload ready for merchant submission.
123
+
124
+ Args:
125
+ merchant_id: ACP merchant identifier (from discover_acp_merchants).
126
+ items: List of {sku, name, quantity, unit_amount_minor} dicts.
127
+ currency: ISO 4217 code, default GBP.
128
+ buyer_did: Optional W3C DID identifying the buying agent (for trust chain).
129
+
130
+ Returns:
131
+ Payment intent payload conforming to Stripe ACP spec.
132
+ """
133
+ subtotal_minor = sum(i.get("unit_amount_minor", 0) * i.get("quantity", 1) for i in items)
134
+ intent = {
135
+ "type": "stripe_acp_payment_intent",
136
+ "protocol_version": "1.0.0",
137
+ "merchant_id": merchant_id,
138
+ "items": items,
139
+ "currency": currency.upper(),
140
+ "amount_minor": subtotal_minor,
141
+ "amount_display": f"{subtotal_minor / 100:.2f} {currency.upper()}",
142
+ "buyer_did": buyer_did,
143
+ "ts": _ts(),
144
+ }
145
+ return {
146
+ "intent": intent,
147
+ "next_step": "Call sign_payment_intent() to chain into audit log + get HMAC signature.",
148
+ }
149
+
150
+
151
+ @mcp.tool()
152
+ def sign_payment_intent(intent: dict) -> dict:
153
+ """
154
+ HMAC-sign a payment intent and prepare it for submission to the merchant.
155
+
156
+ Args:
157
+ intent: Payment intent payload from prepare_payment_intent().
158
+
159
+ Returns:
160
+ {intent, signature, verify_url, audit_chain_entry}
161
+ """
162
+ sig = _sign(intent)
163
+ chain_entry = {
164
+ "type": "stripe_acp_intent_signed",
165
+ "intent_id": f"acp_intent_{int(time.time())}",
166
+ "amount_minor": intent.get("amount_minor"),
167
+ "merchant_id": intent.get("merchant_id"),
168
+ "buyer_did": intent.get("buyer_did"),
169
+ "signature": sig,
170
+ "ts": _ts(),
171
+ }
172
+ return {
173
+ "intent": intent,
174
+ "signature": sig,
175
+ "verify_url": "https://verify.meok.ai",
176
+ "audit_chain_entry": chain_entry,
177
+ "next_step": "Submit intent + signature to merchant's ACP endpoint. Call verify_acp_response() with their reply.",
178
+ }
179
+
180
+
181
+ @mcp.tool()
182
+ def verify_acp_response(response: dict, expected_intent_id: Optional[str] = None) -> dict:
183
+ """
184
+ Verify the merchant's ACP completion response (signature, status, intent match).
185
+
186
+ Args:
187
+ response: Merchant ACP response (status, signature, payment_id, etc.).
188
+ expected_intent_id: Optional intent ID from sign_payment_intent for cross-check.
189
+
190
+ Returns:
191
+ {verified, status, issues, audit_chain_entry}
192
+ """
193
+ issues = []
194
+ status = response.get("status", "unknown")
195
+ if status not in ("succeeded", "requires_action", "pending", "failed"):
196
+ issues.append(f"unexpected_status: {status}")
197
+ if expected_intent_id and response.get("intent_id") != expected_intent_id:
198
+ issues.append("intent_id_mismatch")
199
+ sig = response.get("signature", "")
200
+ if not sig:
201
+ issues.append("no_merchant_signature")
202
+ verified = len(issues) == 0
203
+ chain_entry = {
204
+ "type": "stripe_acp_response_verified" if verified else "stripe_acp_response_flagged",
205
+ "response_status": status,
206
+ "verified": verified,
207
+ "issues": issues,
208
+ "ts": _ts(),
209
+ }
210
+ return {
211
+ "verified": verified,
212
+ "status": status,
213
+ "issues": issues,
214
+ "audit_chain_entry": chain_entry,
215
+ "signature": _sign(chain_entry),
216
+ }
217
+
218
+
219
+ @mcp.tool()
220
+ def bridge_to_ap2_mandate(intent: dict, user_consent_jwt: Optional[str] = None) -> dict:
221
+ """
222
+ Convert a Stripe ACP intent into a Google AP2 Mandate envelope so the
223
+ same purchase can be settled through the Google + Mastercard + PayPal +
224
+ Adyen AP2 coalition rails.
225
+
226
+ Args:
227
+ intent: Stripe ACP intent from prepare_payment_intent().
228
+ user_consent_jwt: Optional pre-signed user consent JWT (verifiable credential).
229
+
230
+ Returns:
231
+ AP2-compliant mandate envelope.
232
+ """
233
+ mandate = {
234
+ "type": "ap2_mandate",
235
+ "protocol_version": "1.0.0",
236
+ "intent_id": f"ap2_mandate_{int(time.time())}",
237
+ "original_protocol": "stripe-acp",
238
+ "original_intent": intent,
239
+ "merchant_id": intent.get("merchant_id"),
240
+ "amount_minor": intent.get("amount_minor"),
241
+ "currency": intent.get("currency"),
242
+ "user_consent_jwt": user_consent_jwt,
243
+ "ts": _ts(),
244
+ }
245
+ return {
246
+ "mandate": mandate,
247
+ "signature": _sign(mandate),
248
+ "verify_url": "https://verify.meok.ai",
249
+ "settlement_options": ["mastercard", "paypal", "adyen", "amex", "coinbase", "stripe"],
250
+ "hint": "AP2 mandates are cross-platform — any AP2-compatible processor can settle.",
251
+ }
252
+
253
+
254
+ @mcp.tool()
255
+ def bridge_to_x402_paywall(intent: dict) -> dict:
256
+ """
257
+ Convert a Stripe ACP intent into a Coinbase x402 HTTP-402 payment-required
258
+ response, for pay-per-call agent settlement without a Stripe account.
259
+
260
+ Args:
261
+ intent: Stripe ACP intent from prepare_payment_intent().
262
+
263
+ Returns:
264
+ HTTP-402 response shape with settlement instructions.
265
+ """
266
+ amount_minor = intent.get("amount_minor", 0)
267
+ return {
268
+ "http_status": 402,
269
+ "headers": {
270
+ "x-402-payment-required": "true",
271
+ "x-402-amount": str(amount_minor),
272
+ "x-402-currency": intent.get("currency", "USDC"),
273
+ "x-402-settle-to": "0xMEOK0000000000000000000000000000000000", # placeholder
274
+ "x-402-chain": "base",
275
+ "x-402-merchant-id": intent.get("merchant_id"),
276
+ },
277
+ "body": {
278
+ "settle_via": ["base", "polygon", "solana", "lightning"],
279
+ "min_confirmations": 1,
280
+ "expires_at": int(time.time()) + 600,
281
+ "original_acp_intent": intent,
282
+ "signature": _sign(intent),
283
+ },
284
+ "hint": "After settlement on-chain, retry the original call — gateway re-checks the chain + serves the response.",
285
+ }
286
+
287
+
288
+ @mcp.tool()
289
+ def list_supported_protocols() -> dict:
290
+ """List the agent-payment protocols this MCP can bridge."""
291
+ return {
292
+ "primary": "Stripe ACP (Agentic Commerce Protocol)",
293
+ "bridged": [
294
+ {"name": "Google AP2", "url": "https://ap2-protocol.org", "use_via": "bridge_to_ap2_mandate"},
295
+ {"name": "Coinbase x402", "url": "https://x402.org", "use_via": "bridge_to_x402_paywall"},
296
+ ],
297
+ "compliance_overlays": ["PSD2 (EU)", "MiCA (EU crypto)", "6AMLD (EU AML)", "FinCEN BSA (US)"],
298
+ "note": "Other ACP — the IBM Agent Communication Protocol — merged into A2A in Sept 2025 and is covered by the MEOK A2A Substrate (https://meok.ai/a2a).",
299
+ "hint": "All bridges produce signed audit-chain entries verifiable at https://verify.meok.ai",
300
+ }
301
+
302
+
303
+ if __name__ == "__main__":
304
+ mcp.run()
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,95 @@
1
+ """Smoke tests for agent-commerce-protocol-mcp."""
2
+ import sys, os, inspect, traceback
3
+ sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
4
+
5
+ from server import (
6
+ discover_acp_merchants,
7
+ prepare_payment_intent,
8
+ sign_payment_intent,
9
+ verify_acp_response,
10
+ bridge_to_ap2_mandate,
11
+ bridge_to_x402_paywall,
12
+ list_supported_protocols,
13
+ )
14
+
15
+
16
+ def test_discover_all_merchants():
17
+ r = discover_acp_merchants()
18
+ assert len(r["merchants"]) >= 3
19
+ assert all("supports" in m for m in r["merchants"])
20
+
21
+
22
+ def test_discover_filtered():
23
+ r = discover_acp_merchants(category="compliance")
24
+ assert all(m["category"] == "compliance" for m in r["merchants"])
25
+
26
+
27
+ def test_prepare_intent_sums_correctly():
28
+ items = [
29
+ {"sku": "A1", "name": "thing 1", "quantity": 2, "unit_amount_minor": 1500},
30
+ {"sku": "B1", "name": "thing 2", "quantity": 1, "unit_amount_minor": 4900},
31
+ ]
32
+ r = prepare_payment_intent("merch_demo_software", items, "GBP", buyer_did="did:agent:test")
33
+ assert r["intent"]["amount_minor"] == 1500 * 2 + 4900
34
+ assert r["intent"]["currency"] == "GBP"
35
+ assert r["intent"]["buyer_did"] == "did:agent:test"
36
+
37
+
38
+ def test_sign_intent_returns_chain_entry():
39
+ intent = prepare_payment_intent("merch_demo_software", [{"sku": "x", "quantity": 1, "unit_amount_minor": 100}])["intent"]
40
+ r = sign_payment_intent(intent)
41
+ assert "signature" in r and len(r["signature"]) > 5
42
+ assert r["audit_chain_entry"]["type"] == "stripe_acp_intent_signed"
43
+
44
+
45
+ def test_verify_response_flags_issues():
46
+ bad_response = {"status": "weird", "intent_id": "X"}
47
+ r = verify_acp_response(bad_response, expected_intent_id="Y")
48
+ assert r["verified"] is False
49
+ assert any("status" in i or "mismatch" in i for i in r["issues"])
50
+
51
+
52
+ def test_verify_response_passes_clean():
53
+ good_response = {"status": "succeeded", "intent_id": "abc", "signature": "deadbeef"}
54
+ r = verify_acp_response(good_response, expected_intent_id="abc")
55
+ assert r["verified"] is True
56
+ assert r["issues"] == []
57
+
58
+
59
+ def test_bridge_to_ap2_preserves_amount():
60
+ intent = prepare_payment_intent("m1", [{"sku": "x", "quantity": 1, "unit_amount_minor": 999}], "EUR")["intent"]
61
+ r = bridge_to_ap2_mandate(intent, user_consent_jwt="jwt.placeholder")
62
+ assert r["mandate"]["amount_minor"] == 999
63
+ assert r["mandate"]["currency"] == "EUR"
64
+ assert "mastercard" in r["settlement_options"]
65
+
66
+
67
+ def test_bridge_to_x402_returns_402():
68
+ intent = prepare_payment_intent("m1", [{"sku": "x", "quantity": 1, "unit_amount_minor": 100}], "USD")["intent"]
69
+ r = bridge_to_x402_paywall(intent)
70
+ assert r["http_status"] == 402
71
+ assert "x-402-amount" in r["headers"]
72
+ assert r["body"]["expires_at"] > 0
73
+
74
+
75
+ def test_list_supported_protocols():
76
+ r = list_supported_protocols()
77
+ assert "Stripe ACP" in r["primary"]
78
+ assert len(r["bridged"]) >= 2
79
+ assert "IBM" in r["note"] # acknowledges name collision
80
+
81
+
82
+ if __name__ == "__main__":
83
+ g = dict(globals())
84
+ fns = [v for k, v in g.items() if k.startswith("test_") and inspect.isfunction(v)]
85
+ passed = failed = 0
86
+ for fn in fns:
87
+ try:
88
+ fn()
89
+ print(f"✓ {fn.__name__}")
90
+ passed += 1
91
+ except Exception as e:
92
+ print(f"✗ {fn.__name__}: {type(e).__name__}: {e}")
93
+ traceback.print_exc()
94
+ failed += 1
95
+ print(f"\n{passed} passed, {failed} failed")