Integration examples
Working, copy-paste examples for the Skavio Processing MCP server.
| File | Language | Transport |
|---|---|---|
quickstart.py | Python (official mcp SDK) | Streamable HTTP |
quickstart.mjs | TypeScript (@modelcontextprotocol/sdk) | Streamable HTTP |
Both run the full paid sequence against production: list tools → catalog → wallet → upload → estimate → submit → poll → download → accounting.
Python
pip install mcp anyio
export SKAVIO_MCP_CREDENTIAL=skavio_mcp_... # your company credential
export SKAVIO_MCP_INPUT=/path/to/file.pdf # a file to process
python quickstart.py
The official SDK transport takes an HTTP client, not a headers= keyword:
from mcp.client.streamable_http import (
create_mcp_http_client,
streamable_http_client,
)
async with (
create_mcp_http_client(headers=headers, timeout=30) as http,
streamable_http_client(ENDPOINT, http_client=http) as (read, write, _),
ClientSession(read, write) as session,
):
...
TypeScript
npm install @modelcontextprotocol/sdk
export SKAVIO_MCP_CREDENTIAL=skavio_mcp_...
export SKAVIO_MCP_INPUT=/path/to/file.pdf
node quickstart.mjs
Notes
skavio_upload_bytesaccepts small inline content (≤ 48 KiB). For larger
files use skavio_upload with a filename in the operator-configured input directory.
- Set
SKAVIO_MCP_ENDPOINTto point the Python example at a staging URL. - Always reuse the exact same
idempotency_keyand spec on retry; a changed
spec with the same key returns idempotency_conflict.
- Never hardcode a credential. Read it from the environment or a secret manager.