This recipe stands up a minimal TypeScript project that authenticates against the Glide MCP gateway, callsDocumentation 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.
accounts.balance, and prints the parsed response. The wrapper uses fetch with a typed JSON-RPC helper — no heavy SDK required. Audience: TypeScript backend engineers who want a runnable baseline before building their agent logic.
Prerequisites
- Node 22+ and pnpm.
- Glide running locally per the main quickstart, or access to a hosted instance.
MCP_TOKEN_VERIFIER_DEV_SECRETset in your shell (or in the repo.env).
Steps
1. Clone the example
2. Install dependencies
jose for JWT signing and zod for runtime receipt validation.
3. Set environment variables
Copy the example env file and fill in your values:GLIDE_TOKEN_URL and GLIDE_CLIENT_ID / GLIDE_CLIENT_SECRET — src/auth.ts detects which path to use.
4. Review the auth helper
src/auth.ts mints a short-lived HMAC-SHA256 JWT for dev, or does client_credentials against Ory for production. The resulting token is stored in module scope with auto-refresh 60 seconds before expiry.
5. Review the RPC helper
src/rpc.ts is a typed wrapper around a single fetch call. It throws on JSON-RPC errors with the error code and data attached so callers can distinguish policy rejections (-32003) from network errors.
6. Run the example
src/main.ts calls accounts.balance, prints the balance, then calls payments.initiate with a $1.00 test payment to a sandbox address.
Run it
Extend it
- Replace
src/main.tswith an Express server that exposes a/payendpoint — the RPC helper is already reusable. - Swap the dev HMAC auth for production Ory
client_credentialsby settingGLIDE_TOKEN_URLin.env. - Add a
zodschema onreceiptand log a structured event to Datadog on each payment. - Chain
audit.streamafterpayments.initiateto confirm event delivery before returning to the caller. - Move the token refresh logic to an Inngest function for long-running agent processes.
Source
github.com/darshanbathija/axtior-neobank/tree/main/examples/typescript-quickstartReading list
- Agent platform quickstart — full
apps/mcpbring-up, three endpoint scopes, step-up flow. - Tool reference — input/output schemas for all 22 tools.
- Receipt schema — every field and its semantics.
- OAuth flow — production JWT issuance via Ory Hydra.
- API clients reference — hosted Glide client options.