Skip to main content
The TypeScript example calls accounts.list and prints the authorized accounts. It uses a fetch wrapper in src/glide-client.ts. It does not mint a grant, refresh tokens, stream events or initiate a payment.

Prerequisites

Use the product repository with its dependencies installed, Node with native fetch support, and a configured MCP gateway. Obtain an active grant with accounts:read through your authorization server.

Run the example

Set GLIDE_GRANT_TOKEN and, if needed, GLIDE_BASE_URL in your environment. From the product repository root:
The entry point is src/index.ts. It exits with an error if the token is missing or the API call fails. On success, it prints the account list and fetch timestamp.

Use the wrapper

This example’s wrapper accepts the tool name, arguments and an optional category. The default category is read.
The wrapper unwraps MCP result.structuredContent and rejects HTTP, JSON-RPC and tool errors. Token renewal is the caller’s responsibility.

Extend it

Choose a tool exposed by your gateway and use its required scope, input schema and category. For writes, handle approval responses and track the existing action before retrying. Start with payment simulation.

Source

Read the TypeScript example. Source access is required.

Next