# SketricGen MCP

Connect an AI assistant to SketricGen to inspect and manage project resources. Start with [the installer guide](https://www.sketricgen.ai/INSTALL_FOR_AGENTS.md) when asked to install the connector.

Server URL: `https://mcp.sketricgen.ai/mcp`

Transport: Streamable HTTP, JSON-RPC 2.0. The [CLI bridge](https://www.sketricgen.ai/cli.md) exposes the same tools over local stdio.

## Codex

The [CLI](https://www.sketricgen.ai/cli.md) provides one-command setup and a doctor check: `npm install -g @sketric/sketricgen-mcp && sketricgen connect --agent codex`. Native OAuth works without a bridge:

```bash
codex mcp get sketricgen --json
```

If the entry does not exist:

```bash
codex mcp add sketricgen --url https://mcp.sketricgen.ai/mcp
codex mcp login sketricgen --scopes https://mcp.sketricgen.ai/mcp/read,https://mcp.sketricgen.ai/mcp/write,offline_access
codex mcp list
```

Finish browser sign-in, select one or more projects, and approve consent. Reload Codex and verify its tools. Preserve an existing entry; inspect it before migration.

Equivalent remote configuration:

```toml
[mcp_servers.sketricgen]
url = "https://mcp.sketricgen.ai/mcp"
```

For read-only consent, omit the write scope. `offline_access` enables refresh. Do not add a client secret or an unsupported `auth` configuration field.

## Claude Code

The [CLI](https://www.sketricgen.ai/cli.md) provides one-command setup: `npm install -g @sketric/sketricgen-mcp && sketricgen connect --agent claude-code`. Native setup:

```bash
claude mcp get sketricgen
```

If the entry does not exist:

```bash
claude mcp add --scope user --transport http sketricgen https://mcp.sketricgen.ai/mcp
```

Run `/mcp` inside Claude Code, choose SketricGen, and authenticate in the browser. Select one or more projects and approve consent. Do not add bearer headers for OAuth.

## Claude

SketricGen is listed in Claude's connector directory: [Add SketricGen to Claude](https://claude.ai/directory/sketricgen). Open the listing, or open Customize, then Connectors, in Claude and search for SketricGen. Select Connect, sign in, select one or more projects, and approve access. On Team or Enterprise plans, an owner may need to allow the connector first.

If your workspace blocks directory connectors, add a custom connector instead: open Customize, then Connectors, choose Add custom connector, name it SketricGen, and paste the server URL. Leave client ID and secret blank.

## ChatGPT

Enable Developer mode when available for your plan and workspace. Create a custom app with the server URL and OAuth. Scan tools, sign in, select one or more projects, approve access, and create the app. See [OpenAI's developer mode guide](https://developers.openai.com/api/docs/guides/developer-mode).

## Cursor

Merge this entry into `~/.cursor/mcp.json` or the project's `.cursor/mcp.json`. Preserve existing servers:

```json
{
  "mcpServers": {
    "sketricgen": {
      "url": "https://mcp.sketricgen.ai/mcp"
    }
  }
}
```

Open MCP settings, authenticate in your browser, select one or more projects, and approve access. If your client version cannot complete OAuth, use the CLI bridge or a secure API-key mechanism.

## Authentication

Protected-resource metadata: `https://mcp.sketricgen.ai/.well-known/oauth-protected-resource/mcp`.
Authorization-server metadata: `https://mcp.sketricgen.ai/.well-known/oauth-authorization-server`.

The server supports dynamic public-client registration, authorization code with PKCE S256, loopback redirects, token refresh, and revocation. The resource `https://mcp.sketricgen.ai/mcp` must be supplied on authorization and token requests.

| Scope | Access |
| --- | --- |
| `https://mcp.sketricgen.ai/mcp/read` | Inspect resources |
| `https://mcp.sketricgen.ai/mcp/write` | Mutations permitted by your live project role |
| `offline_access` | Refresh the session |

Consent selects one or more projects in one Teamspace, up to 50 per connection. Access tokens last one hour. Refresh grants last up to seven days and rotate on refresh. Logout revokes the grant. Live membership and role checks still apply to each selected project. Sign in again to change the selected projects.

For automation or clients without OAuth, supply a Teamspace API key with **Manage resources** access through an environment variable or secure host credential mechanism. Run agents-only keys cannot access MCP. In Codex, use `--bearer-token-env-var SKETRICGEN_API_KEY` when adding an API-key connection. Never paste a key into chat or commit it in config.

## Tools and verification

The server currently exposes 26 tools. Discover live schemas rather than relying on a cached count. Call `whoami` to confirm the Teamspace and connected projects, then `list_agents` for a read-only check. When a connection spans several projects, `whoami` returns `project_choice_required: true` and create calls need an explicit `project_id`. Empty agent lists are valid. `sketricgen doctor` checks initialization, discovery, and both calls.

Tools cover identity and projects, agents and workflows, knowledge bases and sources, model choices, connectors and skills, widgets, and publishing. Read server instructions before making changes. Inspect resources before updates and obtain user authorization for mutations. Never publish or run agents to test a connection.

### Tool access

OAuth connections on Free can create and manage Brand Agents, maintain their knowledge bases, and connect apps within the existing plan limits. `whoami` works on every plan and includes the consented projects' identity. Conversation, usage, and project tools (`list_conversations`, `get_conversation`, `get_usage`, `list_projects`, `create_project`, `update_project`) require Explorer or higher and return `mcp_tool_not_in_plan` on Free.

On paid plans, OAuth project creation and renaming require write consent and a live Teamspace Owner or Admin role. A newly created project is outside the current connection; sign in again and select it before using its resources. API-key connections retain their paid-plan and scope requirements.

Read tools never change anything. Write tools change resources in the connected project and need a write-scoped connection. Sensitive writes delete, detach, or remove content and should be confirmed by the user every time.

| Access | Tools |
| --- | --- |
| Read | `whoami`, `list_projects`, `list_agents`, `list_brand_agent_templates`, `list_knowledge_bases`, `get_brand_agent_status`, `list_brand_connectors`, `list_connector_tools`, `check_brand_connector_connection`, `get_embed_snippet`, `list_conversations`, `get_conversation`, `get_usage`, `get_knowledge_base_refresh_status` |
| Write | `create_project`, `update_project`, `create_brand_agent`, `update_brand_agent_tool`, `update_brand_agent_config_tool`, `create_brand_connector_link`, `attach_brand_connector`, `add_knowledge_base_content` |
| Sensitive write | `refresh_knowledge_base`, `delete_brand_agent`, `delete_knowledge_base`, `detach_brand_connector` |

`create_brand_agent` crawls the website you provide, and new agent widgets are public by default. `refresh_knowledge_base` re-crawls the site and removes pages that no longer exist. `create_brand_connector_link` returns a link for you to authorize a third-party account. Connector tools read from Pipedream or Composio on your behalf.

See [the detailed reference](https://docs.sketricgen.ai/dev-guide/mcp-connect) and [interactive setup](https://www.sketricgen.ai/mcp).
