For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Skip to content

MCP - Connection and security

This page explains how to connect to the MCP Server — from your own AI assistant or directly as an API — how sign-in works, what happens on each request, and the security model. For what you can do once connected, see MCP - Tools and entity types. Before you connect, check MCP - Who can use it. For step-by-step instructions per client, see MCP - Connect Claude, ChatGPT, Cursor and other MCP Clients.

Two ways to use it

You can use the MCP Server with your own external AI assistant or as a direct API from your own code.

Option A — Connect your own AI assistant

Add Smartico as an MCP connector in your assistant, using the endpoint below, and start a conversation — the assistant discovers the available tools automatically. There are two ways to authenticate the connection (see Authentication):

  • Sign in with Smartico (OAuth) — the recommended option. Point the assistant at the MCP endpoint; it opens a Smartico sign-in page where you log in and choose which label(s) to grant, then connects automatically. Nothing to copy or paste.

  • Static MCP token — for automations (scripts, servers, your own AI agents): create a service account token in the back-office and add it to the connector. A person connecting their own Claude, ChatGPT or Cursor should sign in instead.

Before you start with a static token, you need back-office access to obtain your label's MCP connection token. If you can't find it, contact your Smartico account manager.

Step 1 - Create an MCP token (static-token path)

Generate a token in the backoffice. You can create more than one - for example, a separate token per script or integration - and give each a recognizable name. A token may be scoped to one or more labels your user can access. A token made here is a service account token: it belongs to the label, not to a person.

  1. Log in to the Smartico backoffice.

  2. Go to Label → MCP → Access tokens.

  3. Click Create, enter a Token Name, choose an Access profile (such as MCP Viewer, MCP Editor, MCP Analyst, or MCP Full access), select the authorized labels, and copy the token. It is shown in full only once at creation — afterward, it is masked and cannot be retrieved. For details on privilege tiers, see MCP Access Profiles.

Step 2 - Add Smartico to your AI assistant

If your assistant supports OAuth, point it at the MCP endpoint and complete Sign in with Smartico — no token to paste.

If you are using a static token, the quickest way to connect (for example in Claude Code) is to run a single command. In a terminal, run:

Replace:

  • <N> with your Smartico environment number - for example aichat-api2.smartico.ai. If you're unsure which environment you're on, check with your account manager.

  • <your-token> with the MCP token you copied in Step 1.

That's it - your assistant is now connected to Smartico.

Prefer editing the config file? Instead of the command, you can add the same entry to your AI client's MCP configuration file by hand:

Save the file and restart your AI client so it picks up the new connection.

Connecting with web AI assistants (Claude, ChatGPT custom connectors): In your AI client's settings, open Connectors → Add custom connector and enter your environment connector URL. Choose Sign in with Smartico where the client supports it; otherwise put the token in the URL path: .../mcp/<your-token>. If your account uses a back-office IP allowlist, add the IP addresses of ChatGPT and other web connectors to it first, or their requests are refused. Claude's web connectors are accepted without it. Steps for each client: MCP - Connect Claude, ChatGPT, Cursor and other MCP Clients.

Step 3 - Start a conversation

Once connected, just describe what you want. For example:

"Connect to Smartico and create a segment of users who haven't deposited in the past 14 days but logged in at least once."

The AI assistant automatically discovers the right properties in your label, assembles the configuration, validates it, and asks you to confirm before saving.

Option B — Call it directly as an API

The server speaks JSON-RPC 2.0 over HTTP. Send a POST to the /mcp endpoint with your token; clients that stream responses also open a GET connection to the same endpoint. Any HTTP client works — no special library required.

Endpoint

Use the URL for your environment (your Smartico contact can confirm it). Example: aichat-api2.smartico.ai.

Headers

Header
Value

Authorization

Bearer <your-token> (a bare token is also accepted)

Content-Type

application/json

x-mcp-mode

json for programmatic clients (returns standard JSON). The default, toon, is a compact format optimised for AI assistants.

If your connector can't set custom headers, put the token in the URL path instead: .../mcp/<your-token>.

Example - list active real-time automation rules

Optional check before you save. entity_create, entity_update and exec_operation accept an optional dry_run argument. With dry_run: true the request is checked and nothing is saved: the answer is "ok" (with any warnings) or what is wrong. Without it, the change is saved, and the answer says what was written (for an update: the fields it changed, before and after).

Building your own AI agent? Start from the open-source example smarticoai/simple-mcp-agent on GitHub: a Node.js and TypeScript agent that connects with a token, gives the MCP tools to an AI model and checks every change with dry_run before it saves.

Authentication

You can connect in one of two ways.

Sign in with Smartico (OAuth)

For AI assistants that support OAuth, this is the easiest and most secure option — there's no token to create, copy, or store.

  1. Add the Smartico MCP endpoint to your assistant.

  2. The assistant discovers Smartico's OAuth configuration automatically and opens a Smartico sign-in page in your browser.

  3. You log in and choose which label(s) the connection may access.

  4. On approval, the assistant is connected. The access it receives does not expire, so you don't have to reconnect — unless your access profile changes or your back-office user is deactivated.

Behind the scenes this maps to your back-office user and issues a personal access scoped to the labels you approved — the same permission model as a token. Each back-office user has one personal MCP access: signing in again, from any assistant, replaces the labels it may use. It uses standard OAuth 2.0. Sign-in is open to Claude (claude.ai and Claude Desktop), ChatGPT, Cursor, Windsurf and Gemini; other clients, Claude Code included, connect with a token.

