# Install SketricGen for an agent

When the user asks to install or connect SketricGen, perform setup for the actual host. Preserve other connectors and settings. This guide is public and requires no repository access.

| Host | Setup | Guide |
| --- | --- | --- |
| Codex | CLI bridge with browser sign-in, or native remote OAuth | [CLI](https://www.sketricgen.ai/cli.md), [native Codex](https://www.sketricgen.ai/mcp.md#codex) |
| Claude Code | CLI bridge with browser sign-in, or native remote OAuth | [CLI](https://www.sketricgen.ai/cli.md), [native Claude Code](https://www.sketricgen.ai/mcp.md#claude-code) |
| Claude | Claude connector directory with OAuth; custom connector as fallback | [Claude](https://www.sketricgen.ai/mcp.md#claude), [directory listing](https://claude.ai/directory/sketricgen) |
| ChatGPT | Remote app with OAuth | [ChatGPT](https://www.sketricgen.ai/mcp.md#chatgpt) |
| Cursor | Remote MCP with OAuth | [Cursor](https://www.sketricgen.ai/mcp.md#cursor) |
| Other agents | Streamable HTTP with OAuth, or local stdio | [MCP](https://www.sketricgen.ai/mcp.md) |

## Local Codex and Claude Code

Check the installed host's help and whether SketricGen is already configured. Never silently replace an existing entry. Prefer the CLI. Install a stable global copy of `@sketric/sketricgen-mcp`, never a similarly named package, and connect the actual host:

```bash
npm install -g @sketric/sketricgen-mcp
sketricgen connect --agent codex
```

For Claude Code, use `sketricgen connect --agent claude-code`. Do not configure both hosts unless requested. If npm cannot install the package, use [native remote OAuth](https://www.sketricgen.ai/mcp.md) instead. `connect` adds only SketricGen, opens sign-in, waits for the localhost callback, saves credentials using the OS store, initializes MCP, discovers tools, and calls `whoami` and `list_agents`.

Let the user sign in, choose one or more projects, and approve access in their browser. Keep the command running while waiting for the callback. If browser opening fails, show the printed sign-in link. The browser and CLI must run on the same computer. Never request or paste tokens into chat.

If the OS credential store is unavailable, explain the error. `--credential-store file` is an explicit choice for a private computer. Never switch to it silently. See [storage and troubleshooting](https://www.sketricgen.ai/cli.md).

## Verification

Report these results separately:

1. Connector configuration succeeded.
2. Browser sign-in and project consent succeeded.
3. MCP initialized and tools were discovered.
4. `whoami` and `list_agents` succeeded without mutations. An empty agent list is valid.

`sketricgen doctor` performs the protocol and read-only checks and reports the tool count. `auth status` checks only local credentials. Reload the agent session to load newly configured tools. Say when the current session cannot expose them until reload.

Do not create, update, delete, publish, or run agents to test installation. Configuration or a successful npm install is not live verification.

## Hosted assistants

For Claude, connect SketricGen from Claude's connector directory at https://claude.ai/directory/sketricgen, or search for SketricGen under Customize, then Connectors. Add a custom connector only if the workspace blocks directory connectors.

For other hosted assistants, use `https://mcp.sketricgen.ai/mcp` with OAuth and follow the host guide above. Leave client ID and secret blank for clients supporting dynamic registration. Claude is the only connector directory listing; do not imply another host lists SketricGen.

If the session cannot access the user's browser or host settings, give the exact next step and say what remains. Finish available setup and read-only checks within the requested scope.

## Using the connection

Call `whoami` to establish the Teamspace and projects before changing resources. Follow live tool schemas and server instructions. Consent is scoped to the projects the user selected, up to 50 in one Teamspace; live membership and role still determine permissions. If `whoami` returns `project_choice_required: true`, ask the user which project to use and pass its `project_id` to create calls. Sign in again to change the selected projects.

OAuth on Free supports Brand Agent creation and management, knowledge bases, connectors, and `whoami`, so installation checks work on every plan. Conversation, usage, and project tools require Explorer or higher and return `mcp_tool_not_in_plan` on Free.

API keys with **Manage resources** access remain supported for automation. Run agents-only keys cannot use MCP. Supply keys through a secure host credential or environment-variable mechanism. Never write a secret into project config or request it in chat.

Discovery: [interactive setup](https://www.sketricgen.ai/mcp), [CLI](https://www.sketricgen.ai/cli.md), [MCP reference](https://www.sketricgen.ai/mcp.md), [agent guidance](https://www.sketricgen.ai/agents.md), [llms.txt](https://www.sketricgen.ai/llms.txt).
