How to Connect an AI Assistant to a Scenario via MCP
If you want an AI assistant (e.g. Cursor or another MCP-capable client) to call sections of your scenario as tools, you need to configure the section in the Constructor and add the connection in the AI client. This guide walks you through both steps.
When You Need This
- You need the AI assistant to get data from ConnectiveOne (exchange rates, catalog, checks).
- You need to call existing scenario logic from the AI client without duplicating code.
- You use Cursor or another application that supports MCP (Model Context Protocol).
What You Need to Know
- MCP Tool — trigger type on the section’s entry point; it exposes the section as a tool for AI clients.
- Input Schema — description of the tool’s input parameters (names, types) that the AI client can pass when calling.
- Return Schema — description of the result and the list of keys the platform returns from the section in the MCP response.
- Section result — for the AI to get useful data, the section must write the result to a special constant at the end (configured via an action in the scenario).
- Two connection options: the platform supports connection with authorization via headers (recommended) or via a URL with a token (alternative when the client cannot send headers). The difference is described below.
For more on how it works: Calling scenario sections from AI assistants (MCP).
Before You Start
- You are signed in with integrator or administrator rights.
- You have a scenario and a section you want to call from the AI assistant (or you are ready to create a new section).
- You have the ConnectiveOne platform URL, access token, and bot ID (provided by the administrator or obtained after sign-in).
Step-by-Step Instructions
1. Configure the Section as an MCP Tool in the Constructor
- Go to the Scenario module via the menu and open the bot’s scenario.
- Select the section that will be the “tool,” or create a new section.
- Open the Start node (entry point) of that section — the trigger settings appear in the right panel.
- In the trigger type, select MCP Tool.
- Fill in Input Schema — add the parameters the tool should accept (e.g.
currency,date). Specify name, type, and optionally description. - Fill in Return Schema — description of the tool for the AI and the list of result keys to return from the section.
- Ensure that at the end of the section logic the result is written to the special constant (via “save to constant” or the corresponding action). Without this, the MCP response may be empty.
- Save the scenario changes.
The editor has two buttons for copying the configuration. Which one to use depends on the connection method (see step 3).
2. Get Connection Data
To connect the AI client you need:
- Platform URL — ConnectiveOne server URL (e.g. for local development or production). The administrator or platform settings will give you the exact URL.
- Access token — obtained after sign-in or via the relevant settings. Keep it in a secure place.
- Bot ID — numeric ID of the bot whose scenario you configured as the MCP tool. You can see it in the interface when selecting the bot or in the scenario editor URL.
If you are unsure where to get these values — ask the platform administrator.
3. Add the MCP Server in the AI Client (e.g. Cursor)
Recommended: connection with authorization via headers (access token and bot ID). Alternative — URL with a token — only if the client does not support headers (see the paragraph after step 3).
- Open MCP settings in your AI client (in Cursor this is usually the MCP config file or MCP settings section).
- Add a new MCP server with:
- URL — platform URL + path to MCP messages (you can get it from the platform docs or from the “Copy config” button in the Constructor).
- Transport type — HTTP (if the client supports it).
- Headers — include the access token and bot ID in the format required by the platform (e.g. authorization header and header with bot ID).
- Save the configuration and reload the MCP client (if needed).
After this, the AI assistant can get the list of tools for your bot and call them by name, passing parameters according to the Input Schema.
Two configuration options. The recommended one is with headers (access token and bot ID), as described above; use the Copy config for .cursor/mcp.json button for this. If the AI client does not support sending headers, use the Copy URL-token config (no headers) button — the platform will generate a URL with an embedded token. In that case the URL with the token may end up in logs or be shared with third parties; the token is long-lived. Use this option only when the header-based method is not possible and you accept these risks.
4. Verify It Works
- In the AI client, confirm that the new MCP server and the list of tools for your bot appear.
- Call one of the tools (e.g. with minimal parameters) and check that the response is returned and contains the expected data.
- If the response is empty — check that the section writes the result to the special constant at the end and that the correct keys are listed in Return Schema.
What Next
- Add other sections as MCP tools if you need multiple types of calls.
- Update Input Schema and Return Schema when you change the section logic so the AI client gets an up-to-date description and results.
- If the AI should pass data when calling (city, date, identifier, etc.) — configure the tool parameters and their use in the scenario: How to configure MCP tool parameters in a scenario.
Related Articles
- Calling scenario sections from AI assistants (MCP) — why MCP tools are useful and how they work.
- How to configure MCP tool parameters in a scenario — add input parameters and use them in the scenario.
- How to use an action in a scenario — add an action to write the result to a constant.