Static MCP token

Create an MCP token in the Smartico back-office (see Step 1 under Option A) and give it to your connector or script. Treat it like a password — anyone who has it acts as the label's AI/API user, with the access profile chosen on the token.

  • Pass it in the Authorization header as Bearer <your-token> (a bare token is also accepted).

  • If your connector can't set custom headers, put it in the URL path instead: .../mcp/<your-token>.

How a request works

Whichever method you use, the flow is the same:

  1. You (or your assistant) call a tool with its arguments — in plain language, or as an API call.

  2. The server authenticates your token and resolves it to a label. If you passed an optional label_id, it must be one your token is authorized for; otherwise the token's default label is used.

  3. The assistant (or your code) explores your label to find the right properties, events, activities, or other records.

  4. The assistant tells you what it will create or change. Assistants that follow the tool markings ask you to confirm each write.

  5. The tool runs against your back-office, applying the same validation the UI does. An optional dry_run: true only checks the change and answers "ok" or what is wrong; without it, the change is saved.

  6. The answer says what was written, with a link to the affected record in the backoffice.

Security & permissions

  • Access = user + label + access profile. Whether you connect with OAuth or a static token, the connection is scoped to an access profile (such as MCP Viewer, Editor, Analyst, or Full access) and a set of authorized labels. For comprehensive profile configuration details, see MCP Access Profiles.

  • Per-label authorization. A token may be scoped to several labels. Any tool call can target one of them with the optional label_id argument; a label the token isn't authorized for is rejected.

  • Same rules as the UI. Creates and updates go through the same validation as the back-office forms, so MCP can't write data the platform would reject.

  • Create and name multiple tokens. Issue separate service account tokens per script or integration, each with its own name, so you can track and revoke them independently. Anyone with a token acts as the label's AI/API user, with the token's access profile, so manage them accordingly. Teammates should use Sign in with Smartico instead of a shared token.

  • Token type and warning sign. The Access tokens screen shows each token's Type: Service account (made on this screen) or Personal (made when a person signs in from an AI client). A red warning sign next to a token's name means the person who created it no longer has access to Smartico. The token still works, so check who uses it and deactivate it if nobody needs it.

  • Copy a token once. The full token is shown only at creation and is masked afterward — store it securely, and generate a new one if it's lost.

  • Nothing changes without approval. Reference and catalog types and the knowledge tools can't change anything. The read tools are marked read-only, so an assistant may run them without asking. The tools that write — entity_create, entity_update, exec_operation, and batch (which can run them) — are not, so assistants that follow these markings ask a person to confirm them. An optional dry_run: true checks a change without saving it.

  • Tokens can be revoked at any time. Deactivate a token from the Access tokens screen, and access is lost immediately.

  • Changes are attributed. Changes made with a static MCP token are recorded under a dedicated AI/API user of the label where the token was created, so integration changes are easy to distinguish from manual changes in your change history. Changes made through Sign in with Smartico are recorded under your own back-office user.

  • Usage is logged. Every tool call is recorded and visible in the backoffice under Label → MCP → Usage, where it can be filtered by token, period, tool, and entity type, so label activity can be reviewed and audited.

To see the labels a token can use, read the resource smartico://labels.

Frequently asked questions

Which AI assistants are supported? Any MCP-compatible client, including Claude, Claude Code, ChatGPT and Cursor. Claude, ChatGPT, Cursor, Windsurf and Gemini can connect with Sign in with Smartico; Claude Code and other clients use a static MCP token. If your account uses a back-office IP allowlist, ChatGPT and other web connectors need their IP addresses on it. See MCP - Connect Claude, ChatGPT, Cursor and other MCP Clients.

Where do I generate and manage MCP access tokens? In the Smartico back-office, navigate to Label → MCP → Access tokens and click Create. You can assign a descriptive name, choose an access profile, and select which label(s) the token can access. These are service account tokens for automations; a person connecting their own AI assistant should use Sign in with Smartico. The full token is displayed only once upon creation; make sure to copy and store it securely.

What should I do if the MCP section is not visible in my back-office menu? Access to the MCP menu (Access tokens, Access profiles, Playground, Usage) requires the feature to be enabled for your label and granted to your user permission group. If the MCP section is missing from your navigation menu, contact your Smartico account manager or support team to enable MCP access for your account. For the full checklist, see MCP - Who can use it and MCP - Troubleshooting.

How do I know which environment endpoint URL to use? The environment number in your connection URL matches the environment hosting your Smartico back-office (for example, environment 6 uses the environment 6 AI API endpoint). You can find your exact endpoint URL and pre-formatted configuration commands in the back-office under Label → MCP → Access tokens after creating a token.

Can team members connect their own AI assistant accounts individually? Yes. Using OAuth (Sign in with Smartico), each team member logs in with their own back-office credentials and selects their authorized labels. All actions are scoped to that user's permissions and MCP access profile, and audit logs attribute changes to the individual user.

Do back-office IP allowlist restrictions apply to MCP connections? Yes. If your account enforces an IP allowlist, every MCP request must come from an allowed IP address — with a static token and with Sign in with Smartico alike, and the sign-in page itself checks it too. The allowlist of the token owner's account applies; for a static token, that is the label where the token was created. Claude's web connectors (claude.ai custom connectors) are accepted without being on your allowlist; other web connectors, such as ChatGPT, are not, so their requests are refused unless their addresses are allowed.

Last updated

Was this helpful?