# Install and Connect to a Workspace

URL: https://docs.clinia.com/studio/install-and-connect

> Clone the open-source Context Engine Studio, point it at your workspace, and run it locally.

By the end of this page, [the Context Engine Studio](https://docs.clinia.com/studio/what-studio-is) runs at `http://localhost:3000` against your workspace.

## Prerequisites [#prerequisites]

You need four things before you start:

- A workspace with OAuth credentials that have Read & Write access. See [Provision Your First Workspace](https://docs.clinia.com/docs/platform/get-started) and [Authentication and Credentials](https://docs.clinia.com/docs/platform/authentication-and-credentials).
- Node.js 20.9 or later, which Next.js 16 requires. The repository's `.nvmrc` pins Node 26.
- pnpm 10 or later. Running `corepack enable` installs the exact version the repository pins.
- An [Anthropic API key](https://console.anthropic.com/) with access to `claude-opus-4-8`. The studio does not start without one, even if you never open the chat.

## Steps [#steps]

<Steps>
<Step>

### Clone the repository [#clone-the-repository]

```bash
git clone https://github.com/clinia/context-engine-studio.git
cd context-engine-studio
```

</Step>
<Step>

### Configure the connection to your workspace [#configure-the-connection-to-your-workspace]

Copy `.env.example` to `.env.local` and fill in the four required values. The example file already lists each of them with a comment.

```bash
cp .env.example .env.local
```

| Variable                                    | What to put                                                                      |
| ------------------------------------------- | -------------------------------------------------------------------------------- |
| `CLINIA_CONTEXT_ENGINE_API_URL`             | Your workspace's base URL, `https://<workspace-id>.w.clinia.cloud`.              |
| `CLINIA_CONTEXT_ENGINE_OAUTH_CLIENT_ID`     | The client ID of your credential.                                                |
| `CLINIA_CONTEXT_ENGINE_OAUTH_CLIENT_SECRET` | The client secret, which the Console shows once, when you create the credential. |
| `ANTHROPIC_API_KEY`                         | Your Anthropic API key.                                                          |

</Step>
<Step>

### Install and start [#install-and-start]

```bash
pnpm install
pnpm dev
```

</Step>
<Step>

### Open the studio [#open-the-studio]

Open [http://localhost:3000](http://localhost:3000). An empty workspace opens on the **Add your first patient** screen. A workspace that already has patients opens on the first of them.

</Step>
</Steps>

## When the studio does not start [#when-the-studio-does-not-start]

Three configuration mistakes cause most of the problems at this stage:

- A missing client ID or secret stops the studio at startup, with an error that names both variables.
- Read-only credentials let the studio start and browse, then fail when you create a patient or ingest a record.
- `CLINIA_CONTEXT_ENGINE_API_URL` is the workspace's base URL, without `/v1` or `/mcp`. The studio adds `/mcp` itself to reach the MCP server the chat assistant uses.

## Next steps [#next-steps]

- [Explore a Patient](https://docs.clinia.com/studio/explore-a-patient) to ingest the synthetic dataset and walk through what the studio shows.
- [Authentication and Credentials](https://docs.clinia.com/docs/platform/authentication-and-credentials) to rotate or replace the credential the studio uses.
