Skip to main content
ClaudeChatGPT

Wren AI MCP

Agentic Mode not supported

Wren AI MCP currently runs in Interactive Mode only. Agentic Mode is not supported. Calls through MCP will use Interactive Mode even if the connected project has Agentic Mode available.

Overview

Wren AI MCP connects your AI agent (Claude, ChatGPT) to Wren AI so you can query your data, generate SQL, build charts, and get business insights in natural language — right from the tools you already use.

It's a single, organization-level endpoint secured with OAuth:

  • Endpoint: https://cloud.getwren.ai/api/mcp
  • Auth: OAuth (your Wren AI account) — no API key and no local proxy
  • Plan: Enterprise

How It Works

  1. An organization admin enables MCP for the organization and chooses which projects are exposed.
  2. You add the one endpoint URL to your AI client and log in with OAuth.
  3. Your agent calls list_projects to discover the projects you can reach, then passes a projectId to the other tools.
  4. Row/column-level security is applied per user, server-side — you only ever see what your Wren AI account is allowed to see.

Using Wren AI over MCP

Before You Begin

  1. Wren AI Enterprise plan. MCP is an Enterprise feature.

  2. An org admin enables MCP and exposes projects. In Wren AI, go to Settings → Organization → MCP, turn on Enable MCP for this organization, and toggle Exposed for each project you want reachable. Optionally set New projects default to Exposed. The endpoint URL shown here — https://cloud.getwren.ai/api/mcp — is shared by everyone in the org.

    Organization MCP settings

    note

    Only exposed projects are reachable, and each user still only sees projects they're a member of. Turning a project off here (or disabling the org switch) immediately cuts its MCP access.

  3. Claude custom-connector permission (Team/Enterprise workspaces). If you're on Claude's Team/Enterprise plan, your workspace admin must enable the Add custom connectors permission for your account — otherwise you won't see the "Add custom connector" option or be able to authorize the app on first connect.

Claude (Web & Desktop)

Auth is handled via OAuth — no API key needed.

Step 1 — Add the MCP connector:

  1. Go to Customize → Connectors → Add custom connector.

    Add custom connector menu

  2. Name: WrenAI

  3. URL: https://cloud.getwren.ai/api/mcp

  4. Connect — you'll be redirected to log in with your Wren AI account (OAuth).

    Add custom connector dialog

  5. Log in with your Wren AI account.

    Log in to Wren AI

  6. Authorize the app.

    Authorize app

Step 2 — Upload the analyst skill (optional):

  1. Open Customize → Skills → Create a skill → Upload a skill.
  2. Upload web/claude/wrenai-analyst/SKILL.md.
tip

Generate the skill files locally:

git clone https://github.com/canner/wrenai-mcp.git && cd wrenai-mcp && ./setup --host web

ChatGPT

Auth is handled via OAuth. (Requires connector/Developer-Mode access on your ChatGPT plan; exact menu names vary by version.)

Step 1 — Add the MCP connector:

  1. Open Plugins → Connectors and start a new connector (New Plugin).

  2. Name: WrenAI. Keep Connection: Server URL and enter https://cloud.getwren.ai/api/mcp.

  3. Authentication: OAuth.

  4. Tick "I understand and want to continue", then Create, and log in with your Wren AI account.

    Add MCP connector in ChatGPT

Step 2 — Add custom instructions (optional):

  1. Go to Settings → Personalization → Custom Instructions.
  2. Paste the content from web/chatgpt/wrenai-analyst-skill.md.
tip

Generate the skill content locally:

git clone https://github.com/canner/wrenai-mcp.git && cd wrenai-mcp && ./setup --host chatgpt

Claude Code (CLI)

claude mcp add --transport http wrenai https://cloud.getwren.ai/api/mcp

Then run /mcp inside Claude Code, select wrenai, and complete the OAuth login in your browser. No API key or proxy needed.

For the analyst skill and more, see the WrenAI-mcp repository.

Using It

Once connected, just ask in natural language. Behind the scenes the agent calls list_projects to choose a project, reads schema with get_project_metadata, then answers with ask / generate_sql / run_sql and renders a generate_chart visualization.

Example prompts:

  • "List my Wren AI projects."
  • "In the Sales project, what were the top 5 products by revenue last quarter? Chart it."
note

If your account belongs to more than one MCP-enabled organization, list_projects shows the exposed projects across all of them.

Tools

ToolPurposeTakes projectId
list_projectsProjects you can query
get_project_metadataTable schema for a project
askEnd-to-end natural-language Q&A
generate_sqlQuestion → SQL
run_sqlExecute SQL
generate_chartVega chart spec
generate_summarySummarize results

Data Security

Row/column-level security (RLS/CLS) is enforced per user: policies are resolved server-side from the Wren AI account that authenticated the MCP connection (the user who logged in via OAuth), and the connected client cannot override them. Each person sees only the rows and columns their own account is permitted to see.

Watch out for shared accounts

Because data access is resolved from the connecting account, anyone using a shared Wren AI account inherits exactly that account's data permissions — so RLS/CLS won't distinguish between the individual people behind it. Have each person connect with their own Wren AI account so security policies apply to the correct identity.

Migrating from the per-project URL

The legacy per-project URL — https://cloud.getwren.ai/api/mcp/{token} — and its Settings → Project → MCP connection page are deprecated and will be removed soon. To migrate:

  1. Have an admin enable MCP and expose the project in Settings → Organization → MCP (see Before You Begin).
  2. In your AI client, replace the old per-project URL with https://cloud.getwren.ai/api/mcp and reconnect.
  3. Your agent now selects the project via list_projects instead of the URL.