fOSReference

Agent API

The fOS MCP server at mcp.tovr.eu and its REST bridge. Endpoints, sessions, API keys, OAuth, scopes, credits, connected integrations and error responses.

External assistants reach fOS through an MCP server that speaks Streamable HTTP, and through a REST bridge for clients without MCP.

EnvironmentHost
Productionhttps://mcp.tovr.eu
Staginghttps://mcp-staging.tovr.eu

Endpoints

EndpointPurpose
POST /mcpMCP messages. The first request without Mcp-Session-Id opens a session.
GET /mcp, DELETE /mcpStream and close an existing session, with Mcp-Session-Id
GET /api/v1/toolsREST bridge: the tools your token can call
POST /api/v1/tools/{toolName}REST bridge: call one tool with a JSON body
GET /openapi.jsonThe bridge's OpenAPI document
GET /health{"status":"ok","service":"fos-mcp",…}, no authentication
/.well-known/oauth-protected-resource, /.well-known/oauth-authorization-serverOAuth discovery
POST /oauth/register, GET /oauth/authorize, POST /oauth/tokenOAuth endpoints

Sessions

RuleValue
Where they liveIn the server's memory. A restart ends every session.
Unknown or ended Mcp-Session-Id404 "Session not found". Open a new session.
A GET or DELETE without a session400 "Session required"
OrganizationFrom the token, else from your memberships. Change it with switch_org.
Tool languageRead once per session from your user's language
Browser originsclaude.ai, chatgpt.com, chat.openai.com, gemini.google.com, www.perplexity.ai and TOVR's own hosts. A request without Origin is allowed.

Credentials

Send Authorization: Bearer <token>. The token is one of two kinds.

KindFormWhere it comes from
API keytovr_…Settings → Developer → API keys, shown once. Its scopes and organization are fixed on the key.
OAuth access tokenA JWT, valid for 3,600 secondsThe OAuth flow below

OAuth

StepRule
RegistrationPOST /oauth/register (dynamic client registration). A registered client expires after 30 days. Without scope it gets read write; an unknown scope is refused.
AuthorizationGET /oauth/authorize with PKCE S256 only. Without scope it asks for read. It sends you to TOVR's Authorize page, where you pick the organization and select Approve.
CodeValid for 5 minutes
TokenPOST /oauth/token with grant_type authorization_code or refresh_token
Refresh tokenValid for 90 days. Each use returns a new one and ends the old one.

Scopes

ScopeBuilt-in tools
readThe 19 read tools listed in Tool reference
writeThe read tools and report_vehicle_available, request_direct_offer, confirm_win
eitherlist_my_orgs, switch_org

A call to a built-in tool outside your scopes is refused: 403 on the bridge.

Connected integrations

When your organization has connected Gmail, Google Calendar, Google Drive or another fOS App, tools from it are listed next to the built-in tools of your MCP session. A tool set to Deny in Tool permissions is never listed. The REST bridge offers only the built-in tools. If TOVR cannot read an integration's credentials, that integration adds no tools. If its token cannot be refreshed, the integration is marked as needing action in Integrations.

Credits

Each MCP tool call costs 5 credits of your organization's fOS plan, charged before the tool runs, so a call that is then refused is charged too. Listing the tools over MCP is free. On the REST bridge, every request under /api/v1 costs 5 credits, including GET /api/v1/tools. See Credits and plans.

Errors

SituationMCPREST bridge
Missing or invalid token401 with WWW-Authenticate: Bearer resource_metadata="…/.well-known/oauth-protected-resource", error="invalid_token"401
Credits used upA tool result with isError and the text "fOS usage limit reached — upgrade your fOS plan or buy credits to continue."402 with error, reason, resetAt, upgradable
Tool outside your scopesA refusal result403
Unknown toolA tool result with isError and "Tool not found"403, because the scope check runs first. 404 only for a name your scopes cover that the bridge does not offer, such as switch_org.
Body is not JSON400
The tool returned an errorThe tool's error result200 with success: false and error
The tool threwA tool result with isError500

There is no per-minute rate limit on this server; usage is bounded by credits.

On this page