This recipe is a minimal Python project that authenticates against the Glide MCP gateway usingDocumentation Index
Fetch the complete documentation index at: https://glide-9da73dea.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
httpx and python-jose, calls accounts.balance, and initiates a payment. Audience: Python engineers who want a typed, runnable baseline before wiring Glide into an existing agent or automation pipeline.
Prerequisites
- Python 3.11+.
pipor a virtualenv manager (uvrecommended).- Glide running locally per the main quickstart, or access to a hosted instance.
MCP_TOKEN_VERIFIER_DEV_SECRETset in your shell or.env.
Steps
1. Clone the example
2. Install dependencies
requirements.txt:
3. Set environment variables
4. Review the auth module
src/auth.py mints a short-lived HS256 JWT for dev. In production, replace it with an httpx client_credentials call against your Ory Hydra endpoint.
5. Review the RPC client
src/rpc.py wraps a single synchronous httpx.post call. It raises GlideRPCError on JSON-RPC errors, preserving the code and data fields so callers can distinguish policy rejections (-32003) from 5xx errors.
6. Run the example
src/main.py checks the gateway health, calls accounts.balance, then calls payments.initiate with a $2.00 test payment:
Run it
Extend it
- Wrap
main.pyin a FastAPI route for a payment-initiation microservice. - Replace the dev HMAC token with a production Ory
client_credentialsgrant by editingsrc/auth.py. - Add
pydanticmodels forReceiptand validate the response to catch schema drift early. - Wire
audit.streaminto a Kafka producer to feed a downstream event bus. - Use
httpx.AsyncClientandasynciofor concurrent multi-account balance checks.
Source
github.com/darshanbathija/axtior-neobank/tree/main/examples/python-quickstartReading list
- Agent platform quickstart — full
apps/mcpbring-up and three endpoint scopes. - OAuth flow — production JWT issuance via Ory Hydra.
- Receipt schema — every field and its semantics.
- Money-safety contracts — the F-rules every payment path enforces.