Skip to content

MCP Server

A Fullfinity workspace can present itself over the Model Context Protocol, so an assistant — Claude, or any other MCP client — can look things up, answer questions from live data, create and change records, and run the same actions a person would.

It is a licensed module (mcp). Once installed, switch it on under Integrations → MCP Server; the switch is per company.

The endpoint is POST /mcp, speaking JSON-RPC 2.0 over HTTP. There are two ways to authenticate, and which one you want depends on who is asking.

Sign in as yourself (OAuth) — for people

Section titled “Sign in as yourself (OAuth) — for people”

This is the right choice whenever a person is talking to the assistant, and it is what Claude’s connector flow uses. Each person authorises separately and gets their own access, so what the assistant can see and do is exactly what that person can.

An administrator registers the assistant once under Settings → General → MCP Clients, which produces a Client ID (and, for a server-side client, a secret). Whoever is connecting enters those in the assistant’s connector settings alongside the URL; the sign-in happens in a browser, and no credential is copied around.

Discovery is automatic. An unauthenticated call to /mcp answers 401 with a WWW-Authenticate header naming /.well-known/oauth-protected-resource, which names the authorization server, whose metadata lives at /.well-known/oauth-authorization-server. Clients walk that chain themselves.

The person sees a consent screen before anything is granted. Following the assistant’s authorization link shows a page naming the assistant, the signed-in account, what the assistant will be able to do, and where the answer will be sent; only clicking Allow on that page issues an authorization code. The page cannot be framed, and its form is bound to the account and to the exact request shown, so a link or form crafted elsewhere cannot authorize on someone’s behalf.

Authorization is refused — the assistant receives error=access_denied — when:

  • MCP is switched off for the company (Integrations → MCP Server), or
  • the signed-in account is not a staff (internal) user. MCP exposes the backoffice’s own operations — searching any model, creating and updating records, running actions — which the generic API also reserves to internal users; portal contacts reach their records through the portal instead. The same rule is applied to every call on /mcp, so a token stops working if its owner later loses staff access.

Authorization Code with PKCE (S256) is required of every client, public or confidential. Access tokens last an hour; refresh tokens last 30 days and both halves rotate on every refresh, so a stolen refresh token stops working as soon as the real client uses its own. A connection ends with the rest of its owner’s sessions: when their password changes or the account is deactivated, its access token stops working and its refresh token is refused, so the assistant has to be connected again. Tokens are audience-bound to this MCP endpoint — one will not authenticate anything else, and a token request naming a different resource is refused with invalid_target. Every redirect back to the client carries iss (RFC 9207), declared in the authorization server metadata. The protected-resource metadata is also served at the path-specific address /.well-known/oauth-protected-resource/mcp.

Dynamic Client Registration is not implemented. It is a SHOULD in the specification, and the alternative it names — the person entering a client id issued by the server — is what the register above provides.

For a script or a scheduled job with no person behind it, an ordinary API key on the Authorization header still works, exactly as in API Overview:

{
"mcpServers": {
"fullfinity": {
"url": "https://your-workspace.example.com/mcp",
"headers": {
"Authorization": "Bearer ff_your_key_here",
"X-DB-NAME": "your_database"
}
}
}
}

Be deliberate about this one: a key authenticates its service account, so everyone sharing a key shares one identity, one set of permissions, and one line in the activity log. That is right for an unattended integration and wrong for a team of people — use OAuth for them.

X-DB-NAME names the database to serve. Omit it if the server sets DEFAULT_DB or hosts exactly one database; if it hosts several and the request names none, the call is refused with REQUEST_NOT_TIED_TO_DB rather than guessing.

The server is stateless — it issues no session id, and each call stands alone. It also sends no unsolicited messages, so GET /mcp is declined rather than held open.

A client that cannot send X-DB-NAME — Claude’s hosted connector cannot add headers to an OAuth connection — reaches the database the server resolves for it, the same way a browser that names none does: DEFAULT_DB if it is set, otherwise the one database DB_FILTER leaves for the host the call arrived on (%h is the hostname, %s its first label — DB_FILTER: "^%s$" serves acme.example.com from the acme database). If that leaves several, the call is refused with REQUEST_NOT_TIED_TO_DB; give each database its own hostname, or set DEFAULT_DB.

Register the assistant first (OAuth only): Settings → General → MCP Clients, then Register Client, with Cannot Keep a Secret left on for every client below — they prove themselves with PKCE — and the redirect URI the client uses. Register shows the Client ID.

