fdic-mcp-server 1.25.0 → 1.25.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +68 -17
- package/dist/server.js +68 -17
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -32,7 +32,7 @@ var import_types = require("@modelcontextprotocol/sdk/types.js");
|
|
|
32
32
|
var import_express2 = __toESM(require("express"));
|
|
33
33
|
|
|
34
34
|
// src/constants.ts
|
|
35
|
-
var VERSION = true ? "1.25.
|
|
35
|
+
var VERSION = true ? "1.25.1" : process.env.npm_package_version ?? "0.0.0-dev";
|
|
36
36
|
var FDIC_API_BASE_URL = "https://banks.data.fdic.gov/api";
|
|
37
37
|
var CHARACTER_LIMIT = 5e4;
|
|
38
38
|
var DEFAULT_FDIC_MAX_RESPONSE_BYTES = 5 * 1024 * 1024;
|
|
@@ -39287,21 +39287,72 @@ function collectDashboardRiskSignals(financials) {
|
|
|
39287
39287
|
}
|
|
39288
39288
|
return signals;
|
|
39289
39289
|
}
|
|
39290
|
-
function
|
|
39291
|
-
|
|
39292
|
-
|
|
39293
|
-
|
|
39294
|
-
|
|
39295
|
-
|
|
39296
|
-
|
|
39297
|
-
|
|
39298
|
-
|
|
39299
|
-
|
|
39300
|
-
|
|
39301
|
-
|
|
39290
|
+
function formatDollarsInThousands(value) {
|
|
39291
|
+
if (value === void 0) {
|
|
39292
|
+
return "n/a";
|
|
39293
|
+
}
|
|
39294
|
+
if (Math.abs(value) >= 1e6) {
|
|
39295
|
+
return `$${(value / 1e6).toFixed(1)}B`;
|
|
39296
|
+
}
|
|
39297
|
+
if (Math.abs(value) >= 1e3) {
|
|
39298
|
+
return `$${(value / 1e3).toFixed(1)}M`;
|
|
39299
|
+
}
|
|
39300
|
+
return `$${value.toLocaleString()}k`;
|
|
39301
|
+
}
|
|
39302
|
+
function buildDashboardMarkdown(data) {
|
|
39303
|
+
const { institution: inst, assessment, metrics } = data;
|
|
39304
|
+
const status = inst.active ? "Active" : "Inactive or unknown";
|
|
39305
|
+
const lines = [];
|
|
39306
|
+
lines.push(`## FDIC Bank Deep Dive: ${inst.name}`);
|
|
39307
|
+
lines.push("");
|
|
39308
|
+
lines.push(
|
|
39309
|
+
`**CERT** ${inst.cert} \xB7 ${inst.city}, ${inst.state} \xB7 ${status} \xB7 **Report date** ${inst.report_date}`
|
|
39310
|
+
);
|
|
39311
|
+
lines.push("");
|
|
39312
|
+
lines.push(`> ${assessment.caveat}`);
|
|
39313
|
+
lines.push("");
|
|
39314
|
+
lines.push("### Headline metrics");
|
|
39315
|
+
lines.push("");
|
|
39316
|
+
lines.push("| Metric | Value |");
|
|
39317
|
+
lines.push("| --- | --- |");
|
|
39318
|
+
lines.push(`| Assets | ${formatDollarsInThousands(inst.asset_thousands)} |`);
|
|
39319
|
+
lines.push(
|
|
39320
|
+
`| Deposits | ${formatDollarsInThousands(inst.deposit_thousands)} |`
|
|
39321
|
+
);
|
|
39322
|
+
lines.push(`| Offices | ${inst.offices ?? "n/a"} |`);
|
|
39323
|
+
lines.push(`| Proxy band | ${assessment.proxy_band} |`);
|
|
39324
|
+
lines.push(`| ROA | ${metrics.roa ?? "n/a"} |`);
|
|
39325
|
+
lines.push(`| ROE | ${metrics.roe ?? "n/a"} |`);
|
|
39326
|
+
lines.push(`| Tier 1 leverage | ${metrics.tier1_leverage ?? "n/a"} |`);
|
|
39327
|
+
lines.push(`| Noncurrent loans | ${metrics.noncurrent_loans ?? "n/a"} |`);
|
|
39328
|
+
lines.push(`| Loan-to-deposit | ${metrics.loan_to_deposit ?? "n/a"} |`);
|
|
39329
|
+
lines.push(
|
|
39330
|
+
`| Net interest margin | ${metrics.net_interest_margin ?? "n/a"} |`
|
|
39331
|
+
);
|
|
39332
|
+
lines.push(`| Efficiency ratio | ${metrics.efficiency_ratio ?? "n/a"} |`);
|
|
39333
|
+
lines.push("");
|
|
39334
|
+
lines.push("### Risk signals");
|
|
39335
|
+
lines.push("");
|
|
39336
|
+
if (data.risk_signals.length === 0) {
|
|
39337
|
+
lines.push("_No risk signals returned for this dashboard._");
|
|
39338
|
+
} else {
|
|
39339
|
+
for (const signal of data.risk_signals) {
|
|
39340
|
+
lines.push(`- ${signal}`);
|
|
39341
|
+
}
|
|
39342
|
+
}
|
|
39343
|
+
lines.push("");
|
|
39344
|
+
if (data.warnings.length > 0) {
|
|
39345
|
+
lines.push("### Warnings");
|
|
39346
|
+
lines.push("");
|
|
39347
|
+
for (const warning of data.warnings) {
|
|
39348
|
+
lines.push(`- ${warning}`);
|
|
39349
|
+
}
|
|
39350
|
+
lines.push("");
|
|
39302
39351
|
}
|
|
39303
|
-
|
|
39304
|
-
|
|
39352
|
+
lines.push("### Sources");
|
|
39353
|
+
lines.push("");
|
|
39354
|
+
for (const source of data.sources) {
|
|
39355
|
+
lines.push(`- [${source.title}](${source.url})`);
|
|
39305
39356
|
}
|
|
39306
39357
|
return lines.join("\n");
|
|
39307
39358
|
}
|
|
@@ -39310,7 +39361,7 @@ function registerChatGptBankDeepDiveTool(server) {
|
|
|
39310
39361
|
"fdic_show_bank_deep_dive",
|
|
39311
39362
|
{
|
|
39312
39363
|
title: "Show Bank Deep Dive Dashboard",
|
|
39313
|
-
description: "Use this when the user wants a scannable
|
|
39364
|
+
description: "Use this when the user wants a scannable single-institution dashboard with identity, public financial metrics, risk signals, and source links. ChatGPT renders an interactive widget; Claude and other MCP clients render the same data as a Markdown table.",
|
|
39314
39365
|
inputSchema: BankDeepDiveInputSchema,
|
|
39315
39366
|
outputSchema: FdicBankDeepDiveOutputSchema,
|
|
39316
39367
|
annotations: {
|
|
@@ -39399,7 +39450,7 @@ function registerChatGptBankDeepDiveTool(server) {
|
|
|
39399
39450
|
{
|
|
39400
39451
|
type: "text",
|
|
39401
39452
|
text: truncateIfNeeded(
|
|
39402
|
-
|
|
39453
|
+
buildDashboardMarkdown(structuredContent),
|
|
39403
39454
|
CHARACTER_LIMIT
|
|
39404
39455
|
)
|
|
39405
39456
|
}
|
package/dist/server.js
CHANGED
|
@@ -47,7 +47,7 @@ var import_types = require("@modelcontextprotocol/sdk/types.js");
|
|
|
47
47
|
var import_express2 = __toESM(require("express"));
|
|
48
48
|
|
|
49
49
|
// src/constants.ts
|
|
50
|
-
var VERSION = true ? "1.25.
|
|
50
|
+
var VERSION = true ? "1.25.1" : process.env.npm_package_version ?? "0.0.0-dev";
|
|
51
51
|
var FDIC_API_BASE_URL = "https://banks.data.fdic.gov/api";
|
|
52
52
|
var CHARACTER_LIMIT = 5e4;
|
|
53
53
|
var DEFAULT_FDIC_MAX_RESPONSE_BYTES = 5 * 1024 * 1024;
|
|
@@ -39302,21 +39302,72 @@ function collectDashboardRiskSignals(financials) {
|
|
|
39302
39302
|
}
|
|
39303
39303
|
return signals;
|
|
39304
39304
|
}
|
|
39305
|
-
function
|
|
39306
|
-
|
|
39307
|
-
|
|
39308
|
-
|
|
39309
|
-
|
|
39310
|
-
|
|
39311
|
-
|
|
39312
|
-
|
|
39313
|
-
|
|
39314
|
-
|
|
39315
|
-
|
|
39316
|
-
|
|
39305
|
+
function formatDollarsInThousands(value) {
|
|
39306
|
+
if (value === void 0) {
|
|
39307
|
+
return "n/a";
|
|
39308
|
+
}
|
|
39309
|
+
if (Math.abs(value) >= 1e6) {
|
|
39310
|
+
return `$${(value / 1e6).toFixed(1)}B`;
|
|
39311
|
+
}
|
|
39312
|
+
if (Math.abs(value) >= 1e3) {
|
|
39313
|
+
return `$${(value / 1e3).toFixed(1)}M`;
|
|
39314
|
+
}
|
|
39315
|
+
return `$${value.toLocaleString()}k`;
|
|
39316
|
+
}
|
|
39317
|
+
function buildDashboardMarkdown(data) {
|
|
39318
|
+
const { institution: inst, assessment, metrics } = data;
|
|
39319
|
+
const status = inst.active ? "Active" : "Inactive or unknown";
|
|
39320
|
+
const lines = [];
|
|
39321
|
+
lines.push(`## FDIC Bank Deep Dive: ${inst.name}`);
|
|
39322
|
+
lines.push("");
|
|
39323
|
+
lines.push(
|
|
39324
|
+
`**CERT** ${inst.cert} \xB7 ${inst.city}, ${inst.state} \xB7 ${status} \xB7 **Report date** ${inst.report_date}`
|
|
39325
|
+
);
|
|
39326
|
+
lines.push("");
|
|
39327
|
+
lines.push(`> ${assessment.caveat}`);
|
|
39328
|
+
lines.push("");
|
|
39329
|
+
lines.push("### Headline metrics");
|
|
39330
|
+
lines.push("");
|
|
39331
|
+
lines.push("| Metric | Value |");
|
|
39332
|
+
lines.push("| --- | --- |");
|
|
39333
|
+
lines.push(`| Assets | ${formatDollarsInThousands(inst.asset_thousands)} |`);
|
|
39334
|
+
lines.push(
|
|
39335
|
+
`| Deposits | ${formatDollarsInThousands(inst.deposit_thousands)} |`
|
|
39336
|
+
);
|
|
39337
|
+
lines.push(`| Offices | ${inst.offices ?? "n/a"} |`);
|
|
39338
|
+
lines.push(`| Proxy band | ${assessment.proxy_band} |`);
|
|
39339
|
+
lines.push(`| ROA | ${metrics.roa ?? "n/a"} |`);
|
|
39340
|
+
lines.push(`| ROE | ${metrics.roe ?? "n/a"} |`);
|
|
39341
|
+
lines.push(`| Tier 1 leverage | ${metrics.tier1_leverage ?? "n/a"} |`);
|
|
39342
|
+
lines.push(`| Noncurrent loans | ${metrics.noncurrent_loans ?? "n/a"} |`);
|
|
39343
|
+
lines.push(`| Loan-to-deposit | ${metrics.loan_to_deposit ?? "n/a"} |`);
|
|
39344
|
+
lines.push(
|
|
39345
|
+
`| Net interest margin | ${metrics.net_interest_margin ?? "n/a"} |`
|
|
39346
|
+
);
|
|
39347
|
+
lines.push(`| Efficiency ratio | ${metrics.efficiency_ratio ?? "n/a"} |`);
|
|
39348
|
+
lines.push("");
|
|
39349
|
+
lines.push("### Risk signals");
|
|
39350
|
+
lines.push("");
|
|
39351
|
+
if (data.risk_signals.length === 0) {
|
|
39352
|
+
lines.push("_No risk signals returned for this dashboard._");
|
|
39353
|
+
} else {
|
|
39354
|
+
for (const signal of data.risk_signals) {
|
|
39355
|
+
lines.push(`- ${signal}`);
|
|
39356
|
+
}
|
|
39357
|
+
}
|
|
39358
|
+
lines.push("");
|
|
39359
|
+
if (data.warnings.length > 0) {
|
|
39360
|
+
lines.push("### Warnings");
|
|
39361
|
+
lines.push("");
|
|
39362
|
+
for (const warning of data.warnings) {
|
|
39363
|
+
lines.push(`- ${warning}`);
|
|
39364
|
+
}
|
|
39365
|
+
lines.push("");
|
|
39317
39366
|
}
|
|
39318
|
-
|
|
39319
|
-
|
|
39367
|
+
lines.push("### Sources");
|
|
39368
|
+
lines.push("");
|
|
39369
|
+
for (const source of data.sources) {
|
|
39370
|
+
lines.push(`- [${source.title}](${source.url})`);
|
|
39320
39371
|
}
|
|
39321
39372
|
return lines.join("\n");
|
|
39322
39373
|
}
|
|
@@ -39325,7 +39376,7 @@ function registerChatGptBankDeepDiveTool(server) {
|
|
|
39325
39376
|
"fdic_show_bank_deep_dive",
|
|
39326
39377
|
{
|
|
39327
39378
|
title: "Show Bank Deep Dive Dashboard",
|
|
39328
|
-
description: "Use this when the user wants a scannable
|
|
39379
|
+
description: "Use this when the user wants a scannable single-institution dashboard with identity, public financial metrics, risk signals, and source links. ChatGPT renders an interactive widget; Claude and other MCP clients render the same data as a Markdown table.",
|
|
39329
39380
|
inputSchema: BankDeepDiveInputSchema,
|
|
39330
39381
|
outputSchema: FdicBankDeepDiveOutputSchema,
|
|
39331
39382
|
annotations: {
|
|
@@ -39414,7 +39465,7 @@ function registerChatGptBankDeepDiveTool(server) {
|
|
|
39414
39465
|
{
|
|
39415
39466
|
type: "text",
|
|
39416
39467
|
text: truncateIfNeeded(
|
|
39417
|
-
|
|
39468
|
+
buildDashboardMarkdown(structuredContent),
|
|
39418
39469
|
CHARACTER_LIMIT
|
|
39419
39470
|
)
|
|
39420
39471
|
}
|