GumstackHost wraps your FastMCP server with Gumstack’s infrastructure features: token validation, access control, and logging.
Usage
Constructor
Your MCP server instance.
Automatically adds:
- 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.
Multiple providers can be registered for servers that connect to multiple services.
run
Start the server.
Environment variables
GumstackHost requires these environment variables (set automatically in production):
What it does
When a request arrives:
- Token validation — Verifies the bearer token with Gumloop
- Context injection — Sets
GumstackContext with 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