🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@registrum/mcp

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@registrum/mcp - npm Package Compare versions

Comparing version
1.2.4
to
2.0.0
+5
-4
dist/index.js
#!/usr/bin/env node
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { serveStdio } from "@modelcontextprotocol/server/stdio";
import { createServer } from "./server.js";

@@ -9,5 +9,6 @@ const apiKey = process.env.REGISTRUM_API_KEY ?? "";

}
const server = createServer(apiKey);
const transport = new StdioServerTransport();
await server.connect(transport);
// A factory rather than a single instance: serveStdio builds one server per
// connection, and pins it to the protocol era the client handshook with, so
// the same tool definitions serve both 2025-era and 2026-07-28 clients.
serveStdio(() => createServer(apiKey));
//# sourceMappingURL=index.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,EAAE,CAAC;AACnD,IAAI,CAAC,MAAM,EAAE,CAAC;IACZ,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,iFAAiF;QACjF,iFAAiF,CAClF,CAAC;AACJ,CAAC;AAED,MAAM,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;AACpC,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;AAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC"}
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,EAAE,CAAC;AACnD,IAAI,CAAC,MAAM,EAAE,CAAC;IACZ,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,iFAAiF;QACjF,iFAAiF,CAClF,CAAC;AACJ,CAAC;AAED,4EAA4E;AAC5E,4EAA4E;AAC5E,wEAAwE;AACxE,UAAU,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC"}

@@ -1,5 +0,47 @@

import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { McpServer } from "@modelcontextprotocol/server";
export declare const API_BASE = "https://api.registrum.co.uk/v1";
export declare function callApi(path: string, apiKey: string, baseUrl?: string): Promise<unknown>;
/**
* Every tool this server exposes, in registration order.
*
* Exported because more than one surface has to agree on it: the stdio package,
* the hosted anonymous endpoint, and the drift test that asserts the two match.
* The MCP README advertised five tools while the server registered eight for
* five months - a list nobody could enumerate programmatically is a list that
* goes stale.
*/
export declare const TOOL_NAMES: readonly ["search_company", "get_company", "get_financials", "get_directors", "get_compliance", "get_psc", "get_psc_chain", "get_network"];
export type ToolName = (typeof TOOL_NAMES)[number];
/**
* Called before a tool touches the API. Return a string to refuse the call with
* that message; return null to allow it.
*
* This is how the hosted anonymous endpoint enforces per-tool daily caps
* without the tool definitions knowing anything about IPs, Supabase or quotas.
* The stdio package passes no quota at all, so a user with their own API key is
* unaffected - their limits are enforced upstream against their own key.
*
* The refusal is deliberately returned as tool *text* rather than thrown: the
* calling model reads it and relays the upgrade path to the user in its own
* words, which makes the cap a conversion surface instead of an error.
*/
export type QuotaCheck = (tool: ToolName) => Promise<string | null>;
export interface RegisterToolsOptions {
apiKey: string;
baseUrl?: string;
quota?: QuotaCheck;
}
export declare const SERVER_INSTRUCTIONS: string;
/**
* Registers all eight tools on a server instance.
*
* Split out of createServer so the hosted HTTP endpoint can reuse the exact
* same tool definitions. `createMcpHandler` takes a factory callback rather
* than a server instance, so without this seam the only way to host these tools
* would be to copy them into the website repo - which is precisely the
* copy-drifts-from-source failure this codebase keeps paying for.
*/
export declare function registerTools(server: McpServer, options: RegisterToolsOptions): McpServer;
/** A stdio-ready server for a single user's own API key. */
export declare function createServer(apiKey: string, baseUrl?: string): McpServer;
//# sourceMappingURL=server.d.ts.map

@@ -1,1 +0,1 @@

