fdic-mcp-server 1.26.0 → 1.28.0

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 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.26.0" : process.env.npm_package_version ?? "0.0.0-dev";
35
+ var VERSION = true ? "1.28.0" : 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;
@@ -31963,6 +31963,21 @@ var CertSchema = import_zod.z.object({
31963
31963
  // src/schemas/output.ts
31964
31964
  var import_zod2 = require("zod");
31965
31965
  var FdicRecord = import_zod2.z.record(import_zod2.z.unknown());
31966
+ var FdicFinancialRecord = import_zod2.z.object({
31967
+ CERT: import_zod2.z.number().int().optional(),
31968
+ NAME: import_zod2.z.string().optional(),
31969
+ REPDTE: import_zod2.z.union([import_zod2.z.string(), import_zod2.z.number()]).optional(),
31970
+ ASSET: import_zod2.z.number().optional(),
31971
+ DEP: import_zod2.z.number().optional(),
31972
+ NETINC: import_zod2.z.number().optional(),
31973
+ ROA: import_zod2.z.number().optional(),
31974
+ ROE: import_zod2.z.number().optional(),
31975
+ IDT1CER: import_zod2.z.number().optional(),
31976
+ NCLNLSR: import_zod2.z.number().optional(),
31977
+ LNLSDEPR: import_zod2.z.number().optional(),
31978
+ NIMY: import_zod2.z.number().optional(),
31979
+ EEFFR: import_zod2.z.number().optional()
31980
+ }).passthrough();
31966
31981
  var Pagination = {
31967
31982
  total: import_zod2.z.number().int(),
31968
31983
  offset: import_zod2.z.number().int(),
@@ -31970,10 +31985,10 @@ var Pagination = {
31970
31985
  has_more: import_zod2.z.boolean(),
31971
31986
  next_offset: import_zod2.z.number().int().optional()
31972
31987
  };
31973
- function paginatedSearchSchema(recordKey) {
31988
+ function paginatedSearchSchema(recordKey, recordSchema = FdicRecord) {
31974
31989
  return import_zod2.z.object({
31975
31990
  ...Pagination,
31976
- [recordKey]: import_zod2.z.array(FdicRecord),
31991
+ [recordKey]: import_zod2.z.array(recordSchema),
31977
31992
  truncated: import_zod2.z.boolean().optional()
31978
31993
  });
31979
31994
  }
@@ -31984,7 +31999,8 @@ var FdicFailuresSearchOutputSchema = paginatedSearchSchema("failures");
31984
31999
  var FdicLocationsSearchOutputSchema = paginatedSearchSchema("locations");
31985
32000
  var FdicHistorySearchOutputSchema = paginatedSearchSchema("events");
31986
32001
  var FdicFinancialsSearchOutputSchema = paginatedSearchSchema(
31987
- "financials"
32002
+ "financials",
32003
+ FdicFinancialRecord
31988
32004
  );
31989
32005
  var FdicSummarySearchOutputSchema = paginatedSearchSchema("summary");
31990
32006
  var FdicSodSearchOutputSchema = paginatedSearchSchema("deposits");
@@ -32078,10 +32094,47 @@ var PeerHealthInstitutionSchema = import_zod2.z.object({
32078
32094
  component_ratings: import_zod2.z.record(import_zod2.z.number()),
32079
32095
  flags: import_zod2.z.array(import_zod2.z.string())
32080
32096
  });
32097
+ var PeerHealthProxySummarySchema = import_zod2.z.object({
32098
+ model: import_zod2.z.literal("public_camels_proxy_v1"),
32099
+ official_status: import_zod2.z.literal("public off-site proxy, not official CAMELS"),
32100
+ score: import_zod2.z.number(),
32101
+ band: import_zod2.z.string(),
32102
+ components: import_zod2.z.array(
32103
+ import_zod2.z.object({
32104
+ name: import_zod2.z.string(),
32105
+ label: import_zod2.z.string(),
32106
+ score: import_zod2.z.number(),
32107
+ legacy_rating: import_zod2.z.number(),
32108
+ legacy_label: import_zod2.z.string(),
32109
+ flags: import_zod2.z.array(import_zod2.z.string())
32110
+ })
32111
+ ),
32112
+ capital_classification: import_zod2.z.object({
32113
+ category: import_zod2.z.string(),
32114
+ label: import_zod2.z.string(),
32115
+ binding_constraint: import_zod2.z.string().nullable(),
32116
+ ratios_used: import_zod2.z.record(import_zod2.z.number().nullable())
32117
+ }),
32118
+ management_overlay: import_zod2.z.object({
32119
+ level: import_zod2.z.string(),
32120
+ caps_band: import_zod2.z.boolean(),
32121
+ reason_codes: import_zod2.z.array(import_zod2.z.string())
32122
+ }),
32123
+ risk_signal_count: import_zod2.z.number().int(),
32124
+ risk_signal_severities: import_zod2.z.record(import_zod2.z.number().int()),
32125
+ trend_count: import_zod2.z.number().int(),
32126
+ data_quality: import_zod2.z.object({
32127
+ report_date: import_zod2.z.string(),
32128
+ staleness: import_zod2.z.string(),
32129
+ gaps_count: import_zod2.z.number().int(),
32130
+ gaps: import_zod2.z.array(import_zod2.z.string())
32131
+ })
32132
+ });
32081
32133
  var FdicPeerHealthOutputSchema = import_zod2.z.object({
32082
32134
  model: import_zod2.z.literal("public_camels_proxy_v1"),
32083
32135
  official_status: import_zod2.z.literal("public off-site proxy, not official CAMELS"),
32084
32136
  proxy: import_zod2.z.unknown().nullable(),
32137
+ proxy_summary: PeerHealthProxySummarySchema.nullable(),
32085
32138
  report_date: import_zod2.z.string(),
32086
32139
  sort_by: import_zod2.z.string(),
32087
32140
  total_institutions: import_zod2.z.number().int(),
@@ -35884,6 +35937,49 @@ var PEER_METRICS = [
35884
35937
  { key: "efficiencyRatioPct", legacyKey: "efficiencyRatioPct", name: "efficiency_ratio_pct", label: "Efficiency ratio", higherIsBetter: false },
35885
35938
  { key: "loanToDepositPct", legacyKey: "loanToDepositPct", name: "loan_to_deposit_pct", label: "Loan-to-deposit ratio", higherIsBetter: false }
35886
35939
  ];
35940
+ function buildProxySummary(proxy) {
35941
+ if (!proxy) return null;
35942
+ const componentEntries = [
35943
+ { name: "capital", assessment: proxy.component_assessment.capital },
35944
+ { name: "asset_quality", assessment: proxy.component_assessment.asset_quality },
35945
+ { name: "earnings", assessment: proxy.component_assessment.earnings },
35946
+ { name: "liquidity_funding", assessment: proxy.component_assessment.liquidity_funding },
35947
+ { name: "sensitivity_proxy", assessment: proxy.component_assessment.sensitivity_proxy }
35948
+ ];
35949
+ const riskSignalSeverities = {};
35950
+ for (const signal of proxy.risk_signals) {
35951
+ riskSignalSeverities[signal.severity] = (riskSignalSeverities[signal.severity] ?? 0) + 1;
35952
+ }
35953
+ return {
35954
+ model: proxy.model,
35955
+ official_status: proxy.official_status,
35956
+ score: proxy.overall.score,
35957
+ band: proxy.overall.band,
35958
+ components: componentEntries.map(({ name, assessment }) => ({
35959
+ name,
35960
+ label: assessment.label,
35961
+ score: assessment.score,
35962
+ legacy_rating: assessment.legacy_rating,
35963
+ legacy_label: assessment.legacy_label,
35964
+ flags: assessment.flags
35965
+ })),
35966
+ capital_classification: {
35967
+ category: proxy.capital_classification.category,
35968
+ label: proxy.capital_classification.label,
35969
+ binding_constraint: proxy.capital_classification.binding_constraint ?? null,
35970
+ ratios_used: proxy.capital_classification.ratios_used
35971
+ },
35972
+ management_overlay: {
35973
+ level: proxy.management_overlay.level,
35974
+ caps_band: proxy.management_overlay.caps_band,
35975
+ reason_codes: proxy.management_overlay.reason_codes
35976
+ },
35977
+ risk_signal_count: proxy.risk_signals.length,
35978
+ risk_signal_severities: riskSignalSeverities,
35979
+ trend_count: proxy.trend_insights.length,
35980
+ data_quality: proxy.data_quality
35981
+ };
35982
+ }
35887
35983
  var PeerHealthInputSchema = import_zod11.z.object({
35888
35984
  cert: import_zod11.z.number().int().positive().optional().describe("Subject institution CERT to highlight in the ranking. Optional."),
35889
35985
  certs: import_zod11.z.array(import_zod11.z.number().int().positive()).max(50).optional().describe("Explicit list of CERTs to compare (max 50)."),
@@ -35918,7 +36014,7 @@ Three usage modes:
35918
36014
 
35919
36015
  Optionally provide cert to highlight a subject institution's position in the ranking.
35920
36016
 
35921
- Output: structuredContent includes {model, official_status, report_date, institutions, metrics, peer_context, proxy}. Institutions include proxy scores and name_source. When a subject cert is provided, metrics is a flat subject-vs-peer array for UI binding while peer_context preserves the legacy nested percentiles and weighted averages. Auto-peer selection derives asset bands from report-date financials and broadens the cohort if fewer than 10 peers match.
36017
+ Output: structuredContent includes {model, official_status, report_date, institutions, metrics, peer_context, proxy_summary, proxy}. Institutions include proxy scores and name_source. When a subject cert is provided, metrics is a flat subject-vs-peer array and proxy_summary is a flattened subject proxy for UI binding while peer_context and proxy preserve the legacy detailed payloads. Auto-peer selection derives asset bands from report-date financials and broadens the cohort if fewer than 10 peers match.
35922
36018
 
35923
36019
  NOTE: Public off-site analytical proxy \u2014 not official supervisory ratings.`,
35924
36020
  inputSchema: PeerHealthInputSchema,
@@ -36307,6 +36403,7 @@ NOTE: Public off-site analytical proxy \u2014 not official supervisory ratings.`
36307
36403
  model: "public_camels_proxy_v1",
36308
36404
  official_status: "public off-site proxy, not official CAMELS",
36309
36405
  proxy: subjectProxy,
36406
+ proxy_summary: buildProxySummary(subjectProxy),
36310
36407
  report_date: params.repdte,
36311
36408
  sort_by: params.sort_by,
36312
36409
  total_institutions: entries.length,
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.26.0" : process.env.npm_package_version ?? "0.0.0-dev";
50
+ var VERSION = true ? "1.28.0" : 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;
@@ -31978,6 +31978,21 @@ var CertSchema = import_zod.z.object({
31978
31978
  // src/schemas/output.ts
31979
31979
  var import_zod2 = require("zod");
31980
31980
  var FdicRecord = import_zod2.z.record(import_zod2.z.unknown());
31981
+ var FdicFinancialRecord = import_zod2.z.object({
31982
+ CERT: import_zod2.z.number().int().optional(),
31983
+ NAME: import_zod2.z.string().optional(),
31984
+ REPDTE: import_zod2.z.union([import_zod2.z.string(), import_zod2.z.number()]).optional(),
31985
+ ASSET: import_zod2.z.number().optional(),
31986
+ DEP: import_zod2.z.number().optional(),
31987
+ NETINC: import_zod2.z.number().optional(),
31988
+ ROA: import_zod2.z.number().optional(),
31989
+ ROE: import_zod2.z.number().optional(),
31990
+ IDT1CER: import_zod2.z.number().optional(),
31991
+ NCLNLSR: import_zod2.z.number().optional(),
31992
+ LNLSDEPR: import_zod2.z.number().optional(),
31993
+ NIMY: import_zod2.z.number().optional(),
31994
+ EEFFR: import_zod2.z.number().optional()
31995
+ }).passthrough();
31981
31996
  var Pagination = {
31982
31997
  total: import_zod2.z.number().int(),
31983
31998
  offset: import_zod2.z.number().int(),
@@ -31985,10 +32000,10 @@ var Pagination = {
31985
32000
  has_more: import_zod2.z.boolean(),
31986
32001
  next_offset: import_zod2.z.number().int().optional()
31987
32002
  };
31988
- function paginatedSearchSchema(recordKey) {
32003
+ function paginatedSearchSchema(recordKey, recordSchema = FdicRecord) {
31989
32004
  return import_zod2.z.object({
31990
32005
  ...Pagination,
31991
- [recordKey]: import_zod2.z.array(FdicRecord),
32006
+ [recordKey]: import_zod2.z.array(recordSchema),
31992
32007
  truncated: import_zod2.z.boolean().optional()
31993
32008
  });
31994
32009
  }
@@ -31999,7 +32014,8 @@ var FdicFailuresSearchOutputSchema = paginatedSearchSchema("failures");
31999
32014
  var FdicLocationsSearchOutputSchema = paginatedSearchSchema("locations");
32000
32015
  var FdicHistorySearchOutputSchema = paginatedSearchSchema("events");
32001
32016
  var FdicFinancialsSearchOutputSchema = paginatedSearchSchema(
32002
- "financials"
32017
+ "financials",
32018
+ FdicFinancialRecord
32003
32019
  );
32004
32020
  var FdicSummarySearchOutputSchema = paginatedSearchSchema("summary");
32005
32021
  var FdicSodSearchOutputSchema = paginatedSearchSchema("deposits");
@@ -32093,10 +32109,47 @@ var PeerHealthInstitutionSchema = import_zod2.z.object({
32093
32109
  component_ratings: import_zod2.z.record(import_zod2.z.number()),
32094
32110
  flags: import_zod2.z.array(import_zod2.z.string())
32095
32111
  });
32112
+ var PeerHealthProxySummarySchema = import_zod2.z.object({
32113
+ model: import_zod2.z.literal("public_camels_proxy_v1"),
32114
+ official_status: import_zod2.z.literal("public off-site proxy, not official CAMELS"),
32115
+ score: import_zod2.z.number(),
32116
+ band: import_zod2.z.string(),
32117
+ components: import_zod2.z.array(
32118
+ import_zod2.z.object({
32119
+ name: import_zod2.z.string(),
32120
+ label: import_zod2.z.string(),
32121
+ score: import_zod2.z.number(),
32122
+ legacy_rating: import_zod2.z.number(),
32123
+ legacy_label: import_zod2.z.string(),
32124
+ flags: import_zod2.z.array(import_zod2.z.string())
32125
+ })
32126
+ ),
32127
+ capital_classification: import_zod2.z.object({
32128
+ category: import_zod2.z.string(),
32129
+ label: import_zod2.z.string(),
32130
+ binding_constraint: import_zod2.z.string().nullable(),
32131
+ ratios_used: import_zod2.z.record(import_zod2.z.number().nullable())
32132
+ }),
32133
+ management_overlay: import_zod2.z.object({
32134
+ level: import_zod2.z.string(),
32135
+ caps_band: import_zod2.z.boolean(),
32136
+ reason_codes: import_zod2.z.array(import_zod2.z.string())
32137
+ }),
32138
+ risk_signal_count: import_zod2.z.number().int(),
32139
+ risk_signal_severities: import_zod2.z.record(import_zod2.z.number().int()),
32140
+ trend_count: import_zod2.z.number().int(),
32141
+ data_quality: import_zod2.z.object({
32142
+ report_date: import_zod2.z.string(),
32143
+ staleness: import_zod2.z.string(),
32144
+ gaps_count: import_zod2.z.number().int(),
32145
+ gaps: import_zod2.z.array(import_zod2.z.string())
32146
+ })
32147
+ });
32096
32148
  var FdicPeerHealthOutputSchema = import_zod2.z.object({
32097
32149
  model: import_zod2.z.literal("public_camels_proxy_v1"),
32098
32150
  official_status: import_zod2.z.literal("public off-site proxy, not official CAMELS"),
32099
32151
  proxy: import_zod2.z.unknown().nullable(),
32152
+ proxy_summary: PeerHealthProxySummarySchema.nullable(),
32100
32153
  report_date: import_zod2.z.string(),
32101
32154
  sort_by: import_zod2.z.string(),
32102
32155
  total_institutions: import_zod2.z.number().int(),
@@ -35899,6 +35952,49 @@ var PEER_METRICS = [
35899
35952
  { key: "efficiencyRatioPct", legacyKey: "efficiencyRatioPct", name: "efficiency_ratio_pct", label: "Efficiency ratio", higherIsBetter: false },
35900
35953
  { key: "loanToDepositPct", legacyKey: "loanToDepositPct", name: "loan_to_deposit_pct", label: "Loan-to-deposit ratio", higherIsBetter: false }
35901
35954
  ];
35955
+ function buildProxySummary(proxy) {
35956
+ if (!proxy) return null;
35957
+ const componentEntries = [
35958
+ { name: "capital", assessment: proxy.component_assessment.capital },
35959
+ { name: "asset_quality", assessment: proxy.component_assessment.asset_quality },
35960
+ { name: "earnings", assessment: proxy.component_assessment.earnings },
35961
+ { name: "liquidity_funding", assessment: proxy.component_assessment.liquidity_funding },
35962
+ { name: "sensitivity_proxy", assessment: proxy.component_assessment.sensitivity_proxy }
35963
+ ];
35964
+ const riskSignalSeverities = {};
35965
+ for (const signal of proxy.risk_signals) {
35966
+ riskSignalSeverities[signal.severity] = (riskSignalSeverities[signal.severity] ?? 0) + 1;
35967
+ }
35968
+ return {
35969
+ model: proxy.model,
35970
+ official_status: proxy.official_status,
35971
+ score: proxy.overall.score,
35972
+ band: proxy.overall.band,
35973
+ components: componentEntries.map(({ name, assessment }) => ({
35974
+ name,
35975
+ label: assessment.label,
35976
+ score: assessment.score,
35977
+ legacy_rating: assessment.legacy_rating,
35978
+ legacy_label: assessment.legacy_label,
35979
+ flags: assessment.flags
35980
+ })),
35981
+ capital_classification: {
35982
+ category: proxy.capital_classification.category,
35983
+ label: proxy.capital_classification.label,
35984
+ binding_constraint: proxy.capital_classification.binding_constraint ?? null,
35985
+ ratios_used: proxy.capital_classification.ratios_used
35986
+ },
35987
+ management_overlay: {
35988
+ level: proxy.management_overlay.level,
35989
+ caps_band: proxy.management_overlay.caps_band,
35990
+ reason_codes: proxy.management_overlay.reason_codes
35991
+ },
35992
+ risk_signal_count: proxy.risk_signals.length,
35993
+ risk_signal_severities: riskSignalSeverities,
35994
+ trend_count: proxy.trend_insights.length,
35995
+ data_quality: proxy.data_quality
35996
+ };
35997
+ }
35902
35998
  var PeerHealthInputSchema = import_zod11.z.object({
35903
35999
  cert: import_zod11.z.number().int().positive().optional().describe("Subject institution CERT to highlight in the ranking. Optional."),
35904
36000
  certs: import_zod11.z.array(import_zod11.z.number().int().positive()).max(50).optional().describe("Explicit list of CERTs to compare (max 50)."),
@@ -35933,7 +36029,7 @@ Three usage modes:
35933
36029
 
35934
36030
  Optionally provide cert to highlight a subject institution's position in the ranking.
35935
36031
 
35936
- Output: structuredContent includes {model, official_status, report_date, institutions, metrics, peer_context, proxy}. Institutions include proxy scores and name_source. When a subject cert is provided, metrics is a flat subject-vs-peer array for UI binding while peer_context preserves the legacy nested percentiles and weighted averages. Auto-peer selection derives asset bands from report-date financials and broadens the cohort if fewer than 10 peers match.
36032
+ Output: structuredContent includes {model, official_status, report_date, institutions, metrics, peer_context, proxy_summary, proxy}. Institutions include proxy scores and name_source. When a subject cert is provided, metrics is a flat subject-vs-peer array and proxy_summary is a flattened subject proxy for UI binding while peer_context and proxy preserve the legacy detailed payloads. Auto-peer selection derives asset bands from report-date financials and broadens the cohort if fewer than 10 peers match.
35937
36033
 
35938
36034
  NOTE: Public off-site analytical proxy \u2014 not official supervisory ratings.`,
35939
36035
  inputSchema: PeerHealthInputSchema,
@@ -36322,6 +36418,7 @@ NOTE: Public off-site analytical proxy \u2014 not official supervisory ratings.`
36322
36418
  model: "public_camels_proxy_v1",
36323
36419
  official_status: "public off-site proxy, not official CAMELS",
36324
36420
  proxy: subjectProxy,
36421
+ proxy_summary: buildProxySummary(subjectProxy),
36325
36422
  report_date: params.repdte,
36326
36423
  sort_by: params.sort_by,
36327
36424
  total_institutions: entries.length,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fdic-mcp-server",
3
- "version": "1.26.0",
3
+ "version": "1.28.0",
4
4
  "description": "MCP server for the FDIC BankFind Suite API",
5
5
  "mcpName": "io.github.jflamb/fdic-mcp-server",
6
6
  "main": "dist/server.js",