Connect Claude
Every Flux API exposes a built-in MCP server. Point Claude, or any Model Context Protocol client, at it and the model can discover, read and search your collections, and write where the key allows it, with no SDK or glue code.
There are two addresses. The single endpoint is the same for everybody and needs only your key:
https://mcp.foxnose.net/_mcp
Your environment's own address works too, and is what the rest of this guide uses, because it makes the moving parts visible:
https://{environment_key}.fxns.io/{api_prefix}/_mcp
Prefer the single endpoint for anything you hand to someone else — a connector config, a marketplace listing, a README. See Single Endpoint for how it picks the API and what it does not accept.
Prerequisites
Before you start:
- A Flux API with at least one connected collection. See Expose Content via Flux API.
- Your environment key (e.g.,
7c9h4pwu) and API prefix (e.g.,blog) — both visible in the Flux API page of the dashboard. - A Flux API key if the API has
is_auth_required: true— used as apublic_key/secret_keypair, or as a bearer token for hosted connectors. See Manage Roles and API Keys. Public APIs work without keys. - An MCP-aware client. This guide uses Claude Code, but any client that supports the MCP Streamable HTTP transport works the same way.
What you get
The model gets the MCP tools scoped to the API's connected collections. The five read tools are always present; the write tools appear when the key's role grants create/update; get_upload_status appears when the API has a files collection, and request_upload when the key may also create records in it. Writes land only in collections whose connection allows them, so an agent can read the whole knowledge base but write only into, say, its memory collection. Tools follow the same permissions as the REST routes; see Same auth, same permissions.
Step 1 – Verify the endpoint
Before wiring it into a client, confirm the MCP endpoint is reachable and responsive. Two raw curl calls — initialize, then tools/list.
# Replace with your env_key and api_prefix.
URL=https://7c9h4pwu.fxns.io/blog/_mcp
# 1. Initialize a session. Grab the Mcp-Session-Id from the response headers.
SID=$(curl -sS -i -X POST $URL \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}' \
| awk -F': ' 'tolower($1)=="mcp-session-id" {gsub(/\r/,"",$2); print $2}')
# 2. List the available tools.
curl -sS -X POST $URL \
-H "Content-Type: application/json" \
-H "Mcp-Session-Id: $SID" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}'
You should see a JSON-RPC response listing five read tools (discover_resources, describe_resource, get_record, query_records, search_records) with their input schemas — plus create_record and update_record if your key's role grants writes.
Which credential you need depends on what the client lets you send. Both resolve to the same key and the same permissions.
- You write the header yourself (Claude Code, Claude Desktop, Cursor, custom clients) → Simple:
Authorization: Simple <public_key>:<private_key>. - The client only takes a token (the Claude API's
mcp_serversconnector, and hosted connectors generally) → a Bearer token:Authorization: Bearer fxk_.... Those connectors send theBearerscheme and offer no way to change it, so aSimple ...header cannot be produced at all. See Step 3.
FoxNose's Secure scheme signs each request over the body and a timestamp, so it can't be pre-computed into a fixed header — it's for server-side and SDK code, not MCP client configs.
Either way, use a dedicated Flux key scoped to only the APIs this agent needs. Anonymous traffic is allowed on public APIs (is_auth_required: false).
Step 2 – Wire it into Claude Code
Claude Code (the CLI agent) accepts HTTP-based MCP servers directly. Register the Flux API as an MCP server with:
claude mcp add --transport http foxnose-blog https://7c9h4pwu.fxns.io/blog/_mcp \
--header "Authorization: Simple $FOXNOSE_PUBLIC_KEY:$FOXNOSE_PRIVATE_KEY"
Drop the --header flag if the API is public.
In a Claude Code session, the tools then appear under the foxnose-blog prefix:
foxnose-blog__discover_resources
foxnose-blog__describe_resource
foxnose-blog__get_record
foxnose-blog__query_records
foxnose-blog__search_records
You can confirm the server is connected with:
claude mcp list
Step 3 – Other MCP-aware clients
Any client that implements MCP Streamable HTTP 2025-03-26 works the same way. The common config shape is:
{
"mcpServers": {
"foxnose-blog": {
"type": "http",
"url": "https://7c9h4pwu.fxns.io/blog/_mcp",
"headers": {
"Authorization": "Simple ${FOXNOSE_PUBLIC_KEY}:${FOXNOSE_PRIVATE_KEY}"
}
}
}
}
Drop the headers block for public APIs. The exact file location and key names depend on the client — consult its docs. Clients that only speak stdio MCP (no HTTP transport) need a bridge such as mcp-proxy in between.
Step 4 – Hosted connectors (Claude API)
The configuration above assumes you can write the Authorization header. A hosted connector cannot: it takes a token value and sends it as Authorization: Bearer <token>, with no way to choose the scheme. The Claude API's MCP connector works this way, through mcp_servers[].authorization_token.
For those, issue a Bearer token on the Flux key you want the connector to act as:
curl -X POST https://api.foxnose.net/v1/7c9h4pwu/permissions/flux-api/api-keys/dw2qC5qRwxuZ/bearer-token/ \
-H "Authorization: Bearer $MANAGEMENT_ACCESS_TOKEN"
The response contains bearer_token — an fxk_... value shown once. Pass it as the connector's token:
{
"model": "claude-sonnet-4-5",
"max_tokens": 1024,
"messages": [
{ "role": "user", "content": "Save a note in my memory collection, then read it back." }
],
"mcp_servers": [
{
"type": "url",
"url": "https://7c9h4pwu.fxns.io/blog/_mcp",
"name": "foxnose-blog",
"authorization_token": "fxk_A7fQ2mXe..."
}
]
}
A bearer token lets a hosted connector write, for example into agent memory: writes always require an authenticated key with create/update grants. Give the key create on the collection the agent should write into, and nothing more.
To cut the connector off, re-issue the token — the previous one stops working while everything using the key's public/private pair carries on. Do not confuse the two Bearer credentials in the snippets above: the curl uses your Management API JWT, the connector uses the fxk_ token.
Hiding the agent surface for a specific API
To keep an API's REST routes but hide its MCP server or route catalog from agents, turn off mcp_enabled or router_introspection_enabled. See Agent visibility per API.
What's next?
Explore the protocol details. The full MCP server reference covers session lifecycle, JSON-RPC error codes, rate limits, and the tool result envelope.
Discover routes at runtime. If you're building a custom agent rather than using an MCP client, the router introspection endpoint gives you a flat list of every REST route under a prefix.
Know what it costs. A read tool call counts as one retrieval against your plan, and a record write as weighted write units; the handshake calls (initialize, tools/list, ping) are free. See MCP billing.