How to use UK company data in Cursor with MCP
Why connect company data to your editor
Cursor's agent can call MCP tools while it works on your code. With our server connected, it can fetch a real company record while you write a parser, check which fields come back empty for a micro-entity, or build test fixtures from live filings instead of invented ones. Steps checked against Cursor's documentation on 19 October 2026.
You need Cursor and a free UK Company Data key. Get the key from the button on the developer docs page, or in a terminal:
curl -X POST https://data.globalmindsetmarketing.co.uk/v1/keys/free \
-H "Content-Type: application/json" -d '{}'
The key starts with ukcd_, is shown once and gives 50 requests a month. Each tool call the agent makes counts as one request.
Step 1: store the key in an environment variable
Cursor can read environment variables inside mcp.json, so the key never has to sit in a file you might commit.
macOS or Linux, in ~/.zshrc or ~/.bashrc:
export UKCD_KEY="ukcd_your_key_here"
Windows PowerShell, saved for your user account:
[Environment]::SetEnvironmentVariable("UKCD_KEY", "ukcd_your_key_here", "User")
Restart Cursor afterwards so it picks up the variable.
Step 2: add the server to mcp.json
Cursor reads two files: ~/.cursor/mcp.json for servers available in every project, and .cursor/mcp.json in a project folder for that project only. Create or open one and add:
{
"mcpServers": {
"uk-company-data": {
"url": "https://data.globalmindsetmarketing.co.uk/mcp",
"headers": { "Authorization": "Bearer ${env:UKCD_KEY}" }
}
}
}
If the file already has other servers, add uk-company-data inside the existing mcpServers object. Cursor connects over Streamable HTTP, which is what our endpoint speaks. A project-level file is safe to commit with this content, because it contains only the variable name; each developer sets their own key.
You can also open the MCP settings from Customize in the Cursor sidebar, where current versions install and manage servers. Older versions put the same list under Cursor Settings, Tools and MCP.
Step 3: check the connection
Open Customize, find uk-company-data and make sure it is enabled. Cursor shows the tools it discovered. If something is wrong, open the Output panel (Ctrl+Shift+U on Windows and Linux, Cmd+Shift+U on macOS) and select MCP Logs.
Our server lists its tools without a key, so a green status only proves the URL is right. Ask the agent one real question to confirm the key works.
Step 4: use it from the agent
In the agent chat, ask a question that needs company data. The agent picks the tool itself, or you can name it. By default Cursor asks for approval before running a tool; you can change this under Settings, Agents, Approvals and Execution, or allowlist read-only tools.
Prompts that work well while coding:
- "Use lookup_company for 10623966 and write a TypeScript interface that matches the balance sheet fields it returns."
- "Search for companies named 'tesco' and save the first five results as a JSON fixture in tests/fixtures/."
- "Call compare_companies for 10623966 and 00445790, then write a unit test that checks our ratio function against those figures."
- "Which of these company numbers have overdue accounts? Use lookup_company for each."
| Tool | What the agent gets |
|---|---|
search_by_name | Company numbers for a name |
lookup_company | Register details, latest balance sheet, filing history, risk signals |
compare_companies | Two companies side by side |
search_companies, find_triggers | Screens by size, risk band, assets, employees or signals such as cash-rich |
market_stats, recent_changes | Aggregates and recently published accounts |
watch_add, watch_list, watch_remove, get_alerts | A watchlist tied to your key, with alerts |
Tool output is Markdown text with tables, written for a model to read. When your application needs typed fields, call the REST API with format=json instead; the quickstart has curl, Python and JavaScript examples, and the financial data API guide lists every field.
One-click install link
Cursor also accepts install links of the form cursor://anysphere.cursor-deeplink/mcp/install?name=uk-company-data&config=BASE64, where BASE64 is the base64-encoded server object, for example {"url":"https://data.globalmindsetmarketing.co.uk/mcp","headers":{"Authorization":"Bearer ${env:UKCD_KEY}"}}. Some users report that these links fail in certain versions, so the manual mcp.json route above is the reliable one.
What to expect from the data
The register covers every live company, refreshed monthly. Balance sheet figures come from iXBRL accounts filed since 2008. Many fields are legitimately empty: most small companies publish no turnover, and 32.4% of active companies last filed micro-entity accounts, which show only a short balance sheet (accounts types data). Build your code to treat null as "not filed", not as zero.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| Server enabled but calls return "Missing API key" | UKCD_KEY not visible to Cursor | Set the variable, then fully restart Cursor |
| "Invalid or revoked API key" | Typo or old key | Copy the key again or create a new one |
| "Monthly quota exceeded" | 50 requests used on Free | Wait for the 1st (UTC) or upgrade on the pricing page |
| Agent ignores the tools | Too many tools enabled across servers, or vague prompt | Disable unused servers and name the tool in the prompt |
| JSON error on load | Two mcpServers objects or a trailing comma | Merge into one object and validate the file |
If a key leaks, create a new one, update the variable and email info@globalmindsetmarketing.co.uk to revoke the old key. The same server works in Claude and ChatGPT.
Sources
Try it with a free key. 50 requests a month, REST and MCP, no card. Company register, iXBRL financial history since 2008 and watchlist alerts.
Get a free API key