Claude (web, Desktop and mobile) — a custom connector:

  1. Register a client with the redirect URI https://claude.ai/api/mcp/auth_callback.
  2. In Claude, add a custom connector with the URL https://<your host>/mcp. Under OAuth client, choose Use your own OAuth client and enter the Client ID; leave the secret blank.
  3. Connect. Claude opens the sign-in and consent page in a browser; each person who uses the connector signs in as themselves.

The connector’s authentication settings cannot be edited after it is added — to change the Client ID, remove the connector and add it again.

Claude Code, as a person (OAuth):

  1. Register a client with the redirect URI http://localhost/callback. Claude Code receives the sign-in on a port it picks each time; a loopback address (localhost, 127.0.0.1, [::1]) matches on any port and on any of those three names, with the path and query still exact.

  2. Add the server:

    Terminal window
    claude mcp add --transport http --client-id <client id> fullfinity https://<your host>/mcp

Claude Code, as a program (API key — see above for when that is the right choice):

Terminal window
claude mcp add-json fullfinity '{"type": "http", "url": "https://<your host>/mcp",
"headers": {"Authorization": "Bearer ff_your_key_here", "X-DB-NAME": "your_database"}}'

Leave out X-DB-NAME when the server resolves the database itself (above).

Any other MCP client connects the same way: register the redirect URI its documentation gives, and give it the Client ID. A client that relies on Dynamic Client Registration cannot connect, since there is none to rely on.

What you seeWhat it means
401 with WWW-Authenticate on the first callExpected: the start of sign-in. A client that stops here does not do OAuth — use an API key.
That redirect address is not registered for this client.The client’s redirect URI is not on the client’s list. Copy it exactly from the client’s documentation.
error=access_denied after signing inMCP is switched off for the company, the account is not a staff user, or the person pressed Deny.
error=invalid_targetThe client asked for a different server than this one — the URL it was given does not end in /mcp on this host.
403 — Requests from that origin are not accepted.A browser page on another origin called /mcp. See “What is negotiated”.
400 — Unsupported MCP-Protocol-VersionThe client asked for a revision this server does not speak. A client that speaks an older one falls back by itself.
REQUEST_NOT_TIED_TO_DBThe server hosts several databases and could not tell which; see “Which database a call reaches”.
A connection that worked stops with 401Its token was revoked, its client archived, its refresh token unused for 30 days, its owner’s password changed, or its owner lost staff access. Connect again.

initialize negotiates protocol version 2025-11-25, 2025-06-18 or 2025-03-26 (an unknown version is answered with the newest) and declares tools only. Resources and prompts are deliberately not advertised, because none are served — a client that listed them would find nothing.

The endpoint is stateless and speaks the initialize-based revisions. A request whose MCP-Protocol-Version header names any other version — including 2026-07-28, which dropped the handshake — is answered 400 with a plain JSON-RPC error, which is the signal a client that speaks both generations uses to fall back to initialize. A request without the header is served as 2025-03-26.

A request carrying an Origin header for a different host than the one it reached is refused with 403 (the specification’s DNS-rebinding defence). Assistant connectors call server-to-server and send no Origin; a browser-based client must be served from this host or from an origin the deployment allows with CORS_ORIGIN_REGEX.

A fixed set of tools, not one per model. A workspace holds hundreds of models, each with create, read, update, delete, its own methods and its own documents; published individually that is thousands of tools, which no client will render and no assistant can hold in view. So the workspace is reached by discovery instead: ask what exists, ask what one thing looks like, then read or act on it by name.

ToolWhat it does
whoamiThe account, the company it acts for, and what it may do
list_modelsThe kinds of record this workspace holds
describe_modelOne model’s fields — which are required, which are read-only, the choice values — and whether you may write it
search_recordsRecords matching a filter (at most 50)
get_recordOne record by id
aggregate_recordsCounts, sums and averages, grouped — including by period
find_capabilityWhich app or setting covers a topic, installed or not
list_actionsThe buttons and documents a model has
render_reportProduce a document for some records, returned as a file
create_recordCreate one record
update_recordChange one record
delete_recordDelete records by id
run_actionPress one of the buttons list_actions reports

Filters are Q expressions, the same ones the data API takes: Q(state='Confirmed') & Q(total__gt=5000). uid is the calling account’s user id and cid its company. Choice values are the exact words describe_model reports, capitals included — a Selection stores what it displays, so "draft" is not "Draft" and is refused rather than stored.

Writes name related records the way the data API does. A many-to-one field takes the related record’s id; a one-to-many or many-to-many field takes a list of commands — ["create", {values}], ["edit", id, {values}], ["link", [ids]], ["unlink", [ids]], ["delete", [ids]], ["set", [ids]], ["clear"]. So a document and its lines are made in one call, and everything the form would derive — the customer’s pricelist and terms, each line’s price, taxes and unit — is derived the same way:

