Skip to Content
DocsAINOX PLATFORM

Connectors

Connect the workspace to databases, MCP tool servers and external flows or agents so the assistant can use live data and outside tools during a chat.

A connector links your workspace to something the assistant can reach at the moment somebody asks a question — as opposed to files and knowledge sources, which are indexed ahead of time. New Connector offers five kinds:

  • Database — lets the assistant run read-only queries against a PostgreSQL or ClickHouse database and answer from the rows it gets back.
  • MCP server — exposes a set of tools (over the Model Context Protocol) that the assistant can call while it works.
  • Bedrock Flow — an Amazon Bedrock flow the assistant can run with an input you describe.
  • Dify Workflow — a Dify workflow app the assistant can run.
  • watsonx Orchestrate agent — an IBM watsonx Orchestrate agent the assistant can hand a question to, or a watsonx Orchestrate flow it can run directly.

An admin registers each one once; people then pick them per conversation from the chat composer.

Prerequisites

  • Workspace admin or owner. Without connector management rights the page shows Connectors are restricted to admins and owners.
  • For a database: a connection string, ideally for a read-only user, to a database the workspace's server can reach over the network.
  • For an MCP server: the server's HTTP endpoint URL, plus any request headers it needs (for example an Authorization token).
  • For the other three kinds: the identifiers and credentials from that service (listed in each section below).

Open the Connectors page

  1. Click the gear icon (Admin) near the bottom of the left rail, then Connectors under Documents & Knowledge in the admin sidebar. A workspace with nothing connected shows There are no connectors in this workspace and a New Connector button in the middle of the page; once connectors exist, the header reads Connectors with the count beside it, and New Connector sits at the top right.
  2. Click New Connector. The menu lists Add Database, Add MCP server, Add Bedrock Flow, Add Dify Workflow and Add watsonx Orchestrate agent.

Connect a database

  1. Choose Add Database. The Add Connection to Database dialog asks for a Name — the label shown on the card and in the chat picker — and a Connection string. Connect stays disabled until both are filled.
  2. Paste the connection string in the usual URI form, engine://user:password@host:port/database. The engine is detected from the scheme: postgres:// and postgresql:// give you a PostgreSQL connector; clickhouse://, http:// or https:// give you a ClickHouse one. Hover the info icon beside the field label for the same reminder.
  3. Click Connect. The workspace opens a real connection before saving anything. If it cannot, the field is outlined in red with a message naming the cause where it can tell — for example Authentication failed. Check the username, password, and database name., Host not found. Check the hostname in the connection string. or Timed out reaching the database. Check the host, port, and network. — and otherwise Could not connect to the database. Verify the host and credentials, then try again. Your input is kept so you can correct it and click Connect again.
  4. When the connection succeeds, both fields lock and a green Connection verified banner appears. Click Edit connection in the banner to unlock them and change the string.
  5. Optionally click Show Advanced Settings. Both fields help the assistant pick the right tables: Database Schemas narrows it to a comma-separated list of schemas (blank means all), and Description says in plain words what this database holds.
  6. Click Done. The connector appears as a card showing its name, the engine, a masked connection hint such as postgres://****@localhost:55432/analytics — the username and password are never displayed again — and the date it was added.

