Recipes
Worked examples for AIPI and the MCP server: scope a key, connect an AI client, run workflows and agents, and check what a key can reach.
Short worked examples for AIPI, the Intuidy REST API, and the Intuidy MCP server, which AI assistants such as Claude connect to: scope a key, connect a client, run workflows and agents, and check what a key can reach.
Before you start
- You need access to Settings → AIPI Keys.
- A key's secret is shown once, when you create the key. After that, examples on the key's connect screen show a placeholder where the secret goes.
- REST requests use the base path
/api/v1and sendAuthorization: Bearer $INTUIDY_API_KEY. Requests with a JSON body also sendContent-Type: application/json. Operations, parameters and responses are in the OpenAPI document; see Download OpenAPI.
Store the secret in an environment variable so requests and client configs can read it:
export INTUIDY_API_KEY=<your-aipi-key><your-aipi-key> is the secret you copy when you create the key.
Create a key for one job
- Go to Settings → AIPI Keys.
- Select Create key.
- Enter a Name. Name the key after the system that holds it, for example
Claude Desktop. The name is what you see in the activity feed. - Under Access level, choose Just me or Whole company.
- Select only the scopes the job needs.
- Optionally, enter a date in Expires (optional).
- Select Create key.
- On the connect screen that opens, select Copy key and store the secret.
The key appears in Settings → AIPI Keys with the status Active.
| Option | Effect |
|---|---|
| Just me | Only your own workflows and notebooks. |
| Whole company | Everything in the organization. |
| Grant standard access | Selects every standard scope family. Connected services, data rule changes, users and approvals are not included; select each by name. |
| Clear all | Clears every scope. |
| Allow reading items marked sensitive | Lets the key read items marked sensitive. |
| Allow writing to items marked sensitive | Lets the key write to items marked sensitive. |
| Scope group | What it covers |
|---|---|
| REST API | Scopes for what AIPI serves, such as Execute Workflows and Run Agents & Teams. |
| Assets (AI assistants only) | Notebooks, dashboards, managed databases and the knowledge base. No REST endpoint serves these. They are reached through the MCP server, and any one of them lets the key connect to it. |
| Connected services | Your own Gmail, Drive, Docs, Calendar, Jira and other connected services. Writes send mail from your users' real addresses, and an API call has no approval step. |
| MCP (AI assistants) | Blanket grants that cover the Intuidy asset families at once. They do not include connected services. Prefer the narrower scopes. |
Example scope sets:
| Job | Select |
|---|---|
| Another system runs your workflows | Execute Workflows |
| An assistant reads notebooks and nothing else | Read Notebooks |
| An assistant runs read-only SQL on managed databases | Read Managed Databases (list, tables, health, SELECT) |
| An assistant lists and runs agents | Read Agents, Teams & Skills and Run Agents & Teams |
Connect an MCP client with the setup prompt
- Open the key's connect screen.
- Select Copy setup prompt.
- Paste the prompt into Claude Code, Cursor, Codex, or another MCP client.
The prompt carries the key, the endpoints, a ready config for each client, and what the key is allowed to do. The connect screen also has a config for each client, each with Copy.
| Client | Use |
|---|---|
| Cursor, Windsurf, VS Code, and other clients that take a server block with headers | The JSON server block below. |
| Codex | The Codex config. Long workflow or agent runs exceed Codex's 60-second default per tool call, and the config includes the timeout setting. Codex can also sign in with OAuth instead of a key. |
| Clients that only speak stdio | The stdio bridge config, which bridges to the MCP server with mcp-remote. Requires Node 18 or later. |
{
"mcpServers": {
"intuidy": {
"url": "<mcp-url>",
"headers": {
"Authorization": "Bearer <your-aipi-key>"
}
}
}
}<mcp-url> is the MCP URL shown on the key's connect screen. The config copied from the connect screen is the exact form for your key.
Connect Claude by signing in
Claude Desktop and claude.ai connect without a key: you add the MCP URL as a custom connector and sign in.
- In Claude, go to Customize → Connectors → Add custom connector.
- Enter the MCP URL from a key's connect screen.
- Set Authentication to Always required.
- Set OAuth client to Use Anthropic's hosted client metadata.
- Select Add.
- Select Connect.
- On the Intuidy screen, choose Use an existing key or Choose permissions.
- Under Access level, choose Just me or Whole company.
- Select Connect.
The page tells you to return to the application that opened it, and the window can be closed. The connection appears in Settings → AIPI Keys as granted by signing in from an MCP client. Select Revoke there to disconnect it.
| Option | Effect |
|---|---|
| Use an existing key | The app gets that key's access, not the key. The app is listed under Connected apps on that key, with Disconnect this app. |
| Choose permissions | Grants exactly what you select, for this app only. |
| Just me | Only your own workflows and assets. |
| Whole company | Everything in the organization. Requires admin permissions. |
When an app receives its sign-in code on an address on your own computer, the Intuidy screen says so. Continue only if you started the connection yourself.
Use a key instead of signing in
This needs request-header authentication on your Claude plan.
- In Add custom connector, set Authentication to None.
- Under Request headers, choose authorization.
- Enter
Bearer <your-aipi-key>. - Select Add.
Authentication settings can't be edited after you add the connector. To change them, remove the connector and add it again.
Install the Claude Desktop extension
The desktop extension connects Claude Desktop to the MCP server with a key.
- On the key's connect screen, go to Claude Desktop extension.
- Download the extension file.
- Open the file with Claude Desktop.
- Enter the key in AIPI key when the extension asks.
Leave the MCP URL setting as it is.
Copy a ready request for a workflow or agent
The connect screen generates a request for one of your workflows or agents.
- Open the key's connect screen and go to Call it.
- Choose a workflow from Pick a workflow…. For an agent, select Agent run and choose from Pick an agent….
- Select Copy.
- Replace the placeholder with the secret you saved when you created the key.
A key with no API or MCP scopes has nothing to call, and the screen says so.
Run a workflow from an AI assistant
The key needs Execute Workflows. The assistant calls these MCP tools in order:
- Describe Workflow Inputs (Form Contract), to read the inputs the workflow expects.
stage_workflow_upload, only when an input is a file.execute_workflow, to start the run.
Other common tasks over MCP:
| Task | Tools | Scope on the key |
|---|---|---|
| Run an agent and wait for the answer | run_agent | Run Agents & Teams |
| Start an agent job without waiting, then check it | create_agent_job, then Get Agent Job Status | Run Agents & Teams |
| Run a scheduled agent job immediately | run_agent_job_now | Run Agents & Teams |
| Run an agent team | run_agent_team | Run Agents & Teams |
| Run read-only SQL on a managed database | list_database_tables, query_managed_db, check_database_health | Read Managed Databases (list, tables, health, SELECT) |
| Write to a managed database with SQL | execute_managed_db_write | Write to Managed Databases (rows and table DDL) |
| Read and edit notebooks | list_notebooks, get_notebook, update_notebook_cells | Read Notebooks, Create / Edit / Delete Notebooks |
| Search the knowledge base | search_knowledge_base, get_knowledge_base_article | Search the Knowledge Base |
| Read data objects and glossary terms | list_ontology_objects, describe_ontology_object, search_business_glossary | Read Objects & Glossary |
Export skills to your own agent
Skills you build in Intuidy export as standard Agent Skills bundles.
- Download the bundle with the export request in your key's setup prompt.
- Unzip it into your agent's skills folder:
unzip -o <skills-bundle>.zip -d ~/.claude/skills<skills-bundle> is the name of the downloaded file. Each folder holds a SKILL.md that any runtime that reads SKILL.md can use. Over MCP, get_skill returns the same document live, so it is always current.
Check and change what a key can reach
The MCP tool list is filtered per key. A missing tool means a missing scope, not a missing capability.
- In the MCP client, call
get_key_info. It returns the key's scopes and the capabilities hidden from it. - Go to Settings → AIPI Keys.
- On the key, select Edit name, scopes & expiry.
- Select the scope named for the hidden capability.
- Select Save changes.
- Reconnect the MCP client.
The secret doesn't change, so anything that already holds the key keeps working. The tool list is fixed when a client connects, which is why the client reconnects to see added or changed tools. To check without a client, open the key's connect screen and read What this key can do.
To remove an expiry, clear the date in Expires (optional). To stop a key, select Revoke this key.
Troubleshooting
- A tool is missing in your MCP client. The key lacks the scope. Follow Check and change what a key can reach. The blanket scopes under MCP (AI assistants) don't cover connected services, data rule changes, users or approvals.
Unauthorized: Missing or invalid Bearer token. The MCP server didn't receive a validAuthorization: Bearerheader. Check the header in the client config, and check that the key's status in Settings → AIPI Keys is Active, not Revoked or Expired.- A Codex tool call times out. Long workflow or agent runs exceed Codex's 60-second default per tool call. Use the timeout setting from the Codex config.
- The Claude Desktop extension reports that the key is not set. Open the extension's settings in Claude Desktop and enter an AIPI key.
- "This connection request can't be completed". Nothing was connected. Close the window and start the connection again from the app that opened it.
- "The app did not open" after you select Connect. The app may no longer be listening for the sign-in. Start the connection again from the app, or close the window.
↳ MCP server ↳ Authentication ↳ Errors, pagination and limits