Pilea

Support / Integrations

Using the Pilea API and MCP

Want to push feedback in from your own product, build custom automations, or ask about your customers from Claude, ChatGPT or your code editor? That’s what the Pilea API and MCP server are for.

The Pilea API

The public API lives at:

https://api.getpilea.com/api/v1

Interactive reference docs are at api.getpilea.com/api/v1/docs. Everything below is documented there in full, with request and response shapes.

Creating an API key

API keys are created at the organization level, by admins and owners, on plans that include API access.

  1. In Pilea, go to Settings → API & MCP and click Create API key.
  2. Give the key a Name.
  3. Pick a Workspace: All workspaces (the key can target any workspace per call), or a single workspace to lock the key to it.
  4. Pick the Access level: Full access, or Custom access to tick read and write per resource.
  5. Click Create key and copy it now - you won’t be able to see it again.

Keys can be revoked from the same page. A revoked key can then be deleted permanently.

💡 Tip: Use Custom access with the narrowest scopes that do the job. A script that only pushes feedback needs mentions:write, not full access. Read and write are independent - mentions:write does not include mentions:read.

Scopes

Custom access lets you pick read and write per resource. The scope names, as they appear on the key:

Resource Scopes
Workspaces workspaces:read, workspaces:write (write covers a workspace’s analysis settings, not creating workspaces)
Mentions mentions:read, mentions:write
Backlog items backlog-items:read, backlog-items:write
Customers customers:read, customers:write (also cover custom field definitions)
Customer groups customer-groups:read, customer-groups:write
Tags tags:read, tags:write
Themes themes:read
Agents & skills agents:read, agents:run
Skills (authoring) skills:read, skills:write
Knowledge documents documents:read, documents:write
Integrations (status) integrations:read

Authenticating

Pass your key in the X-Api-Key header on every request:

X-Api-Key: your_api_key_here

Requests are rate limited to 120 per minute per key (10 per minute for triggering skill runs).

Targeting a workspace

API keys belong to your organization, but most work happens inside a workspace. Use the X-Workspace-Id header to say which:

  • A workspace’s public ID, from GET /v1/workspaces
  • all to read across every workspace
  • Omit the header to use your organization’s default workspace

A key bound to a single workspace is locked to it: send its ID or omit the header; anything else, including all, is rejected with a 403. Customers, tags and customer fields are organization-level, so binding doesn’t restrict them. Some endpoints - workspace settings, bulk update, de-duplication and merging of backlog items - need the header to resolve to exactly one workspace.

What’s in the API

Grouped by resource. Every endpoint is under /v1.

Workspaces - list workspaces; get and update a workspace’s analysis settings (analysis context, linked documents, feedback cleaning). Settings apply to new analysis runs, so re-analyse to apply them to existing data.

Mentions - list (with search), get, create, bulk create, delete, upload attachments; link and unlink customers, backlog items and tags; bulk archive or unarchive; re-analyse a selection or the whole workspace and poll its progress. When creating a mention, set mentionedAt so imported history keeps its real dates.

Backlog items - list with server-side filters (search, statuses, analysisUnits, tags, themes, customerFields, sorting), get, create, update, delete, list an item’s mentions, bulk update many items in one request, find duplicates (dryRun by default) and merge items.

Customers - list (with search and customFields), get, create, update, delete, bulk update; a customer’s mentions and backlog items, each filterable with since (and statuses for backlog items) for a “what’s changed since our last call” timeline.

Customer fields and groups - define the custom fields you track on customers (text, number, select or date), and manage customer groups.

Tags and themes - full tag management; list themes.

Agents and skills - list your agent and its skills; trigger a skill run; list, get, create and update skills.

Knowledge documents - list team-visible documents and create text documents, for example to link as analysis context.

Integrations - connection status per integration, with no credentials.

Common uses:

  • Push feedback directly from your product, with the customer attached
  • Backfill history from another tool with the original dates
  • Keep customer segments and fields in sync with your CRM
  • Trigger a skill (say, a release summary) from a deploy pipeline

The MCP server

Pilea has a hosted MCP (Model Context Protocol) server, so AI tools like Claude, ChatGPT, Cursor and VS Code can work with your Pilea data directly. Ask “What are our enterprise customers asking for this month?” in Claude, or have your coding agent open a backlog item along with the customer quotes behind it.

The server address is:

https://mcp.getpilea.com/mcp

You connect by signing in with your Pilea account. You don’t need an API key, Node.js or a config file.

What you’ll need

  • A Pilea Team or Growth plan
  • A Pilea account in the organization you want to connect

Connecting your tool

