GumstackHost wraps your FastMCP server with Gumstack’s infrastructure features: token validation, access control, and logging.
Usage
Constructor
Your MCP server instance.
- Token validation — Verifies incoming request tokens
- RBAC interceptor — Checks per-tool permissions
- Logging interceptor — Records all tool calls
Methods
register_auth
Register an OAuth provider for user authentication.run
Start the server.Environment variables
GumstackHost requires these environment variables (set automatically in production):| Variable | Description |
|---|---|
GUMSTACK_SERVER_ID | Your server’s unique ID |
GUMSTACK_MCP_URL | Server’s public URL |
GUMLOOP_BACKEND_URL | Gumloop API URL |
What it does
When a request arrives:- Token validation — Verifies the bearer token with Gumloop
- Context injection — Sets
GumstackContextwith user/org info - RBAC check — Confirms user’s group can access the requested tool
- Tool execution — Runs your tool code
- Logging — Records inputs, outputs, latency, and errors
