New:Socket for Asana Is Now Available.Learn more
Get Started

@entyrix/mcp

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@entyrix/mcp - npm Package Compare versions

Comparing version
0.1.2
to
0.1.3
+37
dist/lib/money.d.ts
/**
* Financial statement rows arrive from the API in CENTS. The tools that serve
* them promised EUR.
*
* Measured 2026-08-12 end-to-end: `get_financials` for SLOVNAFT returned
* `turnover: 556867400000` under a description reading "All amounts in EUR".
* The company's 2024 revenue is 5.57 billion EUR, so a model reading that field
* reports 556 billion — a hundredfold error, delivered as a plain number with
* nothing to signal it.
*
* Worse than the error itself was the inconsistency: `advanced_search` and
* `list_rankings` divide correctly (`turnoverEur`), these two did not. An agent
* comparing one company's financials against the ranking it appears in got
* figures 100x apart for the same company and had no way to tell which was
* wrong.
*
* SCOPE IS DELIBERATELY NARROW. Only the fields below are converted, because
* only those were measured against the database. The rest of the company
* envelope is left alone on purpose:
*
* publicContractsTotalCur already EUR (cross-checked against find_suppliers)
* taxDebtAmountCents self-describing name, left as-is
* solvencySignals.*Cents self-describing names, left as-is
* roa / roe ratios, not money — converting them would be a
* new bug of exactly the kind this file fixes
*
* Guessing at a field's unit is how the original defect happened. If a new
* money field appears, measure it against `financial_statements` before adding
* it here.
*/
/**
* Convert one financial-statement row to EUR, leaving every non-money field
* untouched and stamping the unit so the answer cannot be misread again.
*/
export declare function financialRowToEur(row: unknown): unknown;
export declare function financialRowsToEur(rows: unknown): unknown[];
//# sourceMappingURL=money.d.ts.map
{"version":3,"file":"money.d.ts","sourceRoot":"","sources":["../../src/lib/money.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAcH;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAQvD;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,EAAE,CAE3D"}
/**
* Financial statement rows arrive from the API in CENTS. The tools that serve
* them promised EUR.
*
* Measured 2026-08-12 end-to-end: `get_financials` for SLOVNAFT returned
* `turnover: 556867400000` under a description reading "All amounts in EUR".
* The company's 2024 revenue is 5.57 billion EUR, so a model reading that field
* reports 556 billion — a hundredfold error, delivered as a plain number with
* nothing to signal it.
*
* Worse than the error itself was the inconsistency: `advanced_search` and
* `list_rankings` divide correctly (`turnoverEur`), these two did not. An agent
* comparing one company's financials against the ranking it appears in got
* figures 100x apart for the same company and had no way to tell which was
* wrong.
*
* SCOPE IS DELIBERATELY NARROW. Only the fields below are converted, because
* only those were measured against the database. The rest of the company
* envelope is left alone on purpose:
*
* publicContractsTotalCur already EUR (cross-checked against find_suppliers)
* taxDebtAmountCents self-describing name, left as-is
* solvencySignals.*Cents self-describing names, left as-is
* roa / roe ratios, not money — converting them would be a
* new bug of exactly the kind this file fixes
*
* Guessing at a field's unit is how the original defect happened. If a new
* money field appears, measure it against `financial_statements` before adding
* it here.
*/
/** Fields inside a financial-statement row that the API expresses in cents. */
const CENT_FIELDS = ["turnover", "totalAssets", "equity", "totalDebt", "profit", "ebitda"];
function centsToEur(v) {
if (v === null || v === undefined)
return v;
if (typeof v === "number")
return v / 100;
// bigint-ish strings: the API sends numbers today, but a widening to string
// must not silently pass the raw cents through.
if (typeof v === "string" && /^-?\d+$/.test(v))
return Number(v) / 100;
return v;
}
/**
* Convert one financial-statement row to EUR, leaving every non-money field
* untouched and stamping the unit so the answer cannot be misread again.
*/
export function financialRowToEur(row) {
if (row === null || typeof row !== "object" || Array.isArray(row))
return row;
const out = { ...row };
for (const f of CENT_FIELDS) {
if (f in out)
out[f] = centsToEur(out[f]);
}
out.unit = "EUR";
return out;
}
export function financialRowsToEur(rows) {
return Array.isArray(rows) ? rows.map(financialRowToEur) : [];
}
//# sourceMappingURL=money.js.map
{"version":3,"file":"money.js","sourceRoot":"","sources":["../../src/lib/money.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;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,3 +16,3 @@ /**

*/
export declare const VERSION = "0.1.2";
export declare const VERSION = "0.1.3";
//# sourceMappingURL=version.d.ts.map

@@ -16,3 +16,3 @@ /**

*/
export const VERSION = "0.1.2";
export const VERSION = "0.1.3";
//# sourceMappingURL=version.js.map

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

{"version":3,"file":"get-company-details.d.ts","sourceRoot":"","sources":["../../src/tools/get-company-details.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,eAAO,MAAM,4BAA4B;;CAOxC,CAAC;AAUF,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,GAAG,IAAI,CAgBxF"}
{"version":3,"file":"get-company-details.d.ts","sourceRoot":"","sources":["../../src/tools/get-company-details.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGtD,eAAO,MAAM,4BAA4B;;CAOxC,CAAC;AAUF,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,GAAG,IAAI,CAuBxF"}
import { z } from "zod";
import { financialRowsToEur } from "../lib/money.js";
export const getCompanyDetailsInputSchema = {

@@ -24,2 +25,9 @@ ico: z

const result = await client.get(`/companies/${encodeURIComponent(ico)}`);
// `latestFinancials` arrives in cents — same rows `get_financials` serves.
// Converted here too, or the two tools would disagree about the same
// company depending on which one the model happened to call.
const envelope = result;
if (envelope?.data && Array.isArray(envelope.data.latestFinancials)) {
envelope.data.latestFinancials = financialRowsToEur(envelope.data.latestFinancials);
}
return {

@@ -26,0 +34,0 @@ content: [{ type: "text", text: JSON.stringify(result, null, 2) }],

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

{"version":3,"file":"get-company-details.js","sourceRoot":"","sources":["../../src/tools/get-company-details.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,GAAG,EAAE,CAAC;SACH,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,CAAC,CAAC;SACN,KAAK,CAAC,WAAW,EAAE,wBAAwB,CAAC;SAC5C,QAAQ,CAAC,gFAAgF,CAAC;CAC9F,CAAC;AAEF,MAAM,WAAW,GACf,6EAA6E;IAC7E,6EAA6E;IAC7E,0EAA0E;IAC1E,sEAAsE;IACtE,wEAAwE;IACxE,4EAA4E,CAAC;AAE/E,MAAM,UAAU,yBAAyB,CAAC,MAAiB,EAAE,MAAqB;IAChF,MAAM,CAAC,YAAY,CACjB,qBAAqB,EACrB;QACE,KAAK,EAAE,0BAA0B;QACjC,WAAW;QACX,WAAW,EAAE,4BAA4B;KAC1C,EACD,KAAK,EAAE,IAAI,EAAE,EAAE;QACb,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;QACtC,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,GAAG,CAAU,cAAc,kBAAkB,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAClF,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;SACnE,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
{"version":3,"file":"get-company-details.js","sourceRoot":"","sources":["../../src/tools/get-company-details.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,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AM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;SACnE,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}

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

{"version":3,"file":"get-financials.d.ts","sourceRoot":"","sources":["../../src/tools/get-financials.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,eAAO,MAAM,wBAAwB;;;CAcpC,CAAC;AAiBF,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,GAAG,IAAI,CAsCpF"}
{"version":3,"file":"get-financials.d.ts","sourceRoot":"","sources":["../../src/tools/get-financials.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGtD,eAAO,MAAM,wBAAwB;;;CAcpC,CAAC;AAkBF,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,GAAG,IAAI,CAsCpF"}
import { z } from "zod";
import { financialRowsToEur } from "../lib/money.js";
export const getFinancialsInputSchema = {

@@ -19,3 +20,4 @@ ico: z

"assets, equity, profit, EBITDA, ROA, ROE) for a company. Source: SK FS / " +
"CZ Justice / AT FBW depending on jurisdiction. All amounts in EUR. " +
"CZ Justice / AT FBW depending on jurisdiction. All money amounts are in " +
"EUR (each row carries `unit`); roa/roe are ratios. " +
"Implemented as a thin extractor over get_company_details — saves the LLM " +

@@ -35,3 +37,3 @@ "from parsing the full company envelope when only financials are needed.";

: [];
const truncated = allYears.slice(0, years);
const truncated = financialRowsToEur(allYears.slice(0, years));
return {

@@ -38,0 +40,0 @@ content: [

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

{"version":3,"file":"get-financials.js","sourceRoot":"","sources":["../../src/tools/get-financials.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,GAAG,EAAE,CAAC;SACH,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,CAAC,CAAC;SACN,KAAK,CAAC,WAAW,CAAC;SAClB,QAAQ,CAAC,eAAe,CAAC;IAC5B,KAAK,EAAE,CAAC;SACL,MAAM,EAAE;SACR,GAAG,EAAE;SACL,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,EAAE,CAAC;SACP,QAAQ,EAAE;SACV,QAAQ,CAAC,kDAAkD,CAAC;CAChE,CAAC;AAEF,MAAM,WAAW,GACf,0EAA0E;IAC1E,2EAA2E;IAC3E,qEAAqE;IACrE,2EAA2E;IAC3E,yEAAyE,CAAC;AAU5E,MAAM,UAAU,qBAAqB,CAAC,MAAiB,EAAE,MAAqB;IAC5E,MAAM,CAAC,YAAY,CACjB,gBAAgB,EAChB;QACE,KAAK,EAAE,wBAAwB;QAC/B,WAAW;QACX,WAAW,EAAE,wBAAwB;KACtC,EACD,KAAK,EAAE,IAAI,EAAE,EAAE;QACb,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;QACtC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC;QAC9B,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,GAAG,CAC3B,cAAc,kBAAkB,CAAC,GAAG,CAAC,EAAE,CACxC,CAAC;QACF,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,gBAAgB,CAAC;YACzD,CAAC,CAAC,IAAI,CAAC,IAAK,CA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,wBAAwB;QAC/B,WAAW;QACX,WAAW,EAAE,wBAAwB;KACtC,EACD,KAAK,EAAE,IAAI,EAAE,EAAE;QACb,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;QACtC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC;QAC9B,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,GAAG,CAC3B,cAAc,kBAAkB,CAAC,GAAG,CAAC,EAAE,CACxC,CAAC;QACF,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,gBAAgB,CAAC;YACzD,CAAC,CAAC,IAAI,CAAC,IAAK,CAAC,gBAAiB;YAC9B,CAAC,CAAC,EAAE,CAAC;QACP,MAAM,SAAS,GAAG,kBAAkB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;QAC/D,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAClB;wBACE,GAAG;wBACH,eAAe,EAAE,KAAK;wBACtB,cAAc,EAAE,SAAS,CAAC,MAAM;wBAChC,UAAU,EAAE,SAAS;wBACrB,IAAI,EAAE,IAAI,CAAC,IAAI;qBAChB,EACD,IAAI,EACJ,CAAC,CACF;iBACF;aACF;SACF,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
{
"name": "@entyrix/mcp",
"version": "0.1.2",
"version": "0.1.3",
"description": "Model Context Protocol server for the Entyrix European business-registry (KYB) API. Exposes 10 stdio tools (search, lookup, details, network, relations, advanced search, compliance, financials, suppliers, rankings) for LLM clients (Claude Desktop, Claude Code, Cursor, ChatGPT).",

@@ -5,0 +5,0 @@ "mcpName": "io.github.juliusgerman/entyrix-mcp",