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.

Updated in Intuidy 2026.11.1810 min read

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

Store the secret in an environment variable so requests and client configs can read it:

bash
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

  1. Go to Settings → AIPI Keys.
  2. Select Create key.
  3. 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.
  4. Under Access level, choose Just me or Whole company.
  5. Select only the scopes the job needs.
  6. Optionally, enter a date in Expires (optional).
  7. Select Create key.
  8. On the connect screen that opens, select Copy key and store the secret.

The key appears in Settings → AIPI Keys with the status Active.

OptionEffect
Just meOnly your own workflows and notebooks.
Whole companyEverything in the organization.
Grant standard accessSelects every standard scope family. Connected services, data rule changes, users and approvals are not included; select each by name.
Clear allClears every scope.
Allow reading items marked sensitiveLets the key read items marked sensitive.
Allow writing to items marked sensitiveLets the key write to items marked sensitive.
Scope groupWhat it covers
REST APIScopes 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 servicesYour 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:

JobSelect
Another system runs your workflowsExecute Workflows
An assistant reads notebooks and nothing elseRead Notebooks
An assistant runs read-only SQL on managed databasesRead Managed Databases (list, tables, health, SELECT)
An assistant lists and runs agentsRead Agents, Teams & Skills and Run Agents & Teams

Connect an MCP client with the setup prompt

  1. Open the key's connect screen.
  2. Select Copy setup prompt.
  3. 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.

ClientUse
Cursor, Windsurf, VS Code, and other clients that take a server block with headersThe JSON server block below.
CodexThe 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 stdioThe stdio bridge config, which bridges to the MCP server with mcp-remote. Requires Node 18 or later.
json
{
  "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.

  1. In Claude, go to Customize → Connectors → Add custom connector.
  2. Enter the MCP URL from a key's connect screen.
  3. Set Authentication to Always required.
  4. Set OAuth client to Use Anthropic's hosted client metadata.
  5. Select Add.
  6. Select Connect.
  7. On the Intuidy screen, choose Use an existing key or Choose permissions.
  8. Under Access level, choose Just me or Whole company.
  9. 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.

OptionEffect
Use an existing keyThe app gets that key's access, not the key. The app is listed under Connected apps on that key, with Disconnect this app.
Choose permissionsGrants exactly what you select, for this app only.
Just meOnly your own workflows and assets.
Whole companyEverything in the organization. Requires admin permissions.
Note

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.

  1. In Add custom connector, set Authentication to None.
  2. Under Request headers, choose authorization.
  3. Enter Bearer <your-aipi-key>.
  4. 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.

  1. On the key's connect screen, go to Claude Desktop extension.
  2. Download the extension file.
  3. Open the file with Claude Desktop.
  4. 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.

  1. Open the key's connect screen and go to Call it.
  2. Choose a workflow from Pick a workflow…. For an agent, select Agent run and choose from Pick an agent….
  3. Select Copy.
  4. 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:

  1. Describe Workflow Inputs (Form Contract), to read the inputs the workflow expects.
  2. stage_workflow_upload, only when an input is a file.
  3. execute_workflow, to start the run.

Other common tasks over MCP:

TaskToolsScope on the key
Run an agent and wait for the answerrun_agentRun Agents & Teams
Start an agent job without waiting, then check itcreate_agent_job, then Get Agent Job StatusRun Agents & Teams
Run a scheduled agent job immediatelyrun_agent_job_nowRun Agents & Teams
Run an agent teamrun_agent_teamRun Agents & Teams
Run read-only SQL on a managed databaselist_database_tables, query_managed_db, check_database_healthRead Managed Databases (list, tables, health, SELECT)
Write to a managed database with SQLexecute_managed_db_writeWrite to Managed Databases (rows and table DDL)
Read and edit notebookslist_notebooks, get_notebook, update_notebook_cellsRead Notebooks, Create / Edit / Delete Notebooks
Search the knowledge basesearch_knowledge_base, get_knowledge_base_articleSearch the Knowledge Base
Read data objects and glossary termslist_ontology_objects, describe_ontology_object, search_business_glossaryRead Objects & Glossary

Export skills to your own agent

Skills you build in Intuidy export as standard Agent Skills bundles.

  1. Download the bundle with the export request in your key's setup prompt.
  2. Unzip it into your agent's skills folder:
bash
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.

  1. In the MCP client, call get_key_info. It returns the key's scopes and the capabilities hidden from it.
  2. Go to Settings → AIPI Keys.
  3. On the key, select Edit name, scopes & expiry.
  4. Select the scope named for the hidden capability.
  5. Select Save changes.
  6. 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

↳ MCP server ↳ Authentication ↳ Errors, pagination and limits