{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIpE,eAAO,MAAM,QAAQ,mCAAmC,CAAC;AAEzD,wBAAsB,OAAO,CAC3B,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,MAAiB,GACzB,OAAO,CAAC,OAAO,CAAC,CAclB;AAeD,wBAAgB,YAAY,CAC1B,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,MAAiB,GACzB,SAAS,CAoRX"}
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAIzD,eAAO,MAAM,QAAQ,mCAAmC,CAAC;AAEzD,wBAAsB,OAAO,CAC3B,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,MAAiB,GACzB,OAAO,CAAC,OAAO,CAAC,CAclB;AAeD;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,4IASb,CAAC;AAEX,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnD;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,IAAI,EAAE,QAAQ,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;AAEpE,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,UAAU,CAAC;CACpB;AAED,eAAO,MAAM,mBAAmB,QAOsE,CAAC;AAUvG;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,oBAAoB,GAAG,SAAS,CA2LzF;AAED,4DAA4D;AAC5D,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE,MAAiB,GAAG,SAAS,CAMlF"}

@@ -1,2 +0,2 @@

import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { McpServer } from "@modelcontextprotocol/server";
import { z } from "zod";

@@ -29,14 +29,56 @@ import { VERSION, USER_AGENT } from "./version.js";

}
export function createServer(apiKey, baseUrl = API_BASE) {
const api = (path) => callApi(path, apiKey, baseUrl);
const server = new McpServer({ name: "registrum", version: VERSION }, {
capabilities: { tools: {} },
instructions: "Use these tools to look up UK companies registered at Companies House. " +
"Company numbers are zero-padded 8-digit strings (e.g. '00445790' for Tesco PLC). " +
"When a user gives you a company name, use search_company first to find the number, " +
"then use get_company, get_financials, get_directors, get_psc, get_psc_chain, get_compliance, or get_network as needed. " +
"Use get_psc for a flat view of who controls a company. Use get_compliance for ECCTA identity-verification status - note 'pending' means the deadline has not passed and is not a failure. " +
"Use get_psc_chain to trace corporate ownership upward and find the ultimate beneficial owners (UBOs) " +
"— it follows corporate entity PSCs recursively until reaching natural persons or foreign entities.",
});
/**
* Every tool this server exposes, in registration order.
*
* Exported because more than one surface has to agree on it: the stdio package,
* the hosted anonymous endpoint, and the drift test that asserts the two match.
* The MCP README advertised five tools while the server registered eight for
* five months - a list nobody could enumerate programmatically is a list that
* goes stale.
*/
export const TOOL_NAMES = [
"search_company",
"get_company",
"get_financials",
"get_directors",
"get_compliance",
"get_psc",
"get_psc_chain",
"get_network",
];
export const SERVER_INSTRUCTIONS = "Use these tools to look up UK companies registered at Companies House. " +
"Company numbers are zero-padded 8-digit strings (e.g. '00445790' for Tesco PLC). " +
"When a user gives you a company name, use search_company first to find the number, " +
"then use get_company, get_financials, get_directors, get_psc, get_psc_chain, get_compliance, or get_network as needed. " +
"Use get_psc for a flat view of who controls a company. Use get_compliance for ECCTA identity-verification status - note 'pending' means the deadline has not passed and is not a failure. " +
"Use get_psc_chain to trace corporate ownership upward and find the ultimate beneficial owners (UBOs) " +
"- it follows corporate entity PSCs recursively until reaching natural persons or foreign entities.";
const companyNumber = z
.string()
.regex(/^[A-Z0-9]{1,8}$/, "Must be 1-8 alphanumeric characters")
.describe("Companies House company number, e.g. '00445790' for Tesco PLC. " +
"Numeric-only numbers should be zero-padded to 8 digits.");
/**
* Registers all eight tools on a server instance.
*
* Split out of createServer so the hosted HTTP endpoint can reuse the exact
* same tool definitions. `createMcpHandler` takes a factory callback rather
* than a server instance, so without this seam the only way to host these tools
* would be to copy them into the website repo - which is precisely the
* copy-drifts-from-source failure this codebase keeps paying for.
*/
export function registerTools(server, options) {
const { apiKey, baseUrl = API_BASE, quota } = options;
/** Runs the quota gate, then the call. Every tool body goes through this. */
const run = async (tool, path) => {
try {
const denial = await quota?.(tool);
if (denial)
return err(denial);
return text(await callApi(path, apiKey, baseUrl));
}
catch (e) {
return err(String(e));
}
};
server.registerTool("search_company", {

@@ -47,3 +89,3 @@ title: "Search for companies",

"when you only have a company name and need its company number.",
inputSchema: {
inputSchema: z.object({
query: z.string().min(1).describe("Company name or keywords to search for"),

@@ -57,14 +99,8 @@ limit: z

.describe("Maximum number of results to return (default 10)"),
},
}),
}, async ({ query, limit }) => {
try {
const params = new URLSearchParams({ q: query });
if (limit)
params.set("limit", String(limit));
const data = await api(`/search?${params}`);
return text(data);
}
catch (e) {
return err(String(e));
}
const params = new URLSearchParams({ q: query });
if (limit)
params.set("limit", String(limit));
return run("search_company", `/search?${params}`);
});

@@ -78,18 +114,4 @@ server.registerTool("get_company", {

"the raw Companies House API.",
inputSchema: {
company_number: z
.string()
.regex(/^[A-Z0-9]{1,8}$/, "Must be 1–8 alphanumeric characters")
.describe("Companies House company number, e.g. '00445790' for Tesco PLC. " +
"Numeric-only numbers should be zero-padded to 8 digits."),
},
}, async ({ company_number }) => {
try {
const data = await api(`/company/${company_number}`);
return text(data);
}
catch (e) {
return err(String(e));
}
});
inputSchema: z.object({ company_number: companyNumber }),
}, async ({ company_number }) => run("get_company", `/company/${company_number}`));
server.registerTool("get_financials", {

@@ -104,17 +126,4 @@ title: "Get company financials",

"Cached for 7 days.",
inputSchema: {
company_number: z
.string()
.regex(/^[A-Z0-9]{1,8}$/)
.describe("Companies House company number, e.g. '00445790' for Tesco PLC"),
},
}, async ({ company_number }) => {
try {
const data = await api(`/company/${company_number}/financials`);
return text(data);
}
catch (e) {
return err(String(e));
}
});
inputSchema: z.object({ company_number: companyNumber }),
}, async ({ company_number }) => run("get_financials", `/company/${company_number}/financials`));
server.registerTool("get_directors", {

@@ -126,17 +135,4 @@ title: "Get company directors",

"director. This gives you a full picture of a director's corporate history in one call.",
inputSchema: {
company_number: z
.string()
.regex(/^[A-Z0-9]{1,8}$/)
.describe("Companies House company number, e.g. '00445790' for Tesco PLC"),
},
}, async ({ company_number }) => {
try {
const data = await api(`/company/${company_number}/directors`);
return text(data);
}
catch (e) {
return err(String(e));
}
});
inputSchema: z.object({ company_number: companyNumber }),
}, async ({ company_number }) => run("get_directors", `/company/${company_number}/directors`));
server.registerTool("get_compliance", {

@@ -155,17 +151,4 @@ title: "Check ECCTA identity-verification compliance",

"Requires a Pro plan or above. Cached for 24 hours.",
inputSchema: {
company_number: z
.string()
.regex(/^[A-Z0-9]{1,8}$/)
.describe("Companies House company number, e.g. '00445790' for Tesco PLC"),
},
}, async ({ company_number }) => {
try {
const data = await api(`/company/${company_number}/compliance`);
return text(data);
}
catch (e) {
return err(String(e));
}
});
inputSchema: z.object({ company_number: companyNumber }),
}, async ({ company_number }) => run("get_compliance", `/company/${company_number}/compliance`));
server.registerTool("get_psc", {

@@ -180,22 +163,9 @@ title: "Get persons with significant control",

"Cached for 24 hours.",
inputSchema: {
company_number: z
.string()
.regex(/^[A-Z0-9]{1,8}$/)
.describe("Companies House company number, e.g. '00445790' for Tesco PLC"),
},
}, async ({ company_number }) => {
try {
const data = await api(`/company/${company_number}/psc`);
return text(data);
}
catch (e) {
return err(String(e));
}
});
inputSchema: z.object({ company_number: companyNumber }),
}, async ({ company_number }) => run("get_psc", `/company/${company_number}/psc`));
server.registerTool("get_psc_chain", {
title: "Resolve PSC ownership chain to find ultimate beneficial owners",
description: "Trace the full ownership chain for a UK company by recursively following corporate " +
"entity PSCs. Returns a tree showing who ultimately controls the company — natural persons " +
"(UBOs), foreign entities, or legal persons — along with why each branch terminated. " +
"entity PSCs. Returns a tree showing who ultimately controls the company - natural persons " +
"(UBOs), foreign entities, or legal persons - along with why each branch terminated. " +
"Each node has a terminal_reason: natural_person, foreign_entity, legal_person, " +

@@ -206,7 +176,4 @@ "super_secure, depth_limit, not_found, cycle_detected, or psc_exempt. " +

"beneficial ownership beyond the immediate PSC layer.",
inputSchema: {
company_number: z
.string()
.regex(/^[A-Z0-9]{1,8}$/)
.describe("Companies House company number, e.g. '12345678'"),
inputSchema: z.object({
company_number: companyNumber,
max_depth: z

@@ -220,13 +187,4 @@ .number()

"Each level costs 1 upstream API call per corporate entity found."),
},
}, async ({ company_number, max_depth }) => {
try {
const params = max_depth ? `?max_depth=${max_depth}` : "";
const data = await api(`/company/${company_number}/psc/chain${params}`);
return text(data);
}
catch (e) {
return err(String(e));
}
});
}),
}, async ({ company_number, max_depth }) => run("get_psc_chain", `/company/${company_number}/psc/chain${max_depth ? `?max_depth=${max_depth}` : ""}`));
server.registerTool("get_network", {

@@ -239,7 +197,4 @@ title: "Get director network",

"related party relationships, and director interlocks.",
inputSchema: {
company_number: z
.string()
.regex(/^[A-Z0-9]{1,8}$/)
.describe("Companies House company number, e.g. '00445790' for Tesco PLC"),
inputSchema: z.object({
company_number: companyNumber,
depth: z

@@ -253,15 +208,11 @@ .number()

"Depth 2 can return many results for large companies."),
},
}, async ({ company_number, depth }) => {
try {
const params = depth ? `?depth=${depth}` : "";
const data = await api(`/company/${company_number}/network${params}`);
return text(data);
}
catch (e) {
return err(String(e));
}
});
}),
}, async ({ company_number, depth }) => run("get_network", `/company/${company_number}/network${depth ? `?depth=${depth}` : ""}`));
return server;
}
/** A stdio-ready server for a single user's own API key. */
export function createServer(apiKey, baseUrl = API_BASE) {
const server = new McpServer({ name: "registrum", version: VERSION }, { capabilities: { tools: {} }, instructions: SERVER_INSTRUCTIONS });
return registerTools(server, { apiKey, baseUrl });
}
//# sourceMappingURL=server.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAEnD,MAAM,CAAC,MAAM,QAAQ,GAAG,gCAAgC,CAAC;AAEzD,MAAM,CAAC,KAAK,UAAU,OAAO,CAC3B,IAAY,EACZ,MAAc,EACd,UAAkB,QAAQ;IAE1B,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CACb,mJAAmJ,CACpJ,CAAC;IACJ,CAAC;IACD,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,GAAG,OAAO,GAAG,IAAI,EAAE,EAAE;QAC3C,OAAO,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE;KAC3D,CAAC,CAAC;IACH,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;QACZ,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;QAC9B,MAAM,IAAI,KAAK,CAAC,aAAa,GAAG,CAAC,MAAM,KAAK,IAAI,EAAE,CAAC,CAAC;IACtD,CAAC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MAAM,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;AACpD,CAAC"}
{
"name": "@registrum/mcp",
"mcpName": "io.github.vdmeu/registrum-mcp",
"version": "1.2.4",
"version": "2.0.0",
"description": "MCP server for the Registrum Companies House API — search UK companies, get financials, directors, beneficial ownership (PSC), and director networks",

@@ -26,7 +26,15 @@ "keywords": [

"type": "module",
"main": "dist/index.js",
"module": "dist/index.js",
"main": "dist/server.js",
"module": "dist/server.js",
"types": "dist/server.d.ts",
"bin": {
"registrum-mcp": "dist/index.js"
},
"exports": {
".": {
"types": "./dist/server.d.ts",
"default": "./dist/server.js"
},
"./package.json": "./package.json"
},
"files": [

@@ -44,6 +52,7 @@ "dist"

"dependencies": {
"@modelcontextprotocol/sdk": "^1.27.1",
"zod": "^3.25.0"
"@modelcontextprotocol/server": "^2.0.0",
"zod": "^4.4.3"
},
"devDependencies": {
"@modelcontextprotocol/client": "^2.0.0",
"@types/node": "^20",

@@ -55,3 +64,3 @@ "esbuild": "^0.27.3",

"engines": {
"node": ">=18"
"node": ">=20"
},

@@ -58,0 +67,0 @@ "bugs": {