> **Building with AI coding agents?** Install the authstack plugin with one command. This equips your agent with accurate Scalekit implementation patterns.
>
> **Recommended** (the `-y` flags skip prompts, so the command runs without an interactive terminal):
> ```bash
> npx -y @scalekit-inc/cli setup -y
> ```
>
> Global:
> ```bash
> npm install -g @scalekit-inc/cli
> scalekit setup -y
> ```
>
> Supports Claude Code, Cursor, GitHub Copilot, Codex + skills for other Agent Skills-compatible agents in `~/.agents/skills`.
> Skills: integrate-agentkit, implement-saaskit, add-mcp-oauth, implement-sso, implement-scim.
> [Full setup guide](https://docs.scalekit.com/dev-kit/build-with-ai/)

---

# Connect AI agents to the Biomni MCP server

The Biomni MCP connector routes your AI agent's tool calls to Biomni's own MCP server through Scalekit. Each user signs in to Biomni once, and Scalekit stores and refreshes their tokens, so your agent never handles credentials. It comes with 12 tools.

**Authentication:** OAuth2.1/DCR
**Categories:** Analytics, Search
**Tools:** 12: 6 read, 6 write, 0 destructive
**Users sign in with:** OAuth
**OAuth app:** Scalekit's or your own
**Built by:** Vendor MCP
**Try it:** [Playground in the Scalekit dashboard](https://app.scalekit.com/ws/signup?sk_intent=playground&provider=BIOMNIMCP)

## Setup

1. ### Install the SDK

   **Node.js**

   ```bash
   npm install @scalekit-sdk/node dotenv
   ```

   **Python**

   ```bash
   pip install scalekit-sdk-python python-dotenv
   ```

2. ### Set your credentials

   Add your Scalekit credentials to your `.env` file. Find values in **[app.scalekit.com](https://app.scalekit.com)** > **Developers** > **API Credentials**.

   ```sh title=".env"
   SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
   SCALEKIT_CLIENT_ID=<your-client-id>
   SCALEKIT_CLIENT_SECRET=<your-client-secret>
   ```

3. ### Create the Biomni MCP connection

   In **AgentKit > Connections**, create a Biomni MCP connection. The name you give it is the `connection_name` your code passes. See [Configure connections](/agentkit/connections/).

   Scalekit credentials are available for Biomni MCP server, so you don't need to register an OAuth app.

4. ### Authorize a user and make your first call

   **Node.js** (`quickstart.mts`)

   ```typescript
   import { ScalekitClient } from '@scalekit-sdk/node'
   import 'dotenv/config'
   import { createInterface } from 'node:readline/promises'

   const scalekit = new ScalekitClient(
     process.env.SCALEKIT_ENVIRONMENT_URL,
     process.env.SCALEKIT_CLIENT_ID,
     process.env.SCALEKIT_CLIENT_SECRET,
   )
   const actions = scalekit.actions

   const connector = 'biomnimcp'
   const identifier = 'user_123'

   // Generate an authorization link for the user
   const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
   console.log('Authorize Biomni MCP:', link)
   const rl = createInterface({ input: process.stdin, output: process.stdout })
   await rl.question('Press Enter after authorizing...')
   rl.close()

   // Make your first call
   const result = await actions.executeTool({
     connector,
     identifier,
     toolName: 'biomnimcp_list_projects',
     toolInput: {},
   })
   console.log(result)
   ```

   ```bash
   npx tsx quickstart.mts
   ```

   **Python** (`quickstart.py`)

   ```python
   import os
   from scalekit import ScalekitClient
   from dotenv import load_dotenv
   load_dotenv()

   scalekit_client = ScalekitClient(
       env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),
       client_id=os.getenv("SCALEKIT_CLIENT_ID"),
       client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),
   )
   actions = scalekit_client.actions

   connection_name = "biomnimcp"
   identifier = "user_123"

   # Generate an authorization link for the user
   link_response = actions.get_authorization_link(
       connection_name=connection_name,
       identifier=identifier,
   )
   print("Authorize Biomni MCP:", link_response.link)
   input("Press Enter after authorizing...")

   # Make your first call
   result = actions.execute_tool(
       tool_input={},
       tool_name="biomnimcp_list_projects",
       connection_name=connection_name,
       identifier=identifier,
   )
   print(result)
   ```

   ```bash
   python quickstart.py
   ```

   Each user signs in once. See [Authorize a user](/agentkit/tools/authorize/) for the full flow and statuses.

## Tools

Pass the exact name to `execute_tool`, with an input like each tool's example. To ask for a tool that's missing, use the [request form](https://scalekitsupport.portal.usepylon.com/forms/request-a-connector-tool).

**Node.js**

```typescript
const result = await actions.executeTool({
  toolName: 'biomnimcp_list_files',
  toolInput: {
    project_id: '<project_id>',
  },
  connector: 'biomnimcp',
  identifier: 'user_123',
})
```

**Python**

```python
result = actions.execute_tool(
    tool_name="biomnimcp_list_files",
    tool_input={
        "project_id": "<project_id>",
    },
    connection_name="biomnimcp",
    identifier="user_123",
)
```

`result.data` is the app's response as JSON, and `result.execution_id` (`executionId` in Node.js) is the ID of the call.

### `biomnimcp_list_files`

List Files · Read-only

List the input files already uploaded to a project. Returns the files a user added through the Biomni web app's project files panel (or earlier via upload_file) — the same files the agent can read during any task in that project. This is how you discover the file_id of an already-uploaded file: files are NOT attached to a task automatically, so pass the returned file_id values in the file_ids argument of start_new_task or send_message to attach them. Only input files are listed here — result files the agent produced are listed by list_result_files(task_id) instead.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `project_id` (`string`, required): No description.
- `after_id` (`string`, optional): No description.
- `before_id` (`string`, optional): No description.
- `limit` (`integer`, optional): No description. Default: `50`.

Example input: `{"project_id":"<project_id>"}`

### `biomnimcp_list_projects`

List Projects · Read-only

List the caller's projects in the active workspace. Always call this before asking the user to pick a project, rather than asking them to type a project ID from memory. Optionally includes per-project task activity counts.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `after_id` (`string`, optional): No description.
- `before_id` (`string`, optional): No description.
- `include_activity` (`boolean`, optional): If true, fetch per-project task counts in parallel and add running_tasks_count and total_tasks_count fields. Costs N extra list_tasks calls (one per project), so defaults to false. Use when the user explicitly asks about activity or in-flight work. Default: `false`.
- `limit` (`integer`, optional): Maximum number of projects to return. Defaults to 50. Default: `50`.

Example input: `{}`

### `biomnimcp_list_result_files`

List Result Files · Read-only

List the names and metadata of output files produced by an agent task. Returns file name, size, and MIME type for each result file, but does not provide direct download links — direct the user to the Biomni web app to download files.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `task_id` (`string`, required): The task (session) whose output files to list. Obtain this from start_new_task or send_message. Values look like sess_… — treat them as opaque IDs.

Example input: `{"task_id":"<task_id>"}`

### `biomnimcp_list_tasks`

List Tasks · Read-only

List tasks in a project. Returns the tasks belonging to the specified project, up to an optional limit. Use this to discover existing tasks before continuing or reviewing work.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `project_id` (`string`, required): The project to list tasks from. Required. Values look like opaque IDs — use list_projects to find the right project_id.
- `after_id` (`string`, optional): No description.
- `before_id` (`string`, optional): No description.
- `limit` (`integer`, optional): Maximum number of tasks to return. Defaults to 20. Default: `20`.

Example input: `{"project_id":"<project_id>"}`

### `biomnimcp_list_workspaces`

List Workspaces · Read-only

List the workspaces (orgs) the caller belongs to and show which one is currently active. Use this when the user cannot find a project — it may be in another workspace. Returns a list of {id, name, type, is_active} entries plus active_workspace_id.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs: none.

Example input: `{}`

### `biomnimcp_wait_for_next_update`

Wait for Next Update · Read-only

Long-poll for the next batch of progress on the agent's current reply, returning only newly-added content blocks since the last call. Call at most ~3 times per turn to stream incremental output; if the task is still running after that, point the user to the Biomni web URL rather than polling indefinitely.

Read only: yes. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `task_id` (`string`, required): The task_id (conversation handle) returned by start_new_task or send_message. The server resolves it to the latest assistant reply automatically.
- `max_wait_seconds` (`integer`, optional): How long the server should hold the connection open waiting for new blocks. Defaults to 15. Clamped to [0, 30] by the server. Default: `15`.
- `since_block_index` (`integer`, optional): Index of the first content block to return. Pass 0 on the first call; on subsequent calls pass res["cursor"] from the previous response to receive only newly-added blocks. Default: `0`.

Example input: `{"task_id":"<task_id>"}`

### `biomnimcp_create_project`

Create Project · Write

Create a new Biomni project in the caller's current workspace. A project is a persistent container with its own file drive where tasks and uploaded files live. Only create a project when the user explicitly asks for a new one; call list_projects first to check if a suitable one already exists.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `name` (`string`, required): Human-readable project name. Required.
- `description` (`string`, optional): Optional free-text description of the project.
- `metadata` (`string`, optional): Optional arbitrary key-value pairs stored alongside the project for your own use (e.g. external system IDs).

Example input: `{"name":"<name>"}`

### `biomnimcp_request_review`

Request Scientific Review · Write

Run a Scientific Review of a completed task — same as the "Review" button in the Biomni web app. A reviewer agent re-reads the finished task and checks it for scientific accuracy, correct use of the data/materials, unsupported claims (hallucinations), and stated limitations. Only worth running on a task the agent has already completed — a review of an idle or still-running task has nothing to look at yet. The review runs as a background job and returns immediately with status "running" — it does NOT return the review itself. When it finishes, the review is shown on the task's page in the Biomni web app; point the user to the returned biomni_url to read it there. wait_for_next_update is not the way to fetch it. Calling this while a review is already running is a no-op; calling it again after one finished starts a fresh review that replaces the previous one.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `task_id` (`string`, required): The task (session) to review — the conversation handle from start_new_task / send_message.

Example input: `{"task_id":"<task_id>"}`

### `biomnimcp_send_message`

Send Message · Write

Send a user message to an existing Biomni task and trigger AI agent execution. Optionally attach uploaded files. To stream the agent's output, call wait_for_next_update a few times after this returns.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `message` (`string`, required): User message text to send to the agent.
- `task_id` (`string`, required): Target task id — get one from start_new_task. Values look like sess_…; treat them as opaque ids.
- `file_ids` (`string`, optional): Optional list of input file ids to attach to this message. Pass file_id values returned by upload_file.
- `project_id` (`string`, optional): Optional project id — used to build the returned biomni_url deep link if the adapter response doesn't already carry one. Omit if you don't need a clickable link; the API call itself does not need it.

Example input: `{"message":"<message>","task_id":"<task_id>"}`

### `biomnimcp_start_new_task`

Start New Task · Write

Auto-create a Biomni task in a project and send the first message in a single call, triggering AI agent execution. Returns both a task_id (for follow-up send_message / wait_for_next_update calls) and a message_id for the agent's first reply. If files were uploaded with upload_file, their file_ids must be passed here explicitly — they are not auto-attached.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `message` (`string`, required): User message text to send as the first message of the new task.
- `project_id` (`string`, required): The project to start the conversation in. Required.
- `auto_mode` (`boolean`, optional): Run the task in Auto mode (default False). In Auto mode the agent never pauses to ask the user mid-run: the interaction gates it would normally block on — clarifying questions, plan approval, and Skill-load confirmations — resolve automatically so the task goes from start to finish unattended. Set True when the user wants a hands-off / autonomous run, or is not available to answer follow-ups. Auto mode only skips these user-input gates — it does not change auth, billing, or safety. Default: `false`.
- `file_ids` (`string`, optional): Optional list of input file ids to attach. Pass the file_id values returned by upload_file here so the agent can see those files — they are not attached automatically.
- `model` (`string`, optional): Optional model tier for the new task — 'standard', 'fast', or 'max' (Max mode, the highest-capability model). Omit to use the account default (standard). Pass 'max' only when the user asked for the strongest model / Max mode.
- `task_name` (`string`, optional): Optional human-readable name for the new task. When set, it is used verbatim as the task title and bypasses the automatic naming from the first message. Omit to let Biomni auto-generate a title from message.

Example input: `{"message":"<message>","project_id":"<project_id>"}`

### `biomnimcp_switch_workspace`

Switch Workspace · Write

Switch the caller's active workspace so that subsequent calls (list_projects, create_project, task operations) act in the new workspace. Get workspace ids from list_workspaces. Note: switching only takes effect on OAuth-connected sessions; static API-key connections are bound to a single workspace and cannot switch.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `workspace_id` (`string`, required): The workspace (org) id to switch to — obtain from list_workspaces.

Example input: `{"workspace_id":"<workspace_id>"}`

### `biomnimcp_upload_file`

Upload File · Write

Upload a small text file (VCF, CSV, TSV, JSON, or code) to a project's drive by passing its content inline as a UTF-8 string. Returns a file_id that can be passed to start_new_task or send_message so the agent treats the file as explicit input. Hard cap of 25 MB on inline content.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `content` (`string`, required): File content as a UTF-8 string. Multi-line is fine. Hard cap of 25 MB.
- `filename` (`string`, required): Name the file will appear under in the project drive (e.g. variants.vcf).
- `project_id` (`string`, required): Target project id — use list_projects to find it.
- `mime_type` (`string`, optional): Optional MIME type for the file. Common values: text/csv, application/json, text/tab-separated-values, application/x-vcard (for VCF). Defaults to text/plain. Default: `text/plain`.

Example input: `{"content":"<content>","filename":"<filename>","project_id":"<project_id>"}`

## Related

Other Analytics connectors ([all 126](/agentkit/connectors/?category=analytics)):

- [Microsoft 365](/agentkit/connectors/microsoft365/): Scalekit connector, OAuth, 317 tools
- [HubSpot](/agentkit/connectors/hubspot/): Scalekit connector, OAuth, 457 tools
- [Snowflake](/agentkit/connectors/snowflake/): Scalekit connector, OAuth, 42 tools


---

## More Scalekit documentation

| Resource | What it contains | When to use it |
|----------|-----------------|----------------|
| [/llms.txt](/llms.txt) | Structured index with routing hints per product area | Start here — find which documentation set covers your topic before loading full content |
| [/llms-full.txt](/llms-full.txt) | Complete documentation for all Scalekit products in one file | Use when you need exhaustive context across multiple products or when the topic spans several areas |
| [sitemap-0.xml](https://docs.scalekit.com/sitemap-0.xml) | Full URL list of every documentation page | Use to discover specific page URLs you can fetch for targeted, page-level answers |
