Skip to content
AIMOCS

AIMOCS · Stack guides

Stack guide

The Glama MCP stack for production AI operators

Glama is the tool gateway. The point isn't the gateway itself — it's that everything past the gateway looks the same to the operator.

The stack

  • Glama
  • Anthropic Claude
  • Stripe
  • Supabase
  • MongoDB
  • Docker

Updated · 2026-05-21

01TL;DR
02The stack
  • L/01Tool gateway

    Glama exposes every external tool the operator touches over a uniform MCP interface. The agent calls one verb shape regardless of vendor.

    • Glama
  • L/02Reasoning core

    Anthropic Claude with a workflow-pinned system prompt and the Glama tool surface. Model version frozen per workflow.

    • Anthropic Claude
  • L/03Money + transactions

    Stripe sits behind a Glama MCP tool. Swapping to a different payment processor is a Glama config change, not a prompt rewrite.

    • Stripe
  • L/04Memory

    Supabase holds account state, conversation history, and tier ladders. The operator pulls context per call, not per session.

    • Supabase
  • L/05Audit + isolation

    MongoDB stores Glama's tool-call log plus the reasoning that triggered each call. Docker isolates the operator runtime.

    • MongoDB
    • Docker
03Why this stack

One verb shape for the model

Without Glama, the prompt encodes Stripe-shaped calls and HubSpot-shaped calls and PagerDuty-shaped calls. With it, the model learns one calling pattern. That cuts prompt length and removes the most common source of tool-use errors.

Vendor swaps without prompt churn

When the business moves from Salesforce to HubSpot, the operator doesn't notice — only Glama's tool definition changes. Every workflow built on top of Glama keeps running.

Centralised auth and rate limits

Glama holds the scoped tokens, applies the rate limits, and rotates credentials. Operators don't see secrets and can't be tricked into leaking them.

Audit at the gateway

Every tool call routes through one chokepoint that logs the request, the response, and the agent's stated reason. Security review becomes one log to read, not five.

04Where it shines
  • ◇/01

    Any operator that touches three or more external tools (CRM + billing + scheduling, etc.)

  • ◇/02

    Teams in mid-migration between vendors who can't afford to rewrite the operator each move

  • ◇/03

    Regulated industries where centralised auth and rate-limiting are non-negotiable

  • ◇/04

    Multi-tenant setups where the same operator runs against different customer accounts

05Comparison

Glama-centric operator stack

Pros

  • · One uniform tool surface for the model
  • · Vendor swaps don't touch the prompt
  • · Centralised auth, rate-limit, audit

Cons

  • · Adds a network hop on every tool call (mitigated by colocation)

Direct per-vendor SDK calls

Pros

  • · No additional infrastructure
  • · Slightly lower per-call latency

Cons

  • · Prompt has to know every SDK shape
  • · Vendor change = prompt rewrite
  • · No central audit chokepoint

LangChain or LlamaIndex tool wrappers

Pros

  • · Mature ecosystem of pre-built integrations

Cons

  • · Tool definitions live in app code, not config
  • · No first-class auth or rate-limit story
06Implementation notes
  1. 01

    Define every tool in Glama with the minimum scope the operator actually needs. The principle is the same as Unix: small, focused tools beat big, multipurpose ones.

  2. 02

    Use Glama's scoped tokens per workflow, not per tenant. The operator for accounts-receivable shouldn't be able to read scheduling data even if the model wanders.

  3. 03

    Wire Glama's tool log directly into MongoDB. The agent's reasoning log joins the tool log via a request ID for forensic review.

  4. 04

    Treat tool definitions as versioned artifacts. A schema change in a downstream API is a Glama version bump, run through your eval set before deploy.

  5. 05

    Co-locate Glama with the operator container to keep the extra network hop sub-millisecond.

  6. 06

    Rotate every credential through Glama on a schedule. The operator never sees the value; the gateway handles the handshake.

08Questions
  • Why not just call vendor APIs directly?

    You can — for one tool, one workflow, one team. The minute you have three tools and two workflows, the prompt becomes a thicket of vendor-specific call shapes. Glama turns that thicket into one verb.

  • How does Glama handle secrets?

    Glama holds the scoped credentials and uses them on the agent's behalf. The agent calls tools by name; Glama attaches the token. The audit log records the call but never the secret.

  • Does the extra hop hurt latency?

    With Glama colocated next to the operator container, the gateway adds sub-millisecond overhead. Compared to a 500ms model call, it doesn't show up.

  • What if a downstream API doesn't fit MCP cleanly?

    Most do; for the few that don't, write a thin adapter inside Glama and the operator sees the same uniform surface. The complexity stays in one place, not in the prompt.

  • How does AIMOCS choose what to wire through Glama vs. directly?

    Anything touched by more than one workflow, anything that holds money or PII, and anything where audit is a hard requirement goes through Glama. Quick, single-workflow integrations sometimes stay direct.

09Begin

We don't advise on AI. We run it for you.