{"model": "SaleOrder",
"values": {"contact": 85,
"lines": [["create", {"product_variant": 1, "quantity": 3}]]}}

Values inside a nested create or edit are checked like the record’s own, so a wrong field or shape on a line is refused by name. The create_record and update_record descriptions carry the same explanation, so an assistant reads it without being told.

Counting and totalling is aggregate_records. group_by takes field names, and a date field can be grouped by period with field:day, :week, :month, :quarter or :year; measures takes {operation, field} pairs, the operation being count, sum, avg, min or max:

{"model": "SaleOrder", "filter": "Q(state='Confirmed')",
"group_by": ["date:month"],
"measures": [{"operation": "count"}, {"operation": "sum", "field": "total"}]}

A key carries exactly the authority of its service account — its groups, its companies, its record rules. Access rights are already expressed per model and per operation, so a narrower connection is a narrower account, not a second permission system.

That is also how a read-only connection is made: grant the service account read and nothing else.

Permission is then checked in two places, answering two different questions:

  • The tool list. create_record, update_record, delete_record and run_action are withheld from an account that cannot write anywhere, and refused if asked for anyway.
  • The call itself. Passing the first check only means the account can write something — every internal account can post a message or add an attachment, which is what working in the product means. So each write is also checked against the record type it names, before it runs.

describe_model reports that per-record-type answer as you_may, which is what an assistant should read before writing rather than discovering it by being refused.

Everything runs as that account. Record rules narrow what a search returns, so a total is that account’s total; a record it may not see is absent rather than refused, and “not found” may mean “not yours”.

A tool that refuses — an unknown field, a record that isn’t there — returns a result marked as an error, not a transport error, so the assistant can correct itself and carry on. The same goes for arguments that do not fit the tool’s inputSchema (the refusal names the argument and the shape it takes), a filter naming a field that does not exist, a value the database rejects (““Pricelist” is required.”), and a write to a field describe_model marks readonly — which is refused by name rather than silently left out of the write.

A filter comparing a choice field to a value it does not offer — Q(state='confirmed') where the values are Quote, Sent, Confirmed, … — is not refused: records can still hold a value from before a choice was renamed, and they stay findable. The answer comes back unchanged, with a notes entry naming the values the field does offer, so an empty result is not mistaken for “there are none”.

Tool results carry the JSON as text, and also as structuredContent whenever the result is a JSON object (a list, such as list_models, comes as text only — the specification types structured content as an object).

The one to watch is run_action. A method that answers with a wizard has not run; it has asked a question. Treating that as success is the mistake the shape exists to prevent. The result says "status": "needs_input", and asks_for describes the question:

  • model — the wizard to answer;
  • fields — what it asks, each with its type and whether it is required;
  • prefilled — what the form would open with: what the opening action decided (the invoice a payment is for) and the wizard’s own defaults (the amount still owed, today’s date, the default payment method). Relations are ids, ready to send back; rows the wizard proposes (a produce wizard’s component lines) are create commands carrying their values;
  • prefilled_names — the names behind any prefilled ids, to show the person what was chosen.

To answer, call list_actions on the wizard’s model for its confirming action, then run_action on that model with prefilled and the answers together as inputs:

{"model": "GlobalDiscountWizard", "method": "action_apply",
"inputs": {"order": 14, "discount_type": "Percentage", "percentage": 10}}

A button that opens related records (an order’s deliveries, a purchase’s bills) answers with opens: {"model", "record_id"} for one record, to read with get_record, or {"model", "filter"} for several, to pass to search_records. An action name the account cannot run is refused with the names it can.

Answering a wizard needs no permission on the wizard itself — it is a form, held in memory — only on what its action changes. An account that may not edit orders can open the discount question but cannot apply the answer.

Every call is recorded — reads included, since reading is how a workspace leaks — with the tool, the arguments as given, the outcome, and which credential was presented — the API key, or for a person who signed in, the account and the client they connected through. A call that is refused or fails is recorded too, and leaves none of its writes behind: each call lands whole or not at all.

Settings → General → MCP Clients lists who has connected and through which client; archiving a connection cuts it off immediately, since tokens are checked on every call. Review it under Settings → General → Assistant Activity. Entries older than the retention window set on the integration are removed nightly.

  • No Dynamic Client Registration. An administrator registers each assistant once and hands out its Client ID; clients cannot register themselves.
  • No resources or prompts. Documents are returned by render_report as file content on a tool result instead.
  • search_records returns at most 50 rows. For anything countable, use aggregate_records — adding up a capped page is wrong on the row after the cap.