Skip to content

Floopy Now Supports MCP: Connect Any AI Tool to Your Gateway

Floopy adds Model Context Protocol support — expose your gateway as an MCP server or connect external MCP tools to your agentic workflows.

Floopy Team | | 4 min read
mcp ai-gateway agentic-loop tool-calling product

The Model Context Protocol is becoming the standard way AI clients discover and call tools. Today we’re adding MCP support to Floopy — both as a server and as a client.

What This Means for You

Floopy now speaks MCP in two directions:

As an MCP server: Point Claude Desktop, Cursor, or any MCP-compatible client at https://api.floopy.ai/mcp. They get four tools: route LLM requests, list models, estimate costs, and pull analytics — all with your routing rules, caching, and rate limits applied automatically.

As an MCP client: Attach a plugin YAML to any routing rule and Floopy will connect to external MCP servers on behalf of your agent. The LLM calls a tool, Floopy executes it, appends the result, and loops back to the model. You get a full agentic loop without building the infrastructure.


The Agentic Loop, Without the Infrastructure

Building a reliable agentic loop is surprisingly hard:

  • Retry logic for flaky tool servers
  • Secret management for third-party API keys
  • Prompt injection protection on tool outputs
  • Parallel tool execution
  • Logging every tool call for debugging
  • Timeouts that don’t stall your whole application

Floopy handles all of this. You write a YAML file describing which MCP servers to connect and how. The gateway does the rest.

version: "1"
mcp_servers:
- id: web_search
url: "https://mcp.brave.com/search"
auth:
type: bearer
secret_ref: "secret.brave_api_key" # stored in Floopy Vault
timeout_ms: 5000
agent:
max_rounds: 8
stream_mode: final_only
prompt_guard_on_tool_output: true

That’s a production-ready agentic setup. No infrastructure code required.


Four MCP Tools Out of the Box

When you connect as an MCP client to Floopy’s server, you get four tools immediately:

route_llm_request

Send completions through your gateway. Your routing rules, fallbacks, caching, and cost routing all apply — exactly as they would from your application.

list_models

Query which models are available on your account, with capabilities and pricing. Useful for agents that select models dynamically.

estimate_cost

Before sending a large request, ask Floopy what it will cost — and get suggestions for cheaper alternatives. Budget-conscious agents can use this to decide which model to use.

get_analytics

Pull usage data for a time range, grouped by model, provider, or API key. Useful for monitoring agents or automation that tracks spending.


Token-Based Access Control for MCP

Sharing your main API key with every MCP client is risky. A new feature ships alongside MCP support: MCP Tokens.

MCP Tokens are short-lived and scoped. Instead of giving Claude Desktop your full API key, you issue a token with only mcp:tools:call scope and a 30-day expiry. If it’s compromised, you revoke it in one click — no key rotation needed across your apps.

Settings → Access Tokens → New Token
Select scopes: mcp:tools:call, mcp:models:list
Expiry: 30 days

Security: Prompt Guard on Tool Outputs

A subtle attack vector in agentic systems: a malicious web page or API response contains a prompt injection that hijacks your agent’s behavior.

Floopy’s existing Prompt Guard now runs on tool outputs before they’re appended to the conversation. If a tool result looks like a jailbreak attempt or injection payload, it’s flagged — and you can configure whether to block or just log it.

Enable it in your plugin YAML:

agent:
prompt_guard_on_tool_output: true

What Gets Logged

Every agentic session is logged in full under Observability:

  • Each tool call: name, arguments, duration, server used
  • Each tool result (with secrets redacted)
  • Total rounds and tokens across the entire session
  • Whether the loop hit max_rounds

You can filter by has_tool_calls: true to isolate agentic traffic from standard completions.


Getting Started

Use Floopy as an MCP server from Claude Desktop:

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

{
"mcpServers": {
"floopy": {
"command": "npx",
"args": [
"-y", "mcp-remote",
"https://api.floopy.ai/mcp",
"--header",
"Authorization: Bearer mcp_tbac_your_token_here"
]
}
}
}

Requires Node.js 18+. For Claude Code CLI, use claude mcp add floopy --transport http --url https://api.floopy.ai/mcp --header "Authorization: Bearer <token>".

Build an agentic workflow with external MCP tools:

  1. Go to Routing in the dashboard
  2. Create a routing rule
  3. Attach a plugin YAML with your MCP server configuration
  4. Store your secrets in Settings > Secrets
  5. Test it in the Playground

Full documentation: MCP Server · MCP Client · MCP Tokens