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:

  1. 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.
  2. 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

EndpointPathPurposeReference
MCP ServerGET|POST|DELETE /{api_prefix}/_mcpPer-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 IntrospectionGET /{api_prefix}/_routerFlat 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 IntrospectionGET /{api_prefix}/{collection_path}/_schemaLive 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_records tool 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_id argument. 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_resource tool 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_resource once, then call search_records/get_record with the right locales argument, 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_record as 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_required on 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_methods on the per-collection connection (get_one, get_many, create, update) controls which MCP tools the agent gets per collection. A collection connected with only get_many exposes query_records and search_records but not get_record — same as the REST surface. create and update are 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 read on a specific collection cannot see that collection via MCP either. The write tools additionally require create/update grants on the key's role, and keys without them do not see the write tools in tools/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 (default true) — when false, /{api_prefix}/_mcp returns 404. The MCP tool surface for this prefix is invisible to all clients.
  • router_introspection_enabled (default true) — when false, /{api_prefix}/_router returns 404. 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:

ScenarioConfiguration
Phased rollout — validate agent integration on staging before exposing productionSet 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 inappropriatelymcp_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 LLMsmcp_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 agentsrouter_introspection_enabled: true, mcp_enabled: false

When to use MCP vs. a hand-written integration

SituationRecommended approach
An end user talks to your content through an MCP clientMCP 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 serversMCP 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 assemblyDirect 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 supportCustom 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.

Was this page helpful?