companies-house-mcp

companies-house-mcp

Enables querying UK company data including search, profiles, officers, filings, and persons with significant control via Companies House API.

Category
访问服务器

README

companies-house-mcp

CI License: MIT Node.js MCP

Production-grade Model Context Protocol server for the UK Companies House API.

Point any MCP-aware assistant (Claude Desktop, Claude Code, Cursor, custom agents) at UK company data. Auth, rate limiting, in-memory caching, structured errors, and a real test suite included — not a tutorial demo.

Status: alpha (v0.1). Five core tools shipped. Free filing-history documents, resumable-filings, and disqualified-officers lookups on the roadmap.


Why this exists

The official MCP reference servers are explicitly educational. They ship without auth, rate limiting, caching, or tests — deliberately, so learners can read them in an afternoon. Every serious team building on MCP ends up re-implementing the same production concerns from scratch.

This is one of them, done properly, against a UK data source that accountants, KYC/AML teams, sales-ops, and journalists genuinely use every day.

Tools exposed

Tool Description
search_companies Free-text search across all registered UK companies.
get_company_profile Full profile for a company by number (name, status, address, SIC codes, dates, accounts).
list_officers Directors, secretaries, and LLP members for a company.
list_filings Filing history (annual accounts, confirmation statements, appointments, resolutions).
get_psc Persons with significant control (25%+ ownership, voting rights, etc.).

Every tool returns structured JSON — the client model doesn't have to parse HTML or free-form text.

Install & configure

Requires Node.js 20+ and a free Companies House API key from developer.company-information.service.gov.uk.

Claude Desktop

Edit your claude_desktop_config.json:

{
  "mcpServers": {
    "companies-house": {
      "command": "npx",
      "args": ["-y", "companies-house-mcp"],
      "env": {
        "CH_API_KEY": "your-key-here"
      }
    }
  }
}

Restart Claude Desktop. Ask it: "Look up MORRIS AI LTD on Companies House and tell me who the directors are."

Claude Code

claude mcp add companies-house npx -y companies-house-mcp -- --env CH_API_KEY=your-key-here

Local dev

git clone https://github.com/shadowborn-dev/companies-house-mcp
cd companies-house-mcp
npm install
cp .env.example .env    # add your API key
npm run build
npm start

Docker

docker build -t companies-house-mcp .
docker run --rm -i -e CH_API_KEY=your-key-here companies-house-mcp

Try it in the browser (MCP Inspector)

The fastest way to poke at the tools without wiring the server into Claude Desktop is the official MCP Inspector — a web UI that connects to any MCP server and lets you call its tools with a form.

# put your key in .env first (or export CH_API_KEY=... in the shell)
npm run inspect

That builds the server, launches the Inspector in a local browser tab, and connects to the built server over stdio. You'll see the five tools listed on the left; click one, fill in the form on the right (company_number: "12345678" for get_company_profile, or query: "morris" for search_companies), hit Run tool, and the raw JSON response comes back below. Handy for verifying a tool works before you plug the server into Claude.

Production concerns handled

Auth. Companies House uses HTTP Basic with the API key as the username. This server wraps that transparently — you only ever set CH_API_KEY.

Rate limiting. Companies House enforces 600 requests per 5-minute rolling window per API key. This server ships a token-bucket limiter tuned to match — requests over the budget queue and wait rather than being sent through and 429'd back. Configurable via CH_RATE_LIMIT_MAX and CH_RATE_LIMIT_WINDOW_SECONDS.

Caching. In-memory LRU with per-entry TTL (default 5 minutes). Company profiles rarely change intraday, so a cache dramatically cuts request count for repeated lookups. Configurable via CH_CACHE_TTL_SECONDS and CH_CACHE_MAX_ENTRIES.

Structured errors. Every failure surfaces as a typed error class the model can reason about — NotFoundError, UnauthorizedError, RateLimitedError, UpstreamError — instead of a generic 500.

Tests. Vitest covers the rate limiter, cache eviction, and the HTTP client with mocked fetch. npm test runs the whole suite.

Configuration reference

Env var Default Purpose
CH_API_KEY (required) Companies House API key.
CH_RATE_LIMIT_MAX 600 Max requests per window.
CH_RATE_LIMIT_WINDOW_SECONDS 300 Rolling window in seconds.
CH_CACHE_TTL_SECONDS 300 Cache entry TTL.
CH_CACHE_MAX_ENTRIES 1000 Max cache size before LRU eviction.

Roadmap

  • v0.2get_filing_document (fetches the PDF or iXBRL underlying a filing).
  • v0.3disqualified_officers search + officer_appointments (all companies a person is an officer of).
  • v0.4 — Streamable HTTP transport for remote/hosted deployments.
  • v0.5 — Optional Redis-backed cache + rate limiter for multi-instance deployments.

Honest caveats

  • The Companies House API returns data as filed — occasionally with typos, inconsistent capitalisation, or delays of days between filing and appearing. This server does not clean or reconcile any of that.
  • Rate-limit budgeting is per-API-key. If you share a key across multiple instances of this server, they will not coordinate — colocate to one instance or supply a distributed limiter in v0.5.
  • Not affiliated with or endorsed by Companies House.

License

MIT. See LICENSE.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选