The Stream MCP Server provides programmatic access to the Stream payment platform through 27 tools across six resource domains:
Payment Links
Create checkout/payment links with products and optional coupons
List links with status filters (ACTIVE, INACTIVE, COMPLETED)
Retrieve a specific link by ID
Deactivate a link to prevent further use
Customers
Create customers with name, email, phone, IBAN, language preference, and communication methods
List with pagination, retrieve by ID, update fields (partial updates supported), and soft-delete
Products
Create one-time (
ONE_OFF), recurring (RECURRING), or metered (METERED) productsList with filters by type, active status, and currency
Retrieve, update, or archive (soft-delete) products
Coupons
Create fixed-amount or percentage discount coupons
List with filters, retrieve by ID, and deactivate
Invoices
Create ZATCA-compliant invoices with line items, coupons, and payment method options
List with filters by status, customer, and date range
Retrieve, send/resend via email or SMS, and void unpaid invoices
Payments
List payments filtered by status, invoice, search term, and date range
Retrieve payment details
Manually mark a payment as paid (CASH, BANK_TRANSFER, CARD, QURRAH)
Issue full or partial refunds with a reason
Documentation
List all available Stream documentation pages (auto-discovered from sitemap)
Fetch full content of any page by slug (e.g.
getting-started,webhooks,authentication)
The server supports local stdio mode or remote HTTP mode (with Bearer token auth), Docker deployment, and returns structured error responses to ensure LLM agents always receive usable feedback.
Stream MCP Server
An MCP server for the Stream (streampay.sa) payment platform, built with FastMCP.
Exposes 27 tools across six resource domains — payment links, customers, products, coupons, invoices, and payments — plus a read-only OpenAPI documentation resource.
Quick Start
1. Install
# Clone & install in editable mode
git clone <repo-url> stream-mcp-server && cd stream-mcp-server
pip install -e ".[dev]"2. Configure
cp .env.example .env
# Edit .env and set your Stream API key:
# STREAM_API_KEY=sk_live_…Variable | Default | Description |
| (required for stdio mode) | Your Stream API key |
|
| API base URL |
|
| Request timeout (seconds) |
|
| Retry count for 429 / 5xx |
|
| Remote server bind host ( |
|
| Remote server bind port ( |
3. Run
Local stdio mode (recommended)
stream-mcpRemote HTTP mode (URL clients)
# No STREAM_API_KEY needed on the server process in remote mode
HOST=0.0.0.0 PORT=8000 stream-mcp-remoteEndpoint:
http://localhost:8000/mcpMCP Client Configuration (Claude Desktop / Cursor / VS Code)
Use one of these two patterns in your MCP config file (claude_desktop_config.json or mcp.json).
Option A: stdio
{
"mcpServers": {
"stream": {
"command": "stream-mcp",
"env": {
"STREAM_API_KEY": "sk_live_your_key_here"
}
}
}
}Option B: remote URL (stream-mcp-remote)
{
"mcpServers": {
"stream": {
"url": "http://localhost:8000/mcp",
"headers": {
"Authorization": "Bearer sk_live_your_key_here"
}
}
}
}Available Tools
Payment Links
Tool | Description |
| Create a new checkout / payment link |
| Paginated list with optional status filter |
| Get a single payment link by ID |
| Deactivate / archive a payment link |
Customers
Tool | Description |
| Create a customer with name, email, phone, metadata |
| Paginated list of customers |
| Get a single customer by ID |
| Update customer fields |
| Soft-delete a customer |
Products
Tool | Description |
| Create a one-time or recurring product |
| List products with optional type filter |
| Get a single product by ID |
| Update product name, description, or price |
| Archive a product |
Coupons
Tool | Description |
| Create a fixed or percentage discount coupon |
| List coupons with optional status filter |
| Get a single coupon by ID |
| Deactivate a coupon |
Invoices
Tool | Description |
| Create a ZATCA-compliant invoice |
| List invoices with filters |
| Get a single invoice by ID |
| (Re)send an invoice via email / SMS |
| Void / cancel an unpaid invoice |
Payments
Tool | Description |
| List payments with filters |
| Get payment details |
| Issue a full or partial refund |
Resources
Resource URI | Description |
| Full Stream OpenAPI spec (cached, auto-refreshed) |
Remote Deployment (Hosted URL)
You can deploy the MCP server as a hosted URL so users connect to it remotely.
Each user passes their own Stream API key as a Bearer token.
1. Run locally (remote mode)
# No STREAM_API_KEY needed — each user provides their own
stream-mcp-remote
# → Listening on http://0.0.0.0:8000
# Custom host/port
HOST=0.0.0.0 PORT=3000 stream-mcp-remote2. Deploy with Docker
docker build -t stream-mcp .
docker run --rm -p 8000:8000 stream-mcp3. How users connect (remote)
Users add this to their MCP client config:
Claude Desktop / VS Code:
{
"mcpServers": {
"stream": {
"url": "https://your-domain.com/mcp",
"headers": {
"Authorization": "Bearer sk_live_YOUR_STREAM_API_KEY"
}
}
}
}Each user passes their own Stream API key as the Bearer token. The server never stores keys — they are used only for the duration of the session.
Project Structure
src/stream_mcp/
├── server.py # FastMCP app entry-point (local + remote modes)
├── config.py # Settings from env vars
├── client.py # Async HTTP client (auth, retries, errors)
├── auth.py # Bearer token middleware (remote mode)
├── helpers.py # get_client() — resolves per-request StreamClient
├── models/ # Pydantic v2 request/response models
│ ├── payment_links.py
│ ├── customers.py
│ ├── products.py
│ ├── coupons.py
│ ├── invoices.py
│ └── payments.py
└── tools/ # FastMCP tool definitions
├── __init__.py # Registers all tools
├── payment_links.py
├── customers.py
├── products.py
├── coupons.py
├── invoices.py
├── payments.py
└── docs.py # OpenAPI resourceAdding a new resource domain = add one file in models/, one in tools/, and one import line in tools/__init__.py.
Error Handling
All tools catch StreamAPIError and return a structured dict instead of raising:
{
"error": true,
"code": 422,
"message": "Validation failed: …"
}This ensures the LLM agent always receives a usable response.
Development
# Install with dev dependencies
pip install -e ".[dev]"
# Run tests
pytest tests/ -vLicense
MIT
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.