Skip to content

Get started with the MCP server

The Polars Nanook MCP server gives an AI assistant, such as Claude or Cursor, access to the query profiles in your workspaces. Ask it where a query spends its time, and it reads the profile and suggests the change most likely to help. On AWS, it can also start and stop compute for you. Before you start, install the client and sign up, and run a query so the assistant has a profile to look at.

Step 1: Add the server

The server runs at https://mcp.nanook.pola.rs/mcp.

claude mcp add --transport http nanook https://mcp.nanook.pola.rs/mcp

Run /mcp in Claude Code and select nanook to sign in.

Open Settings > Connectors, click Add custom connector and enter https://mcp.nanook.pola.rs/mcp as the URL. Click Connect on the new connector to sign in.

Open Settings > Connectors > Advanced settings and turn on Developer mode. Back in Connectors, click Create, enter https://mcp.nanook.pola.rs/mcp as the URL and choose OAuth as the authentication. ChatGPT opens the sign-in when you create the connector.

codex mcp add nanook --url https://mcp.nanook.pola.rs/mcp
codex mcp login nanook

Add the server to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "nanook": {
      "url": "https://mcp.nanook.pola.rs/mcp"
    }
  }
}

Open Cursor Settings > MCP and click Connect next to nanook to sign in.

Add the server to .vscode/mcp.json in your project, or run MCP: Open User Configuration from the command palette to add it for every project:

{
  "servers": {
    "nanook": {
      "type": "http",
      "url": "https://mcp.nanook.pola.rs/mcp"
    }
  }
}

VS Code opens the sign-in when GitHub Copilot first starts the server.

gemini mcp add --transport http nanook https://mcp.nanook.pola.rs/mcp

Run /mcp auth nanook in Gemini CLI to sign in.

Add the server as a remote MCP server in your client's configuration, for example:

{
  "mcpServers": {
    "nanook": {
      "url": "https://mcp.nanook.pola.rs/mcp"
    }
  }
}

The client must support remote MCP servers with OAuth sign-in.

Step 2: Sign in

Your client opens Polars Nanook in the browser. Log in with your Polars Nanook account and approve the access the assistant asks for. The assistant acts as you: it sees the workspaces you are a member of and can do what your workspace role allows.

Step 3: Ask about a query

Ask a question in your own words, for example:

  • Why was my last query slow?
  • Which join in query <query_id> takes the most time?
  • Is there skew in the slowest stage of my last query?

The assistant finds the query, reads its profile and answers with where the time goes. Ask it to dig deeper for the timeline, per-worker balance, join strategy and shuffle sizes of a stage.

Available tools

Tool What it does
list_workspaces Lists the workspaces you are a member of.
list_queries Lists the queries of a workspace, newest first, with status and wall time.
analyse_query Summarizes where a query spends its time: timeline, stages, hottest operators and I/O.
get_stage Shows one stage in depth: per-worker timings, shuffle sizes and the physical plan with metrics.
get_query_plans Shows the logical plan of a query and a summary of its stages.
start_compute Starts a compute cluster in a workspace connected to AWS.
stop_compute Stops compute clusters. Queries still running on a stopped cluster fail.

Your client asks before it calls a tool, depending on its settings. start_compute starts EC2 instances in your AWS account, which you pay for until the cluster stops.

Next steps