Connect an MCP server

  1. Choose Add MCP server. The dialog opens with the notice Make sure to connect to trusted tools: an MCP server can do whatever its tools allow, so only connect servers you trust.
  2. Fill Name of MCP server and URL of MCP server — the HTTP endpoint the server listens on (for example https://example.com/api/mcp), not its homepage.
  3. If the server needs authentication, click Add header under Request headers (optional) and enter a header name (such as Authorization) and its value (such as Bearer …). The value is masked; use the eye button to reveal it, and the X button at the end of the row to remove the header. Add as many headers as the server needs.
  4. Click Connect. The workspace contacts the server with those headers. If it cannot, the URL field shows Could not reach the MCP server. Verify the URL is correct and the server is online. On success the URL collapses to a read-only row with an Edit button, and a Provided Tools list shows every tool the server advertises, each with its description and its own switch. All of them start enabled.
  5. Switch off any tool the assistant should not be allowed to call. Disabled tools stay listed but are never offered to the model.
  6. Click Done. The MCP server joins the same grid as the databases.

Connect a Bedrock Flow

Choose Add Bedrock Flow. The dialog asks for:

  • Name and AWS region (for example us-east-1).
  • Description (shown to the chat agent) — tells the assistant when this flow is the right tool.
  • Flow identifier and Flow alias identifier from the Bedrock console.
  • Input node name and Input field name — where the flow expects its input.
  • Input shape — what the input looks like. Use Builder to pick a Root type and add properties (each with a name, a type and a Required tick), or switch to JSON to write the schema by hand.
  • AWS credentials: Access key ID, Secret access key, and Session token (optional) for temporary STS credentials.

Click Test once the region, both identifiers and both keys are filled. On success a green Flow verified — ready to save. banner appears and the button becomes Save flow; use Edit in the banner to change the details first.

Connect a Dify Workflow

Choose Add Dify Workflow and fill Name, Description (shown to the chat agent), Base URL (pre-filled with https://api.dify.ai/v1; change it for a self-hosted Dify) and the app's API key. Click Add workflow. The workspace contacts Dify before saving, so a wrong URL or key stops the save with an error in the dialog (for example Network error while contacting Dify.).

Who is asking

Every run sends the Dify workflow which member asked and in which chat. The workspace server sets both values itself; the chat agent cannot see or change them, so a message such as "I am someone else" has no effect.

ValueWhere the workflow reads itFormat
Membersys.user_idThe member's workspace user id, an opaque text id. It is not an email address.
ChatStart-node variable ainox_session_idThe chat's id: a UUID for chats started in the app; API callers name their own chat id. It is always a chat that belongs to the member.

The chat id is sent on every run, and Dify drops it unless the workflow asks for it. To read it, add a text input named ainox_session_id to the workflow's Start node with a Max length of at least 64, and mark it Required so a run without it fails. Chats started through the API can use ids of any length; if the workflow serves API chats, use a paragraph input with no Max length instead. No Refresh schema is needed, and the chat agent is never offered this input.

Prove who is asking

sys.user_id can be set by anyone who holds the Dify app's API key. When a service behind the workflow decides what the member may see, ask for a signed identity token instead:

  1. Add a paragraph input named ainox_identity_token to the Start node and mark it Required. The token is about 500 characters, so leave Max length empty or set it to at least 1024.
  2. Use Refresh schema on the card. Only workflows that declare this input receive the token, because it carries the member's email address.
  3. Pass the value on to your service unchanged, for example as an Authorization: Bearer header.

The workspace signs a new token for every run. Your service checks it like this:

CheckExpected value
SignatureAgainst the keys at <workspace server URL>/api/auth/jwks (EdDSA, Ed25519; pick the key by kid)
issThe workspace server URL
audainox:dify-workflow:<workflow id>, the id of this one Dify workflow connector. Reject anything else: a token copied from another workflow's run log, or one the workspace signed for another purpose with the same keys, carries a different aud.
orgYour workspace's id. Every workspace on the server shares the same keys.
expFive minutes after iat

The workflow id and workspace id are the id and organizationId of the workflow in GET /v1/dify-workflows (an API access key with the dify-workflows:read scope).

Once verified, read sub (workspace user id, same as sys.user_id), email, sid (same as ainox_session_id) and jti (unique per token). email is always a verified address: the workspace issues no token for a member whose sign-in did not verify their email (for example LINE, or a directory account without a mail attribute). Keys rotate every 90 days and a retired key stays published for 30 more, so cache the key set and fetch it again when a token names a kid you have not seen.

If the workspace cannot sign a token, for example because the member has no verified email address, the workflow is not run and the chat agent is told why. If two people may share one chat id, key per-chat state on both sub and sid.

No password or sign-in token is ever sent to Dify, and the email address leaves the workspace only inside identity tokens.

Connect a watsonx Orchestrate agent

Choose Add watsonx Orchestrate agent and fill:

  • Name and Description (shown to the chat agent).
  • Run mode — Agent hands the assistant's question to a watsonx Orchestrate agent as free text; Flow runs a watsonx Orchestrate flow directly with typed inputs.
  • Instance URL — your watsonx Orchestrate instance.
  • Agent ID (or Flow ID in Flow mode).
  • API key.

Click Test connection to check the details without saving — a tick appears on the button when it passes, and an error appears in the dialog when it does not (for example an invalid API key). Then click Add agent (or Add flow).

Choose which connectors start on in chat

Every connector card — database, MCP server, Bedrock Flow, Dify Workflow, and watsonx Orchestrate agent — carries an Enabled in chat by default switch. A new connector starts with it off.

  • On: the connector is already selected in every new chat; people can still deselect it for a particular question.
  • Off: people have to select it themselves each time.

The switch also decides what the Slack bot can use. A Slack message runs as the workspace member behind the Slack user, and it gets the tools of every MCP server that is Enabled in chat by default and has at least one tool switched on. Slack users who don't match a workspace member get no MCP tools. For Bedrock Flow, Dify Workflow and watsonx Orchestrate agents, the switch only affects web chat.

Use a connector in chat

In the chat composer, click the + button and point at Connectors to open a single list of every connector in the workspace, each with a switch. Connectors that are enabled by default are already on; switch any of them on or off for this question, or click Clear at the bottom to start from nothing. MCP servers show how many of their tools are enabled. See Chat for the rest of the composer.

Edit or remove a connector

  1. Click the … button on a card. Databases offer Edit connection and Remove; MCP server, Bedrock Flow, Dify Workflow and watsonx Orchestrate cards offer Edit and Remove, and Dify workflows and watsonx Orchestrate flows also offer Refresh schema to pick up changed inputs.
  2. For a database, Edit connection opens Edit Connection with the connection string empty and the masked hint as its placeholder. Leave it empty to keep the stored credentials, or type a new string, which is re-tested before it saves. The name, schemas and description can be changed on their own with Save changes.
  3. Remove asks for confirmation, and the dialog names the connector. What it says depends on the kind:
    • Database: Remove connector?, warning that the connector is removed permanently, disconnected from chat, and that this cannot be undone. Confirm with Remove.
    • MCP server: Remove MCP server?, with the same warning. Confirm with Remove.
    • Bedrock Flow, Dify Workflow and watsonx Orchestrate: Delete Bedrock Flow?, Delete Dify Workflow? or Delete watsonx Orchestrate agent?, warning that the connector is deleted and its stored AWS credentials or API key are erased, while its audit history is kept. Confirm with Delete.

Notes

  • Credentials and API keys are encrypted before they are stored and are never shown again.
  • Database access is read-only. The assistant can query, but nothing it does through a database connector can change your data.
  • A workspace has a limit on how many database connections it can hold; once you hit it, the add dialog says so and you have to remove one first.
  • Connector names must be unique among connectors of the same kind in a workspace: two databases cannot share a name, but a database and an MCP server can.

On this page