MCP connector
On this page
Connect Claude, ChatGPT, Cursor or any MCP client to your organization's Lucen data. Your assistant can answer questions from your analytics, explain how a metric is calculated and draft dashboards for you to review.
Overview
Lucen is a managed data pipeline. It loads your marketing and business sources into a BigQuery warehouse and models them into clean, analysis-ready tables (the gold layer). Customer data is hosted and processed in the United States. Depending on customer setup, data resides either in a Google BigQuery environment owned and controlled directly by the customer, or in a dedicated, logically isolated BigQuery environment managed by Lucen. The Lucen MCP server gives an AI assistant governed access to those tables.
With the connector, your assistant can:
- Answer questions about your data by running queries on your organization's warehouse, starting from your gold tables.
- Reuse the saved, validated queries in your organization's query library.
- Explain how a metric is calculated by reading your pipeline's transformation code.
- Tell you how fresh the data is, table by table.
- Draft Blocks dashboard pages for you to review and publish in the Lucen portal.
With a personal connection, the assistant only sees what your Lucen account can see. Every query runs in your organization's warehouse.
Requirements
- For a personal connection: a Lucen account that belongs to at least one organization. Ask your organization owner for an invite if you don't have one.
- For a personal connection: an AI client that supports remote MCP servers with OAuth: Claude (web, desktop or Claude Code), ChatGPT, Codex or Cursor.
- For a service key: a client or your own code that can send a request header. See Service keys.
Connect
Every client uses the same server URL:
https://lucen-api.blumie.io/mcpThe first time you connect, your browser opens Lucen to sign in and approve access. See Authentication and permissions.
Menu names can differ slightly between client versions and languages.
Claude (web or desktop)
- In the Lucen portal, open AI tools, open Claude and click Connect to Claude. Lucen's page in the Claude directory opens.
- Add Lucen there. Claude sends you to Lucen to sign in and choose which organizations to share.
- Approve access. Claude brings you back with Lucen connected.
If you cannot add it from the directory, use the Add it as a custom connector link under the button, or go to Customize → Connectors → Add custom connector in Claude and paste the server URL. Claude shows a notice for links that come from outside Claude, which is expected. Free Claude accounts can add one custom connector.
On Claude Team and Enterprise, an owner may need to add Lucen first. Anthropic's help center says only owners can add custom connectors, and that members then open Customize → Connectors, find Lucen and click Connect. These team steps have not been tested on a live Team organization yet.
ChatGPT
- In the Lucen portal, open AI tools, open ChatGPT and click Connect to ChatGPT. Lucen's page in the ChatGPT plugin directory opens.
- Add Lucen there. ChatGPT sends you to Lucen to sign in and choose which organizations to share.
- Approve access. ChatGPT brings you back with Lucen connected.
On Business and Enterprise workspaces, an admin may need to allow Lucen first.
If you cannot add it from the directory, add it as a custom connector instead: in ChatGPT on the web, open Settings → Apps → Advanced settings and turn on Developer mode (Plus, Pro, Business, Enterprise and Education plans), then open Settings → Connectors → Add custom connector and paste the server URL. On Business and Enterprise workspaces, an admin may need to allow developer mode first under Workspace settings → Permissions & Roles → Connected Data.
Cursor
Add this to .cursor/mcp.json, then approve access when your browser opens:
{
"mcpServers": {
"lucen": {
"url": "https://lucen-api.blumie.io/mcp"
}
}
}Claude Code
Run this in your terminal:
claude mcp add --transport http lucen https://lucen-api.blumie.io/mcpThen run /mcp inside Claude Code, pick lucen, choose Authenticate and approve access when your browser opens.
Codex
Run these in your terminal. The second one opens your browser to approve access:
codex mcp add lucen --url https://lucen-api.blumie.io/mcpcodex mcp login lucenAny coding agent
In the Lucen portal, open AI tools and expand For developers. It has one prompt to paste into Claude Code, Codex, Cursor or any other coding agent: the agent adds the server, and the optional skills, for you.
Optional: skills for developers
The connector works on its own. Developers who use Claude Code or another client that supports skills can also install Lucen's skills, which teach the assistant your data model and the Blocks dashboard format in more depth:
npx skills add Blumie-io/lucen-skills --skill lucen-datanpx skills add Blumie-io/lucen-skills --skill lucen-blocksAuthentication and permissions
Lucen uses OAuth 2.1 with PKCE for personal connections. Your client registers itself automatically, and you never paste your password into the AI client. For your own agents and scripts, use a service key instead.
When you connect, Lucen shows a consent screen. On it you:
- Sign in with your Lucen account.
- Choose which of your organizations this connection may use. You can grant one or several.
- Review what the connection is allowed to do.
A connection can hold two permissions:
| Permission | What it allows |
|---|---|
read | Read-only queries over your analytics data, and running queries from your library. Every connection has it. |
write | Saving new queries to your query library, and creating or editing draft dashboard pages. |
For personal connections, access follows your Lucen membership on every call. If you are removed from an organization, the connection stops working for that organization right away, even if the client still holds a token.
Access tokens last 1 hour. The client renews them with a refresh token that lasts 30 days, and each renewal starts a new 30 days, so a client in regular use stays connected. A client left unused for 30 days asks you to sign in again. Token lifetime is not what ends a personal connection's access: membership is, as described above.
To disconnect, log out of or remove the Lucen connector in your AI client. To stop someone's personal connections entirely, remove them from the organization in Lucen. That does not stop a service key they have: see Service keys.
Service keys
A service key lets your own agent or script read your organization's data with no person signing in, for example a reporting job that runs every morning. A key belongs to one organization and acts as that organization, not as a person. Service keys work for every organization by default. Only an owner of your organization can create one.
Keep the key in a secret store, never in your code or in a chat. Anyone with the key can read your organization's data.
A service key needs a client or your own code that can send a request header: coding agents such as Claude Code, or a script. The Claude and ChatGPT apps cannot send one, so use a personal connection there. Your agent connects to the same server URL and sends the key as a bearer token, with no sign-in step. For example, in Claude Code's project file .mcp.json, with the key in the LUCEN_SERVICE_KEY environment variable:
{
"mcpServers": {
"lucen": {
"type": "http",
"url": "https://lucen-api.blumie.io/mcp",
"headers": {
"Authorization": "Bearer ${LUCEN_SERVICE_KEY}"
}
}
}
}Do not commit the key. Your own code sends the same header, Authorization: Bearer <key>, to the server URL.
A service key can only read. It can call get_server_info, list_organizations, list_brands, list_tables, get_data_guide, get_data_freshness, run_bigquery, compare_entities, list_queries, find_query, run_query, read_pipeline_code and get_blocks_guide. Dashboard pages, page planning, alerts and reports, saving queries and every write tool need a person: they answer that a person must connect with a Lucen account. The tool list still shows every tool; get_server_info tells your agent which ones its key can call.
- Each key can make up to 30 calls a minute.
- Each key can run up to 300 queries a day (UTC). Every attempt counts, also one that fails or is refused.
- All keys of an organization together use at most half of its queries per minute, so the people in your organization always keep the other half. Queries made with a key count toward your organization's usage like any other.
- The usual query limits still apply: one read-only SELECT, a cost check before it runs, at most 1,000 rows.
A key is not tied to a person: removing someone from your organization does not stop a key they have. A revoked key stops working at its next request. A key never gets write permission and never sees another organization.
Tools
The server exposes 26 tools. Every tool declares whether it only reads or also writes.
| Tool | Title | Access | What it does |
|---|---|---|---|
get_server_info | Get Server Info | Read | Describes the server version and the tools available to this connection. |
list_organizations | List Organizations | Read | Lists the organizations this connection is authorized to use. |
list_brands | List Brands | Read | Lists your organization's brands (end clients) with the accounts connected to each and their provider account IDs. |
list_tables | List Tables | Read | Lists your gold tables and their columns. |
get_data_guide | Get Data Guide | Read | Explains the grain and metric rules of your connected sources, so figures are added up correctly. |
get_data_freshness | Get Data Freshness | Read | Shows when each gold table was last built and whether that build succeeded. |
run_bigquery | Run BigQuery SQL | Read | Runs one read-only SELECT on your organization's warehouse. |
compare_entities | Compare Entities | Read | Ranks campaigns, ads or other entities fairly when they were active for different lengths of time. |
list_queries | List Saved Queries | Read | Lists the saved, validated queries in your query library. |
find_query | Find Saved Query | Read | Checks whether a saved query already answers a question. |
run_query | Run Saved Query | Read | Runs a saved query, optionally with parameters such as a date range. |
read_pipeline_code | Read Pipeline Code | Read | Reads the transformation code behind a table, to explain how a metric is calculated. |
list_pages | List Pages | Read | Lists your organization's Blocks dashboard pages. |
get_page | Get Page | Read | Reads one dashboard page, as a draft or as published. |
plan_page | Plan Page | Read | Turns a dashboard request into a short brief and the questions to ask you before building. |
get_blocks_guide | Get Blocks Guide | Read | Returns the guide for writing Blocks dashboard pages. |
save_query | Save Query | Write | Saves a tested query to your query library as a new entry. |
upsert_page | Create or Update Page Draft | Write | Writes a dashboard page as a draft and returns a preview link. |
create_alert | Create Alert | Write | Creates a draft alert on a business metric and returns a preview. Nothing fires until you activate it. |
create_report | Create Report | Write | Creates a recurring Slack digest of a published dashboard page's KPIs. |
activate_watch | Activate Watch | Write | Activates a draft alert after you have reviewed its preview. |
list_watches | List Watches | Read | Lists your organization's alerts and reports. |
pause_watch | Pause Watch | Write | Pauses an alert or report. |
resume_watch | Resume Watch | Write | Resumes a paused alert or report. |
mute_watch | Mute Watch | Write | Snoozes an alert or report for a number of days. |
delete_watch | Delete Watch | Write | Permanently deletes an alert or report. |
The write tools are save_query, upsert_page, create_alert, create_report, activate_watch, pause_watch, resume_watch, mute_watch and delete_watch, and all of them need the write permission. Only delete_watch deletes anything (an alert or a report). Saving a query adds a new entry to your library, and a page draft stays private until someone publishes it in the Lucen portal. Clients that follow MCP tool hints, such as Claude, ask you to confirm before a write tool runs.
Matching your own records
To connect Lucen with your own systems (a CRM, your billing, your own agent), match on the provider account ID. list_brands returns every brand with the accounts connected to it, and each account carries its account_id: the ID of the ad account, property, store or site exactly as the provider shows it, with no changes (a Google Ads ID keeps its dashes, like 123-456-7890). It is the official key to join your records with Lucen's.
- Use
brand_idto refer to a brand. It never changes while the brand exists, while brand names can. If a brand is deleted, its accounts move tounassigned_accounts. account_idis empty when a source has no account ID of its own (for example Klaviyo, Brevo, Mailchimp, YouTube Analytics or a custom API), or when no ID was saved for that account.- Paused, disconnected or failing accounts stay in the list, so your mapping keeps working when a source stops sending data.
- Accounts not yet assigned to a brand come back under
unassigned_accounts.
Example prompts
Answer a question from your data
What was our total ad spend and ROAS by platform last month?
The assistant checks your query library with find_query. If a saved query fits, it runs it with run_query. Otherwise it looks up your tables with list_tables, writes a query and runs it with run_bigquery.
Rank campaigns fairly
Which campaigns performed best over the last 90 days? Some only ran for two weeks.
The assistant uses compare_entities, which normalizes for how long each campaign was active, so a short campaign is not ranked below a long one just for having fewer days of spend.
Build a dashboard
Build me a dashboard of paid media performance by week, with spend, clicks and CPA.
The assistant calls plan_page first and asks you a few questions, such as which platforms and which period. It then saves the queries it needs with save_query and writes the page with upsert_page. You get a preview link and decide whether to publish it in the Lucen portal.
Edit a specific page
Edit page 3f9a2c1e: move the CPA chart to the top.
Every page in Lucen shows its ID next to the title. Click it to copy the ID and paste it into your request: the assistant then changes exactly that page, even when several pages share a name.
Data handling and security
- The connector does not store query results. Queries run in your organization's BigQuery warehouse and the results go back to your AI client. The MCP server does not write result rows to Lucen's database. For saved-query runs it records metadata only: the parameter values used, row count, bytes processed, duration, whether BigQuery's cache answered, and who ran it. BigQuery keeps its standard query cache, about 24 hours, in the warehouse project. Lumi, the chat inside the Lucen portal, stores its own conversations separately.
- Warehouse queries do not change tables. A query must be a single SELECT or WITH statement. Anything that would write, delete or change tables is refused before it reaches BigQuery. Assistants can still draft reports and help with authorized actions inside Lucen.
- Scoped to your organization. Connected assistants (such as Claude or ChatGPT) operate strictly within the organization and permissions approved by the user. Assistants have access only to user prompts and the specific query results or reports generated to fulfill those prompts, never bulk access to the underlying warehouse. Customer data is encrypted in transit and at rest, access-controlled, and logically separated per customer.
- Cost and size limits. Every query is checked with a BigQuery dry run first. Queries that would scan too much data are refused, and results are capped at 1,000 rows.
- Access is checked on every call. Each call names the organization it acts on. For a personal connection, Lucen confirms both the connection's grant and your current membership before running it. For a service key, Lucen confirms that the key is active and that service keys are enabled for your organization.
- Nothing is published for you. Dashboard pages written by an assistant are drafts. Publishing is always a click by a person in the Lucen portal.
- Your AI provider sees the results you ask for. Query results are sent to the AI client you connected, under your agreement with that provider.
Questions you send to find_query are matched against your query library with Google Vertex AI embeddings, which run in Google Cloud alongside the rest of Lucen.
For more detail, see our Privacy Policy, Terms of Service and Documents.
Troubleshooting
The assistant says your data is not ready.Your organization's gold tables have not been built yet, or the catalog is still catching up after a build. If your sources were connected recently, try again after the next daily sync. If the message persists, contact support.
A tool asks you to reconnect for write access.Your connection was approved with read only. Remove the Lucen connector in your client, add it again and approve write access on the consent screen.
The assistant asks which organization to use.Your connection covers more than one organization. Name the organization in your request, or connect with a single organization.
A tool you expected is missing.Some clients load the tool list only once. Start a new conversation or reconnect the connector.
A number looks stale.Ask the assistant when the data was last updated. It checks with get_data_freshness, table by table.
A service key is refused.Your client shows "unauthorized" or asks you to sign in. The key was revoked or expired, or Lucen turned service keys off for your organization. Contact Lucen support if you did not expect that.
Support
Write to blumie@blumie.io. Include the client you use (for example Claude or Cursor), your organization's name and, if you can, the prompt that failed.