In Pilea, go to Settings → API & MCP. The Model Context Protocol (MCP) card shows the server URL and a button for each tool. You’ll also find a Set up MCP button in the Feed your coding agent panel on the Integrations page.

Claude (web, desktop and mobile) – click Add to Claude. It copies the URL and opens Claude’s connector settings. Click + Add → Add custom connector, paste the URL, then Connect. On Claude Team and Enterprise plans, an owner first adds the connector under Organization settings → Connectors, and members then connect it themselves.

Cursor – click Add to Cursor. Cursor opens and asks you to confirm.

VS Code – click Add to VS Code. VS Code opens and asks you to confirm.

Claude Code – click Copy and run the command in your terminal:

claude mcp add --scope user --transport http pilea https://mcp.getpilea.com/mcp; claude mcp login pilea

This adds Pilea for all your projects and opens the sign-in. If you already use the npm package under the name pilea, run claude mcp remove pilea first. If sign-in doesn’t open, run /mcp in Claude Code and choose Authenticate.

ChatGPT, Windsurf and others – click Copy URL and add it as a remote MCP server or custom connector in your tool.

Signing in and approving

Whichever tool you use, a Pilea page opens asking you to Connect {tool} to Pilea:

  1. Sign in with your Pilea account, using a password or SSO as usual.
  2. Under Workspace, pick one workspace, or All workspaces I can access to switch between them per request.
  3. Check the Permissions and click Allow access.

You’re sent back to your tool, connected.

What a connection can do

A connection can never do more than you can in Pilea:

Your role What your AI tool can do
Viewer Read only
Editor Read, plus create and update mentions, backlog items, customers, customer groups, tags and documents, and run skills
Admin or owner Everything, including workspace settings and writing skills

Pilea checks your role every time the tool uses its connection, so if your role changes or you leave the organization, access changes with it straight away. Tools the connection isn’t allowed to use are hidden from your AI tool.

With full access, your tool can list, search and filter backlog items, open an item with its customer context, create, update, merge and de-duplicate items, create and archive mentions, manage customers, customer fields, customer groups and tags, browse themes and integrations, list and create documents, re-analyse a workspace, and list, write and run skills.

Managing connections

Settings → API & MCP → Connected MCP clients lists every connection with its workspace, access and when it was last used. Members see their own connections, and admins and owners see everyone’s. Use the revoke button on a row to disconnect that client. It stops working immediately, until someone authorizes it again.

ℹ️ Note: If you connected using https://api.getpilea.com/mcp before 14 October 2026, remove that connection from your tool and add https://mcp.getpilea.com/mcp instead.

Using an API key instead

Tools that can’t do the sign-in flow can connect to the same URL with an API key in the header:

Authorization: Bearer your_api_key_here

The key’s scopes and workspace binding apply, as with the API.

The npm package, for git workflows

If your agent works from a git checkout, the @pilea-insights/mcp package runs locally via npx. It adds commit hooks and item selection on top of the hosted tools: your agent can pick the item it’s working on, suggest commit messages that link back to it, and mark the item completed with the commit that shipped it. It needs Node.js 18 or newer and an API key (see Creating an API key above).

The config block is:

{
  "mcpServers": {
    "pilea": {
      "command": "npx",
      "args": ["@pilea-insights/mcp"],
      "env": {
        "PILEA_API_KEY": "your_api_key_here",
        "PILEA_API_BASE_URL": "https://api.getpilea.com/api/v1"
      }
    }
  }
}

In Claude Code, run:

claude mcp add pilea --env PILEA_API_KEY=your_api_key_here --env PILEA_API_BASE_URL=https://api.getpilea.com/api/v1 -- npx @pilea-insights/mcp

In Cursor, VS Code or Windsurf, add the same mcpServers block to your editor’s MCP config, then reload the editor.

Variable Required What it does
PILEA_API_KEY Yes Your organization-level API key
PILEA_API_BASE_URL Yes https://api.getpilea.com/api/v1
PILEA_WORKSPACE_ID No Target one workspace by public ID, or all for every workspace. Omit to use the org default. You can also switch at runtime by asking your agent to change workspace.

ℹ️ Note: Since the key is only shown once at creation, store it somewhere safe (like your team’s secrets manager) before closing the dialog. If you lose it, create a new key.

API or MCP - which one?

  • API - You’re writing code: pushing feedback from your product, syncing data into internal tools, building automations, running a skill from a pipeline.
  • MCP - You want to ask about your customer evidence from Claude, ChatGPT or your code editor, or have your coding agent pick up backlog items with the customer context behind them.

They’re complementary. The API uses organization-level keys and scopes. The hosted MCP server uses your own Pilea sign-in and role.

Next: How integration syncing works

Stuck? Email us — a human answers, usually the same day.