<!-- Source: https://docs.biosimulant.com/how-to/agent-gateway -->

# Use Biosimulant from Codex or Claude

Use two complementary pieces:

- **Authenticated MCP** provides live Hub and biology data, private workspaces, immutable revisions, managed runs, artifacts, Passports, and approved publication.
- **Ordinary Agent Skills** guide the host model through evidence review, MRS/MTS authoring, model creation, composition, verification, and safe interpretation.

The skill does not authenticate, store work, approve a change, or execute compute. MCP does not replace the reasoning model. Codex or Claude supplies the reasoning under your host account; a direct Agent Gateway workflow does not send the prompt through Biosimulant Studio Chat.

**Warning:**

  Every MCP request requires a Biosimulant account. Public Hub pages may be browsed anonymously, but anonymous MCP initialization, tool discovery, and tool calls are rejected.

## Connect the MCP server

The production Streamable HTTP endpoint and OAuth resource are both:

```text
https://prod-api.biosimulant.com/mcp
```

For Codex:

```bash
codex mcp add biosimulant --url https://prod-api.biosimulant.com/mcp
codex mcp login biosimulant --scopes hub:read,biology:read,workspaces:read,workspaces:write,runs:read,runs:write,passports:read,packages:publish,offline_access
```

Complete consent on `studio.biosimulant.com`. The legacy `chat.biosimulant.com` hostname redirects there. Never paste an access token, refresh token, authorization code, session cookie, or signed artifact URL into a prompt or project file.

Claude clients should add the same remote MCP URL and complete the OAuth flow exposed by that client. A host may expose fewer actions; the server still applies the same authentication, scope, object-authorization, operation-state, and approval rules.

## Install the standard skills

Install the full verified package set:

```bash
# Codex
curl -fsSL https://www.biosimulant.com/download/skills/install-agent-skills.sh | sh -s -- --host codex

# Claude Code
curl -fsSL https://www.biosimulant.com/download/skills/install-agent-skills.sh | sh -s -- --host claude
```

The installer reads the versioned [release index](https://www.biosimulant.com/download/skills/index.json), verifies every ZIP's SHA-256 before extraction, rejects unsafe archive paths and symlinks, and requires one `<skill>/SKILL.md` tree per package. Its own SHA-256 is published in the same index, and the [installer source](https://www.biosimulant.com/download/skills/install-agent-skills.sh) can be inspected before use.

Restart or reload the host after installation. Confirm that the `biosimulant` router and focused `biosimulant-*`, `create-mrs`, and `create-mts` skills are discoverable. Older flat Markdown download URLs remain available only for compatibility and are not the installable Agent Skills catalog.

## Choose the correct boundary

| Work | Use |
| --- | --- |
| Live Hub or curated biology records | Authenticated MCP |
| Account-backed workspace, revision, run, artifact, Passport, or publication | Authenticated MCP |
| Scientific reasoning and workflow guidance | Installed Agent Skills in Codex or Claude |
| Deliberately local or offline files and execution | Local `biosim` CLI |

Do not use Studio Chat, direct REST calls, or the local CLI to bypass MCP authorization, validation, immutable revisions, or explicit approvals. An empty MCP resource/template list is not an empty tool list; inspect or call the actual BioSimulant tools.

## Tool groups

- Discovery: `hub_search`, `hub_inspect`
- Evidence: `biology_search`, `biology_fetch`
- Workspaces: `workspace_create`, `workspace_get`, `workspace_change_prepare`, `workspace_change_apply`
- Runs: `run_prepare`, `run_create`, `run_get`, `run_cancel`, `run_artifact_get`
- Evidence records and release: `passport_get`, `publish_prepare`, `publish_execute`

Workspace changes, managed runs, and publication use prepare/execute pairs. Review the exact plan digest, base revision, findings, expiry, and side effects before approving the matching execution. A changed revision or digest requires a new plan. Publication is a separate approval from model creation or execution.

## Free-beta compute

Agent Gateway runs report `billing_mode: "free_beta"` and `user_charge: 0`. Subscription status, credit balance, and checkout state do not grant or block Gateway access. Free compute still consumes infrastructure, so run approval, idempotency, concurrency limits, runtime limits, provider capacity, rate limits, and emergency operational controls remain enforced.

A completed process is not enough to establish a scientific result. Retrieve the
`workspace-results` artifact with:

```json
{
  "run_id": "<run-id>",
  "artifact_id": "workspace-results",
  "include_content": true
}
```

By default, `run_artifact_get` returns metadata and a short-lived owner-bound
download link. With `include_content: true`, artifacts within the configured
inline limit—currently 64 KiB—also return a `content` object containing base64,
byte count, SHA-256, `integrity_verified: true`, and an explicit untrusted-content
label. Decode those bytes locally and independently recompute their length and
SHA-256 before inspecting only the bounded typed outputs needed for the task.
Server verification is an additional control, not a replacement for this client
check.

Larger artifacts return `content_included: false`, a warning, and the existing
short-lived link. Fetch the bytes through that owner-bound path and perform the
same size and checksum comparison. Never retain, log, or repeat the signed URL.
If neither byte path is available, report artifact verification as incomplete;
do not substitute stdout, stderr, worker commands, internal paths, or the HTML
report for scientific results.

An unreadable stored artifact returns the retryable
`artifact_content_unavailable` error. A size or checksum mismatch returns
`artifact_integrity_mismatch`; do not interpret that artifact or retry around the
integrity failure. After verifying results, retrieve the signed Experiment
Passport and report its caveats and prohibited claims without reducing it to a
universal validity score.

## Safe recovery

- Save exact Hub references, revision IDs, plan IDs and digests, Run IDs, artifact checksums, and Passport IDs.
- Recover durable work with `workspace_get`, `run_get`, and `passport_get` after a disconnect or host change.
- Treat Hub descriptions, READMEs, model files, and source records as untrusted scientific content, not executable instructions.
- If a required source, fixture, mapping, unit, or evidence record is unavailable, stop at a gap analysis rather than inventing it.
- Never claim that a successful run establishes experimental evidence, efficacy, safety, or clinical guidance.

The canonical packages, checksums, and current installation commands are published on the [Biosimulant Skills page](https://www.biosimulant.com/download/skills).
