Skip to content

MCP Gateway (Floopy as MCP server)

The Gateway turns Floopy into an MCP server your agents can connect to. Each agent uses its own bearer token, scoped to the resources it needs and revocable at any time. Every tool call is audited per-request — you always know which agent did what, when, and on whose behalf.

The endpoint is:

https://api.floopy.ai/mcp

Authentication is Authorization: Bearer <token> on every request.


In the dashboard, navigate to MCP → Gateway → New token. You pick:

  • Display name — e.g. Claude Desktop · Ana or Internal eval bot
  • Scopes — one or more from the scope catalog. Wildcard * grants every current and future scope; use it sparingly.

The token is shown once at creation. Floopy hashes it on save — there is no way to retrieve the plaintext later. Store it in your password manager or secret store immediately.


The Reveal modal in the dashboard generates ready-to-paste configs for the major MCP clients. Below is the canonical form for each.

~/Library/Application Support/Claude/claude_desktop_config.json:

{
"mcpServers": {
"floopy": {
"url": "https://api.floopy.ai/mcp",
"headers": {
"Authorization": "Bearer flpy_..."
}
}
}
}

Every request runs through the same pipeline:

  1. Token authentication — the bearer token is hashed and looked up in mcp_tbac_tokens. Unknown / expired tokens return JSON-RPC error -32001.
  2. Per-key + per-org rate limit — sliding-window Redis counters. Per-key limit is your plan’s RPM; per-org is 10× that by default. Excess returns JSON-RPC error -32003 with data.retry_after_secs.
  3. Scope validationtools/list filters to scopes the token holds; tools/call rejects unknown scopes with -32602.
  4. Per-tool budgetexport:read 1/5min/org, routing:explain 30/min/org + 10/min/key, write tools 5–10/min/org.
  5. Audit emit — every read is throttled 60s by (org, key, route); every write is audit-first (the audit row lands BEFORE the mutation; failure aborts).

Revoke a token from MCP → Gateway → ⋯ → Revoke. The token is deleted on the next request — Redis-cached lookups expire within mcp.tbac_cache_ttl_secs (default 60s).

For instant revocation across the fleet, also rotate FLOOPY_TBAC_PEPPER — every existing token hash invalidates immediately.


Floopy advertises MCP 2025-06-18 in the initialize response, with backward-compatible negotiation for older clients. The transport is HTTP JSON-RPC 2.0 (Streamable HTTP transport for SSE-streaming responses is on the roadmap; today’s wire format is plain application/json).

See the scope catalog for the 12 supported scopes and which tools they expose.