prime-agent-stripe-mcp

prime-agent-stripe-mcp

A Prime Agent skill that connects to Stripe's official remote MCP server to inspect and manage Stripe resources via OAuth.

Category
访问服务器

README

prime-agent-stripe-mcp

Official Stripe MCP integration for Prime Agent.

CI License: MIT Python

Prime Agent connects to Stripe's official remote MCP server at https://mcp.stripe.com. The agent can then inspect and manage Stripe resources through the same API surface as other MCP clients.

[!NOTE] Stripe's MCP server is in public preview. It exposes both read and write tools. Keep the connection in test mode while developing.

┌─────────────────────────────────┐                      ┌─────────────────────────────────┐
│ │ from stripe import         │  │                      │ │ mcp.stripe.com              │ │
│ │   stripe                   │  │                      │ │ API · billing · reporting   │ │
│ │ await stripe.list_tools()  │──┼   OAuth 2.1 + PKCE   │ │ products · customers        │ │
│ │ await stripe.call_tool(    │  │                      │ │ subscriptions · events      │ │
│ auth.json: mcp:stripe           │                      │ │ documentation search        │ │
└─────────────────────────────────┘                      └─────────────────────────────────┘

Why this integration

  • Stripe-hosted server — no self-hosted proxy and no Stripe API key in this repository.
  • Prime Agent-native — the module extends McpIntegration and exposes the live tool inventory from the Python kernel.
  • OAuth 2.1 with PKCE — the browser approval is stored only in Prime Agent's private auth.json under mcp:stripe.
  • Test-mode friendly — authorize the Liminal Stripe account and use only test-mode resources during development.

Install

Requires Prime Agent with its Python kernel and Python 3.10 or newer.

  1. Clone the repository and link the skill into place:

    git clone https://github.com/gbrlpzz/prime-agent-stripe-mcp.git ~/prime-agent-stripe-mcp
    rm -rf ~/.agents/skills/stripe
    ln -s ~/prime-agent-stripe-mcp ~/.agents/skills/stripe
    
  2. Install the editable package into Prime Agent's kernel environment:

    uv pip install --python ~/.prime/agent/kernel-venv/bin/python -e ~/prime-agent-stripe-mcp
    
  3. Add the remote server to Prime Agent's MCP settings once:

    {
      "mcpServers": {
        "stripe": {
          "type": "http",
          "url": "https://mcp.stripe.com",
          "oauth": true
        }
      }
    }
    
  4. Reload Prime Agent and authorize the Stripe account:

    /reload
    /mcp login stripe
    

Approve the Liminal Stripe account, not a personal or production account that should stay outside this development workflow. Prime Agent stores the credential as mcp:stripe. It is never written to this repository.

Usage

from stripe import stripe, auth_status

print(auth_status())               # credential state, no token values
tools = await stripe.list_tools()  # live Stripe MCP inventory
# Inspect the live schema before calling a read or write tool.
result = await stripe.call_tool("<live-tool-name>", {"<live-argument>": "..."})

auth_status() returns a small dict without secrets:

{"enabled": True, "expires_fresh": True, "type": "oauth"}

Tool names and parameters belong to Stripe and may change during the public preview. Call list_tools() first, or use the methods bound automatically from the live inventory.

The server includes tools for Stripe API discovery, API reads and writes, account information, billing resources, documentation, and reporting. Write operations change Stripe data. Ask for human confirmation before creating, updating, cancelling, refunding, or deleting anything.

Token refresh fallback

Prime Agent refreshes the stored token automatically. On hosts where that is unavailable, call the module-level fallback:

from stripe import refresh

refresh()  # exchanges the stored refresh token; rewrites auth.json with mode 600

Liminal development workflow

  1. Add your personal user as a team member of the Liminal Stripe account.
  2. Authorize this integration as that user.
  3. Confirm the Stripe dashboard is in test mode.
  4. Create test products, prices, customers, and subscriptions only.
  5. Configure the Supabase stripe-webhook function with the resulting test webhook signing secret separately. The MCP credential does not replace the server-side STRIPE_SECRET_KEY or STRIPE_WEBHOOK_SECRET.

Troubleshooting

Symptom Fix
auth_status() reports no credentials Run /mcp login stripe again.
Calls fail after a long pause Run refresh(); log in again if it returns False.
A tool name is unknown Re-run await stripe.list_tools(); the inventory can change during preview.

Development

python3 tests/test_skill.py                             # standalone suite, no Prime Agent needed
~/.prime/agent/kernel-venv/bin/python -m pytest tests/  # inside Prime Agent's kernel

CI runs the standalone suite on every push to main.

Security

  • No credentials live in this repository or its Git history.
  • OAuth tokens live only in Prime Agent's private auth.json.
  • The module talks only to https://mcp.stripe.com and Stripe's OAuth authorization server.
  • Keep all development mutations in Stripe test mode.
  • Never put Stripe secret values or private-key material in source, tests, documentation, or Git history.

License

MIT — see LICENSE. Stripe is a trademark of Stripe, Inc.; this is an independent client integration for Stripe's official MCP server (see NOTICE).

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选