Connect an AI assistant
Give Claude, ChatGPT or your own agent access to Nucleo with the MCP connector, with each person's own permissions.
How it works
Nucleo runs one remote Model Context Protocol server at https://mcp.nucleoplatform.com. An AI client connected to it sees the tools of every Nucleo module the person can use — Brain, Catalog, Commerce, Intelligence — in the active company (chosen with nucleo_switch_company), with their own roles and permissions. Delete tools are not exposed, with two exceptions: brain_delete_deal (a soft delete of a deal created by mistake, restorable by an admin) and catalog_forget_memory, which deletes an entry of Atomo's memory in Catalog at once and for good. Writes that cannot be undone automatically are marked as destructive, so the AI client can ask the person first.
There are no keys to copy: the person signs in to Nucleo from the AI client and approves a consent screen. The client gets an OAuth access token that only works on the AI tools.
Connect Claude or ChatGPT
Claude (web, desktop and mobile apps):
- In Claude, go to Settings > Connectors and select Add custom connector.
- Name it
Nucleoand enter the URLhttps://mcp.nucleoplatform.com. - Select Connect, sign in to Nucleo and approve access.
ChatGPT (developer mode):
- In ChatGPT, go to Settings > Connectors > Advanced and turn on developer mode.
- Select Create, enter the MCP server URL
https://mcp.nucleoplatform.comand choose OAuth authentication. - Sign in to Nucleo and approve access.
If the person belongs to more than one company, the assistant can list them and switch with the connector's own tools before working.
Build your own MCP client
Any MCP client that supports remote servers with OAuth works. The server speaks protocol version 2025-06-18 over Streamable HTTP with JSON responses (no server-sent stream). The flow your client runs:
POST https://mcp.nucleoplatform.comwithout a token →401with aWWW-Authenticateheader pointing to the protected-resource metadata (RFC 9728).- The metadata names
https://auth.nucleoplatform.comas authorization server; read its metadata at/.well-known/oauth-authorization-server. - Register the client at
/oauth/register(RFC 7591) with yourredirect_uris. - Run the authorization code flow with PKCE (S256); the person signs in and consents.
- Exchange the code at
/oauth/token, then sendAuthorization: Bearer <token>on every MCP request. Refresh with the refresh token when it expires.
curl -X POST https://auth.nucleoplatform.com/oauth/register \
-H "Content-Type: application/json" \
-d '{
"client_name": "Acme Ops Assistant",
"redirect_uris": ["https://assistant.acme.example/oauth/callback"],
"token_endpoint_auth_method": "none"
}'curl -X POST https://mcp.nucleoplatform.com \
-H "Authorization: Bearer $NUCLEO_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}'Every call to /oauth/register creates a new client: register once and store the client_id. Redirect URIs must be https, except loopback addresses for local tools.
Call the module tools without MCP
If you run your own agent runtime and do not need MCP, the same tools are available as plain HTTP on each module: GET /api/v1/ai-tools lists them with their JSON Schema, POST /api/v1/ai-tools/{name} runs one. Use the same OAuth token and name the company in X-Nucleo-Company with its public id (orgs[].public_id in userinfo; the numeric id is deprecated). See AI Tools.
Upload a file to a deal
An assistant that produces a file — a PDF quote, a slide deck, a spreadsheet — does not pass it as a tool argument. Brain takes it in three steps:
- Call
brain_create_file_uploadwith the file name (PDF, PPTX, DOCX, XLSX, PNG or JPG, up to 25 MB). It returns anupload_idand a signedupload_url, valid once and for 15 minutes. - Send the file to
upload_urlwith an HTTPPUT, the raw bytes as body and theContent-Typeit returned. No token is needed: the signature in the URL is the credential. - Call
brain_attach_file_to_dealwith theupload_idand thedeal_id. The file becomes a draft document of the deal, which the person approves and sends from Brain.
curl -sS -X PUT "$UPLOAD_URL" \
-H "Content-Type: application/pdf" \
-H "Accept: application/json" \
--data-binary @quote.pdfQuote the URL: it carries the expires and signature parameters. Nucleo checks the real content of the file, so a file whose bytes do not match its extension is refused; after a refusal, start again from the first step. See Upload a file to a signed URL for every response.
Keep document numbers aligned
Contracts and quotes carry a Nucleo number (C-YYYY-NNNN, PRV-YYYY-NNNN) that the client sees on the document and that invoices cite. The number printed on the document and the number of the record in Brain must be the same, so an assistant that writes a contract or a quote follows one flow, always with the same number:
- Call
brain_reserve_document_numberwith thekindand thedeal_idbefore writing the document, and print the number in the document. - Save the document with that number:
brain_create_deal_documentorbrain_attach_file_to_dealwithdocument_number. Fordoc_typecontrattoorpreventivothe Contract or Quote record with the same number is linked, or created if it does not exist (recordin the result);contract_id/quote_idattach the file to an existing record of the deal. - If you create the record yourself, call
brain_create_record(contracts,quotes) withnumber, or with only thedeal_id: the open reservation of the deal is used. Without either, Nucleo assigns the next number.
brain_list_document_numbers shows the reserved numbers of a deal with their status (reserved, used by a record, cancelled), the documents that carry them and the contracts and quotes of the deal with their number. brain_cancel_document_number cancels a reserved number that nothing uses: a cancelled number is never reassigned.
To correct the number of an existing contract (also a signed one) or quote, call brain_update_record with number and change_reason. The change goes to the company timeline with the old and the new number, the reason and the person; the deal documents linked to the record follow the new number. A number is unique per type in the company: error: number_taken names the record that already uses it in taken_by. A number reserved for another deal (number_reserved_for_other_deal), a cancelled one (number_cancelled) and a Nucleo number of the current year not issued yet (number_not_issued) are refused; historical numbers in another format are accepted with a warning in warnings.
{
"name": "brain_update_record",
"arguments": {
"type": "contracts",
"id": 1234,
"fields": {
"number": "C-2026-0482",
"change_reason": "Aligned to the number of the contract sent to the client"
}
}
}Close a signed contract
A signed contract keeps its content: amount, dates and terms do not change, and nothing is deleted. When it ends early — replaced by a new contract, withdrawn, ended by mutual agreement or simply no longer active — close it with brain_terminate_contract (permission contracts.edit), after the person confirms:
termination_type:replaced,withdrawal,mutualorexpired;replacedneedsreplaced_by_contract_id, the new contract of the same company.effective_end_date: the last day, also in the past. With a date today or past the contract becomesexpiredat once and leaves renewals, the expiry schedule and the deal value; with a future date it stayssigneduntil then, with auto-renewal off, and expires by itself.change_reasonis required and the closure runs only after the person approves it in Nucleo (the preview returnsapproval_url);notified_at,penalty_centsandnotesfill the withdrawal fields.
The closure is written in the company timeline (contract, type, date, reason, person). A replaced contract points to the new one (replaced_by_contract_id) and the new one lists it under replaces in brain_get_contract. Calling the tool again corrects the closure; the previous values are kept.
To clean up many contracts at once, brain_list_contracts lists them with filters (up to 200 per page), and three tools act on up to 100 per call, each with one preview row per contract and one confirmation: brain_bulk_terminate_contracts closes signed contracts (also keeping the end date already on the contract, use_contract_end_date), brain_bulk_archive_contracts archives duplicates and brain_bulk_relink_contracts moves contracts to another company or deal. A failure on one contract does not stop the others.
Read and change Brain records
For CRM records without a dedicated tool, Brain has five generic ones: brain_list_record_types, brain_search_records, brain_get_record, brain_create_record and brain_update_record. Call brain_list_record_types first: it is the manual of the fields the person can read and write, with the allowed values (enum) and, under lookups, the options of the fields linked to a lookup table. Lookup ids belong to each company: read them again after nucleo_switch_company.
- Relationship types of a company (Client, Prospect, Supplier, Partner…):
relationship_type_idsholds ids fromlookups.business_relationship_types.brain_get_recordreturns them with id and name underrelations, andbrain_search_recordscan filter on them. Inbrain_update_recordthe list replaces the current one ([]clears it);relationship_type_ids_addandrelationship_type_ids_removeadd or remove single ids and keep the others. - Lifecycle stage of a company:
lifecyclestagetakes the same values as contacts (subscriber,lead,marketingqualifiedlead,salesqualifiedlead,opportunity,customer,evangelist,other) or null. Partner or supplier is a relationship type, not a stage. - Close date of a deal: Nucleo sets
closed_atwhen a deal moves to won or lost, and later saves never change it. To record the real date of a won or lost deal, sendclosed_at(YYYY-MM-DDor an ISO date-time): it cannot be in the future or earlier than the day the deal was created, and open deals have none. - Fleet: cars and traffic fines (permission
fleet.viewto read,fleet.manageto write): record typesvehiclesandfines. A fine finds its car fromplateand, when they are empty, Nucleo computesreduced_due_at(5 days),due_at(60 days) and, withdriver_communication_required,driver_communication_due_at(60 days) fromnotified_at.statusis one ofto_verify,to_pay,paid,contested,enrolled,cancelled; amounts are in cents (reduced_amount_centswithin 5 days,amount_centswithin 60,full_amount_centsafter). Filterbrain_search_recordswith e.g.{"status": "to_pay", "due_at": {"lte": "2026-11-30"}}or{"driver_communicated_at": null, "driver_communication_required": true}.brain_import_fine_from_emailreads a fine from a PEC without creating duplicates;brain_link_fine_paymentlinks the bank transaction that paid it. Archive a duplicate witharchived_at: true(restore withfalse): it disappears from searches. What the import read from the fine is inextraction_notes, so writingnotesnever loses it. Nucleo also keeps fines up to date by itself: fine notices arriving by PEC or SEND become fines assigned to the person responsible for fines (to_pay, orto_verifywhen plate, amounts or notification date are missing); later emails about a fine update it (driver communicated, contested, enrolled, a 126-bis fine linked throughorigin_fine_id) and bank transactions with the fine number pay it. Cancellations, new amounts and uncertain matches are left as suggestions for a person to confirm in Nucleo.
curl -X POST https://mcp.nucleoplatform.com \
-H "Authorization: Bearer $NUCLEO_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{
"jsonrpc": "2.0", "id": 2, "method": "tools/call",
"params": {
"name": "brain_update_record",
"arguments": {"type": "companies", "id": 1520, "fields": {"relationship_type_ids_add": [4]}}
}
}'Every change made through these tools runs with the same validation and automations as the Nucleo interface, and is written in the record's timeline with who made it, when, and the values before and after.
Permissions and writes
- The assistant can do only what the person can do in Nucleo, in the active company.
- Commerce and Intelligence tools are read-only. Brain and Catalog have write tools, marked as such in the tool list.
- Catalog applies only small, reversible changes from an AI client: at most 3 writes or 5 products within 10 minutes, per person and catalog. Larger ones — bulk changes, publishing, imports, deletions, whole-object replacements (every
PUTthroughcatalog_catalog_api, such as prices, stock, translations, categories or variants) and anything beyond that limit — come back as a preview and the person confirms them inside Nucleo. The one exception iscatalog_forget_memory, which deletes a memory entry at once and is marked destructive. - Catalog writes are not idempotent: calling
catalog_create_productagain creates a second product. From the connector, Catalog always works on the first ready catalog of the company that the person belongs to. - Tokens issued to AI clients work only on the AI tools,
userinfo, the AI company context (GET /api/mcp/context,PUT /api/mcp/companyonauth.nucleoplatform.com) and token revocation: they cannot call any other Nucleo API. - Removing the connector in the AI client does not revoke anything in Nucleo: the refresh token stays valid for 30 days. To revoke access, the client calls
POST https://auth.nucleoplatform.com/api/auth/revokewith its current access token: that token and its refresh token stop working at once.