Agent-Native Flux APIs
Every Flux API you create on FoxNose is agent-native by default. The same URL prefix that serves your REST endpoints also exposes a Model Context Protocol server, a route catalog, and per-collection JSON Schema — discoverable at runtime, gated by the same permissions, scoped to the connected collections. There is no SDK to install and no second tool surface to maintain.
What "agent-native" means here
Most platforms that integrate with AI agents take one of two paths:
- SDK-based. You install a client library, instantiate a class, write retriever or tool wrappers around the SDK's methods, and ship them to your agent framework. Every new tool or schema change means another code update on the consumer side.
- Custom MCP server. You build a small MCP server in front of an existing API. You define the tools, wire each to an HTTP call, handle auth, ship a binary, and keep the schema in sync as the upstream API evolves.
FoxNose builds both into the Flux API itself. Every prefix has:
https://{environment_key}.fxns.io/{api_prefix}/_mcp # MCP server (Streamable HTTP)
https://{environment_key}.fxns.io/{api_prefix}/_router # Flat route catalog
https://{environment_key}.fxns.io/{api_prefix}/{collection}/_schema # JSON Schema per collection
…sitting next to the data routes (/{collection}, /{collection}/{key}, /{collection}/_search). There is nothing to deploy or keep in sync: the introspection endpoints read the same configuration as the REST endpoints.
The MCP server also answers at one address shared by every environment, https://mcp.foxnose.net/_mcp, which reads the environment out of the API key instead of the hostname — that is the form to hand to a catalogue or a connector config. See Single Endpoint.
The three introspection endpoints
| Endpoint | Path | Purpose | Reference |
|---|---|---|---|
| MCP Server | GET|POST|DELETE /{api_prefix}/_mcp | Per-API Model Context Protocol server over Streamable HTTP. Publishes up to nine tools: discovery, schema and retrieval always, writes and file uploads when the key and the API allow them. Usable by any MCP client. | MCP Server → |
| Router Introspection | GET /{api_prefix}/_router | Flat list of every reachable REST route under this prefix, with method, path, action (get_many / get_one / search / schema), scope (collection / item), path params, query params, request body contract, and response shape. | Router Introspection → |
| Schema Introspection | GET /{api_prefix}/{collection_path}/_schema | Live JSON Schema and route metadata for a connected collection, including searchable_fields and configured locales. | Schema Introspection → |
A client that builds REST requests itself reads /_router for the routes and /{collection}/_schema for what each expects. An agent can use the MCP server instead, whose tools cover the same ground.
What makes this agent-native, not just MCP-enabled
- Hybrid search arrives as one tool. The
search_recordstool wraps FoxNose's hybrid retrieval — vector similarity, full-text matching, and structured filters in a single call. There is no fan-out logic to write between separate search backends. - Constant tool count, regardless of content size. The tools work across every connected collection via a
resource_idargument. Adding a tenth collection, or a hundredth, does not grow the catalog; it expands what the tools can reach. - Schema-driven tool inputs, no drift. The
describe_resourcetool returns the live JSON Schema of any collection — including which fields are searchable, which are vectorized, and which locales are configured. The agent can validate its tool calls against the current schema before issuing them, and a schema change reaches the tools without a code change. - Localization-aware. Every collection's schema exposes its configured locales. An agent that talks to a multilingual knowledge base can ask
describe_resourceonce, then callsearch_records/get_recordwith the rightlocalesargument, with no separate tool per language. - One source of truth for permissions. The agent inherits exactly the access rights of its Flux API key, with no separate tool list or role system (see below).
- Safe concurrent writes. Reads carry the record's revision, and an agent that passes it back to
update_recordas a precondition cannot silently overwrite another agent's write. See How Writes Work.
Same auth, same permissions
There is no second access-control surface for agents. The introspection endpoints inherit the existing Flux API model:
is_auth_requiredon the API row controls whether a Flux API key is required for any traffic — including/_mcp,/_router, and/_schema. Public APIs accept anonymous reads; private APIs require a Flux API key on every request.allowed_methodson the per-collection connection (get_one,get_many,create,update) controls which MCP tools the agent gets per collection. A collection connected with onlyget_manyexposesquery_recordsandsearch_recordsbut notget_record— same as the REST surface.createandupdateare off by default: nothing is writable until you switch it on for a specific collection.- Flux API key roles apply the same way. A read-only key on a private API works for all five read tools; a key without
readon a specific collection cannot see that collection via MCP either. The write tools additionally requirecreate/updategrants on the key's role, and keys without them do not see the write tools intools/list.
If a collection is read-only via REST, it is read-only via MCP. If a collection is invisible to a given key via REST, it is invisible via MCP. And writing follows the same rule twice over: the key's role must allow writes on the API and the specific collection must accept them. The typical agent-memory setup — read every collection, write into one — is one API with writes enabled on a single collection.
Governing agent visibility per API
Two toggles per Flux API, set independently, control what agents can discover:
mcp_enabled(defaulttrue) — whenfalse,/{api_prefix}/_mcpreturns404. The MCP tool surface for this prefix is invisible to all clients.router_introspection_enabled(defaulttrue) — whenfalse,/{api_prefix}/_routerreturns404. The route catalog is invisible — agents cannot enumerate what's reachable under this prefix.
The data routes (/{collection}, /{collection}/{key}, /{collection}/_search) are never affected, so REST consumers keep working.
Toggle either flag through PATCH /v1/{env}/api/{api}/:
curl -X PATCH https://api.foxnose.net/v1/<ENVIRONMENT_KEY>/api/<API_KEY>/ \
-H "Authorization: Bearer <JWT>" \
-H "Content-Type: application/json" \
-d '{"mcp_enabled": false, "router_introspection_enabled": false}'
Typical governance scenarios:
| Scenario | Configuration |
|---|---|
| Phased rollout — validate agent integration on staging before exposing production | Set both to false on prod-* prefixes initially; flip to true once staging validates |
| Partner-only API — REST consumers are trusted partners under contract; agent discovery would broaden the audience inappropriately | mcp_enabled: false, router_introspection_enabled: false; partners use the documented REST routes |
| Compliance-restricted content — regulated knowledge surfaces that may not be exposed to autonomous LLMs | mcp_enabled: false; keep router introspection for internal tooling if needed |
| Internal-only API — used by your own apps for runtime discovery, but never by external agents | router_introspection_enabled: true, mcp_enabled: false |
Schema introspection (/_schema) has no toggle of its own: it follows the collection connection. To hide it, do not connect the collection to that API.
When to use MCP vs. a hand-written integration
| Situation | Recommended approach |
|---|---|
| An end user talks to your content through an MCP client | MCP server. No code on your side. See Connect Claude and Connect ChatGPT and OpenAI. |
| You're building a custom agent on an LLM API that accepts MCP servers | MCP server via API. Pass the /_mcp URL and your key in the API's MCP server settings; every tool your key allows is available. |
| You're building a RAG pipeline where the LLM doesn't directly choose tools — your app orchestrates retrieval and prompt assembly | Direct API calls or the LangChain retriever. You control the search mode, ranking, and context formatting precisely. |
| You need a fine-grained, app-specific tool surface (e.g., a single tool that wraps three FoxNose calls and post-processes the result) | Custom tool wrapper around the SDK. Pattern 3 in LLM Integrations. |
| Your client speaks only stdio MCP (no HTTP transport) | MCP server through a stdio-to-HTTP bridge. |
| Your LLM API has no MCP support | Custom tool wrapper around the SDK. |
The same Flux API serves both, so MCP for an assistant and direct calls inside your own orchestration can run side by side.
Client compatibility
Any MCP client that speaks Streamable HTTP and lets you set a header connects directly, for example Claude Code with claude mcp add --transport http --header "Authorization: Simple ...". A hosted connector that sends only Authorization: Bearer uses a bearer token. A stdio-only client connects through a stdio-to-HTTP bridge. FoxNose serves MCP protocol version 2025-03-26; see Limits.
What's next?
Connect your first client.
Read the protocol-level reference.
Manage the per-API toggles.
Understand rate limits and retrieval billing. Every MCP tools/call counts as one retrieval, and each Flux API enforces per-plan rate limits on agent traffic.