Skip to main content

Using MCP tools as an Open API

Use Polar API — via the Model Context Protocol (MCP) — as an open API, detailing available endpoints, authentication, and a quick-start workflow for generating reports and accessing dashboard data.

Kellie Reese avatar
Written by Kellie Reese
Updated over 2 weeks ago

Overview

The Polar MCP (Model Connection Protocol) can be used not only to connect Polar Analytics with AI assistants (like ChatGPT or Claude) and workflow tools (like Make or n8n), but also as an open API.

This means you can use the Polar MCP endpoint directly to query your Polar data from any environment — whether that’s your own data app, custom dashboard, or internal automation script.

This article covers:

  • The technical architecture of Polar MCP.

  • Core endpoints and data structures.

  • Secure authentication using Organization Access Tokens.

  • Practical setup for ChatGPT, Claude, and Developer environments.

Section 1: The "Open API" Architecture

The Model Context Protocol (MCP) acts as a standardized "USB-C port" for your AI. Instead of manually uploading CSVs, you are giving an intelligent agent a direct line to your Semantic Layer.

When you query an AI via MCP:

  1. Discovery: The AI looks at the Polar MCP server to see which "tools" (endpoints) are available.

  2. The Execution: The AI calls the relevant Polar tool (e.g., get_metrics) with specific parameters like time_range.

  3. The Response: Polar returns a clean JSON payload which the AI interprets and explains to you instantly.

Section 2: Core Endpoints and Examples

To use Polar as an API, your AI agent interacts with specific tools. Below are the primary endpoints available via the Polar MCP server.

1. get_metrics

Retrieves KPIs like Net Sales, CAC, or ROAS.

  • Example Payload:

JSON

{   "method": "call_tool",   "params": {     "name": "get_metrics",     "arguments": {       "metric_names": ["net_sales", "blended_roas"],       "time_range": "last_7_days"     }   } }

2. audit_performance

Returns a comparison of performance versus a previous period, highlighting significant deltas.

Notes:

  • The "query" field accepts any valid SQL-like request compatible with Polar’s data model.

  • The response is always returned in standard JSON format, ready to parse into your preferred system.

  • All queries run against your live Polar workspace data, ensuring you get real-time metrics.

Section 3: Secure Authentication (Organization Access Tokens)

To ensure your data remains private and secure, Polar MCP uses Organization Access Tokens (OATs). These tokens grant the AI permission to read your data without sharing your personal login credentials.

How to Generate Your Token

  1. Log in to your Polar Analytics Dashboard.

  2. Navigate to Organization SettingsDevelopers.

  3. Click Create New Token. Give it a name like "Claude-MCP-Integration."

  4. Copy the Token: It starts with polar_oat_.... Store this securely; it will only be shown once.

Authentication Security Tiers

Method

Description

Best For

OAuth 2.1

Log in directly through the AI interface (e.g., Claude.ai).

Non-technical users.

Bearer Token

Passing the POLAR_OAT via environment variables.

Developers & Local IDEs.

Sandbox Key

Uses a separate key for mcp-sandbox to test prompts.

Testing & Development.

Never commit your POLAR_OAT to a public repository. If using Cursor or VS Code, store it in your local environment variables.

Section 4: Setup Guide for Popular Clients

For Claude Desktop & Web

  1. Go to SettingsConnectors.

  2. Click Add Custom Connector and name it "Polar."

  3. Enter the server URL: https://mcp.polar.sh/mcp/polar-mcp.

  4. When prompted, authenticate using your Polar credentials or your Access Token.

For Developers (Cursor/Windsurf)

Add the following to your .cursor/mcp.json file:

JSON

{   "mcpServers": {     "polar": {       "command": "npx",       "args": ["-y", "@polaranalytics/mcp-server"],       "env": {         "POLAR_API_KEY": "your_polar_oat_here"       }     }   } }

Conclusion

By treating Polar Analytics as an Open API via MCP, you move from static reporting to conversational intelligence. Secure authentication ensures that while your AI is "smart" about your business, your data remains strictly under your control.

Key Takeaways:

  • Secure First: Always use OATs for programmatic or developer access.

  • Context is King: The AI uses your live Semantic Layer, not stale exports.

  • Plug & Play: Once authenticated, Polar works across any MCP-compatible tool.

Did this answer your question?