# Connect through MCP

For hosted Retainer, open your workspace and paste its setup prompt into your agent. You can also add the hosted MCP server manually.



**Codex**

```sh
codex mcp add retainer --url https://retainer.tamloot.cc/mcp
```

If Codex still needs authorization, run `codex mcp login retainer`.




**Claude Code**

```sh
claude mcp add --transport http --scope user retainer https://retainer.tamloot.cc/mcp
```

If Claude Code needs authorization, use `/mcp` and choose **Retainer → Authenticate**.



Complete browser consent for the intended workspace. For self-hosting, use your own server's `/mcp` URL and see the [connection options](/docs/mcp/connection-options/) for API keys, OAuth, and stdio.

## Confirm it works

Ask the agent:

```text
Call Retainer's describe_schema tool. Tell me the workspace name and ID,
whether its schema is initialized, and which objects I can query.
```

If it reports a different workspace, reconnect before writing. If the schema is empty, ask the agent to follow the `discover_schema` guide with you.


- [Read and write a first record](/docs/mcp/first-workflow/)


- [Browse tools](/docs/mcp/tool-reference/)

