fdic-mcp-server 1.26.0 → 1.27.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 +83 -2
- package/dist/server.js +83 -2
- 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.
|
|
35
|
+
var VERSION = true ? "1.27.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;
|
|
@@ -32078,10 +32078,47 @@ var PeerHealthInstitutionSchema = import_zod2.z.object({
|
|
|
32078
32078
|
component_ratings: import_zod2.z.record(import_zod2.z.number()),
|
|
32079
32079
|
flags: import_zod2.z.array(import_zod2.z.string())
|
|
32080
32080
|
});
|
|
32081
|
+
var PeerHealthProxySummarySchema = import_zod2.z.object({
|
|
32082
|
+
model: import_zod2.z.literal("public_camels_proxy_v1"),
|
|
32083
|
+
official_status: import_zod2.z.literal("public off-site proxy, not official CAMELS"),
|
|
32084
|
+
score: import_zod2.z.number(),
|
|
32085
|
+
band: import_zod2.z.string(),
|
|
32086
|
+
components: import_zod2.z.array(
|
|
32087
|
+
import_zod2.z.object({
|
|
32088
|
+
name: import_zod2.z.string(),
|
|
32089
|
+
label: import_zod2.z.string(),
|
|
32090
|
+
score: import_zod2.z.number(),
|
|
32091
|
+
legacy_rating: import_zod2.z.number(),
|
|
32092
|
+
legacy_label: import_zod2.z.string(),
|
|
32093
|
+
flags: import_zod2.z.array(import_zod2.z.string())
|
|
32094
|
+
})
|
|
32095
|
+
),
|
|
32096
|
+
capital_classification: import_zod2.z.object({
|
|
32097
|
+
category: import_zod2.z.string(),
|
|
32098
|
+
label: import_zod2.z.string(),
|
|
32099
|
+
binding_constraint: import_zod2.z.string().nullable(),
|
|
32100
|
+
ratios_used: import_zod2.z.record(import_zod2.z.number().nullable())
|
|
32101
|
+
}),
|
|
32102
|
+
management_overlay: import_zod2.z.object({
|
|
32103
|
+
level: import_zod2.z.string(),
|
|
32104
|
+
caps_band: import_zod2.z.boolean(),
|
|
32105
|
+
reason_codes: import_zod2.z.array(import_zod2.z.string())
|
|
32106
|
+
}),
|
|
32107
|
+
risk_signal_count: import_zod2.z.number().int(),
|
|
32108
|
+
risk_signal_severities: import_zod2.z.record(import_zod2.z.number().int()),
|
|
32109
|
+
trend_count: import_zod2.z.number().int(),
|
|
32110
|
+
data_quality: import_zod2.z.object({
|
|
32111
|
+
report_date: import_zod2.z.string(),
|
|
32112
|
+
staleness: import_zod2.z.string(),
|
|
32113
|
+
gaps_count: import_zod2.z.number().int(),
|
|
32114
|
+
gaps: import_zod2.z.array(import_zod2.z.string())
|
|
32115
|
+
})
|
|
32116
|
+
});
|
|
32081
32117
|
var FdicPeerHealthOutputSchema = import_zod2.z.object({
|
|
32082
32118
|
model: import_zod2.z.literal("public_camels_proxy_v1"),
|
|
32083
32119
|
official_status: import_zod2.z.literal("public off-site proxy, not official CAMELS"),
|
|
32084
32120
|
proxy: import_zod2.z.unknown().nullable(),
|
|
32121
|
+
proxy_summary: PeerHealthProxySummarySchema.nullable(),
|
|
32085
32122
|
report_date: import_zod2.z.string(),
|
|
32086
32123
|
sort_by: import_zod2.z.string(),
|
|
32087
32124
|
total_institutions: import_zod2.z.number().int(),
|
|
@@ -35884,6 +35921,49 @@ var PEER_METRICS = [
|
|
|
35884
35921
|
{ key: "efficiencyRatioPct", legacyKey: "efficiencyRatioPct", name: "efficiency_ratio_pct", label: "Efficiency ratio", higherIsBetter: false },
|
|
35885
35922
|
{ key: "loanToDepositPct", legacyKey: "loanToDepositPct", name: "loan_to_deposit_pct", label: "Loan-to-deposit ratio", higherIsBetter: false }
|
|
35886
35923
|
];
|
|
35924
|
+
function buildProxySummary(proxy) {
|
|
35925
|
+
if (!proxy) return null;
|
|
35926
|
+
const componentEntries = [
|
|
35927
|
+
{ name: "capital", assessment: proxy.component_assessment.capital },
|
|
35928
|
+
{ name: "asset_quality", assessment: proxy.component_assessment.asset_quality },
|
|
35929
|
+
{ name: "earnings", assessment: proxy.component_assessment.earnings },
|
|
35930
|
+
{ name: "liquidity_funding", assessment: proxy.component_assessment.liquidity_funding },
|
|
35931
|
+
{ name: "sensitivity_proxy", assessment: proxy.component_assessment.sensitivity_proxy }
|
|
35932
|
+
];
|
|
35933
|
+
const riskSignalSeverities = {};
|
|
35934
|
+
for (const signal of proxy.risk_signals) {
|
|
35935
|
+
riskSignalSeverities[signal.severity] = (riskSignalSeverities[signal.severity] ?? 0) + 1;
|
|
35936
|
+
}
|
|
35937
|
+
return {
|
|
35938
|
+
model: proxy.model,
|
|
35939
|
+
official_status: proxy.official_status,
|
|
35940
|
+
score: proxy.overall.score,
|
|
35941
|
+
band: proxy.overall.band,
|
|
35942
|
+
components: componentEntries.map(({ name, assessment }) => ({
|
|
35943
|
+
name,
|
|
35944
|
+
label: assessment.label,
|
|
35945
|
+
score: assessment.score,
|
|
35946
|
+
legacy_rating: assessment.legacy_rating,
|
|
35947
|
+
legacy_label: assessment.legacy_label,
|
|
35948
|
+
flags: assessment.flags
|
|
35949
|
+
})),
|
|
35950
|
+
capital_classification: {
|
|
35951
|
+
category: proxy.capital_classification.category,
|
|
35952
|
+
label: proxy.capital_classification.label,
|
|
35953
|
+
binding_constraint: proxy.capital_classification.binding_constraint ?? null,
|
|
35954
|
+
ratios_used: proxy.capital_classification.ratios_used
|
|
35955
|
+
},
|
|
35956
|
+
management_overlay: {
|
|
35957
|
+
level: proxy.management_overlay.level,
|
|
35958
|
+
caps_band: proxy.management_overlay.caps_band,
|
|
35959
|
+
reason_codes: proxy.management_overlay.reason_codes
|
|
35960
|
+
},
|
|
35961
|
+
risk_signal_count: proxy.risk_signals.length,
|
|
35962
|
+
risk_signal_severities: riskSignalSeverities,
|
|
35963
|
+
trend_count: proxy.trend_insights.length,
|
|
35964
|
+
data_quality: proxy.data_quality
|
|
35965
|
+
};
|
|
35966
|
+
}
|
|
35887
35967
|
var PeerHealthInputSchema = import_zod11.z.object({
|
|
35888
35968
|
cert: import_zod11.z.number().int().positive().optional().describe("Subject institution CERT to highlight in the ranking. Optional."),
|
|
35889
35969
|
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 +35998,7 @@ Three usage modes:
|
|
|
35918
35998
|
|
|
35919
35999
|
Optionally provide cert to highlight a subject institution's position in the ranking.
|
|
35920
36000
|
|
|
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
|
|
36001
|
+
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
36002
|
|
|
35923
36003
|
NOTE: Public off-site analytical proxy \u2014 not official supervisory ratings.`,
|
|
35924
36004
|
inputSchema: PeerHealthInputSchema,
|
|
@@ -36307,6 +36387,7 @@ NOTE: Public off-site analytical proxy \u2014 not official supervisory ratings.`
|
|
|
36307
36387
|
model: "public_camels_proxy_v1",
|
|
36308
36388
|
official_status: "public off-site proxy, not official CAMELS",
|
|
36309
36389
|
proxy: subjectProxy,
|
|
36390
|
+
proxy_summary: buildProxySummary(subjectProxy),
|
|
36310
36391
|
report_date: params.repdte,
|
|
36311
36392
|
sort_by: params.sort_by,
|
|
36312
36393
|
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.
|
|
50
|
+
var VERSION = true ? "1.27.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;
|
|
@@ -32093,10 +32093,47 @@ var PeerHealthInstitutionSchema = import_zod2.z.object({
|
|
|
32093
32093
|
component_ratings: import_zod2.z.record(import_zod2.z.number()),
|
|
32094
32094
|
flags: import_zod2.z.array(import_zod2.z.string())
|
|
32095
32095
|
});
|
|
32096
|
+
var PeerHealthProxySummarySchema = import_zod2.z.object({
|
|
32097
|
+
model: import_zod2.z.literal("public_camels_proxy_v1"),
|
|
32098
|
+
official_status: import_zod2.z.literal("public off-site proxy, not official CAMELS"),
|
|
32099
|
+
score: import_zod2.z.number(),
|
|
32100
|
+
band: import_zod2.z.string(),
|
|
32101
|
+
components: import_zod2.z.array(
|
|
32102
|
+
import_zod2.z.object({
|
|
32103
|
+
name: import_zod2.z.string(),
|
|
32104
|
+
label: import_zod2.z.string(),
|
|
32105
|
+
score: import_zod2.z.number(),
|
|
32106
|
+
legacy_rating: import_zod2.z.number(),
|
|
32107
|
+
legacy_label: import_zod2.z.string(),
|
|
32108
|
+
flags: import_zod2.z.array(import_zod2.z.string())
|
|
32109
|
+
})
|
|
32110
|
+
),
|
|
32111
|
+
capital_classification: import_zod2.z.object({
|
|
32112
|
+
category: import_zod2.z.string(),
|
|
32113
|
+
label: import_zod2.z.string(),
|
|
32114
|
+
binding_constraint: import_zod2.z.string().nullable(),
|
|
32115
|
+
ratios_used: import_zod2.z.record(import_zod2.z.number().nullable())
|
|
32116
|
+
}),
|
|
32117
|
+
management_overlay: import_zod2.z.object({
|
|
32118
|
+
level: import_zod2.z.string(),
|
|
32119
|
+
caps_band: import_zod2.z.boolean(),
|
|
32120
|
+
reason_codes: import_zod2.z.array(import_zod2.z.string())
|
|
32121
|
+
}),
|
|
32122
|
+
risk_signal_count: import_zod2.z.number().int(),
|
|
32123
|
+
risk_signal_severities: import_zod2.z.record(import_zod2.z.number().int()),
|
|
32124
|
+
trend_count: import_zod2.z.number().int(),
|
|
32125
|
+
data_quality: import_zod2.z.object({
|
|
32126
|
+
report_date: import_zod2.z.string(),
|
|
32127
|
+
staleness: import_zod2.z.string(),
|
|
32128
|
+
gaps_count: import_zod2.z.number().int(),
|
|
32129
|
+
gaps: import_zod2.z.array(import_zod2.z.string())
|
|
32130
|
+
})
|
|
32131
|
+
});
|
|
32096
32132
|
var FdicPeerHealthOutputSchema = import_zod2.z.object({
|
|
32097
32133
|
model: import_zod2.z.literal("public_camels_proxy_v1"),
|
|
32098
32134
|
official_status: import_zod2.z.literal("public off-site proxy, not official CAMELS"),
|
|
32099
32135
|
proxy: import_zod2.z.unknown().nullable(),
|
|
32136
|
+
proxy_summary: PeerHealthProxySummarySchema.nullable(),
|
|
32100
32137
|
report_date: import_zod2.z.string(),
|
|
32101
32138
|
sort_by: import_zod2.z.string(),
|
|
32102
32139
|
total_institutions: import_zod2.z.number().int(),
|
|
@@ -35899,6 +35936,49 @@ var PEER_METRICS = [
|
|
|
35899
35936
|
{ key: "efficiencyRatioPct", legacyKey: "efficiencyRatioPct", name: "efficiency_ratio_pct", label: "Efficiency ratio", higherIsBetter: false },
|
|
35900
35937
|
{ key: "loanToDepositPct", legacyKey: "loanToDepositPct", name: "loan_to_deposit_pct", label: "Loan-to-deposit ratio", higherIsBetter: false }
|
|
35901
35938
|
];
|
|
35939
|
+
function buildProxySummary(proxy) {
|
|
35940
|
+
if (!proxy) return null;
|
|
35941
|
+
const componentEntries = [
|
|
35942
|
+
{ name: "capital", assessment: proxy.component_assessment.capital },
|
|
35943
|
+
{ name: "asset_quality", assessment: proxy.component_assessment.asset_quality },
|
|
35944
|
+
{ name: "earnings", assessment: proxy.component_assessment.earnings },
|
|
35945
|
+
{ name: "liquidity_funding", assessment: proxy.component_assessment.liquidity_funding },
|
|
35946
|
+
{ name: "sensitivity_proxy", assessment: proxy.component_assessment.sensitivity_proxy }
|
|
35947
|
+
];
|
|
35948
|
+
const riskSignalSeverities = {};
|
|
35949
|
+
for (const signal of proxy.risk_signals) {
|
|
35950
|
+
riskSignalSeverities[signal.severity] = (riskSignalSeverities[signal.severity] ?? 0) + 1;
|
|
35951
|
+
}
|
|
35952
|
+
return {
|
|
35953
|
+
model: proxy.model,
|
|
35954
|
+
official_status: proxy.official_status,
|
|
35955
|
+
score: proxy.overall.score,
|
|
35956
|
+
band: proxy.overall.band,
|
|
35957
|
+
components: componentEntries.map(({ name, assessment }) => ({
|
|
35958
|
+
name,
|
|
35959
|
+
label: assessment.label,
|
|
35960
|
+
score: assessment.score,
|
|
35961
|
+
legacy_rating: assessment.legacy_rating,
|
|
35962
|
+
legacy_label: assessment.legacy_label,
|
|
35963
|
+
flags: assessment.flags
|
|
35964
|
+
})),
|
|
35965
|
+
capital_classification: {
|
|
35966
|
+
category: proxy.capital_classification.category,
|
|
35967
|
+
label: proxy.capital_classification.label,
|
|
35968
|
+
binding_constraint: proxy.capital_classification.binding_constraint ?? null,
|
|
35969
|
+
ratios_used: proxy.capital_classification.ratios_used
|
|
35970
|
+
},
|
|
35971
|
+
management_overlay: {
|
|
35972
|
+
level: proxy.management_overlay.level,
|
|
35973
|
+
caps_band: proxy.management_overlay.caps_band,
|
|
35974
|
+
reason_codes: proxy.management_overlay.reason_codes
|
|
35975
|
+
},
|
|
35976
|
+
risk_signal_count: proxy.risk_signals.length,
|
|
35977
|
+
risk_signal_severities: riskSignalSeverities,
|
|
35978
|
+
trend_count: proxy.trend_insights.length,
|
|
35979
|
+
data_quality: proxy.data_quality
|
|
35980
|
+
};
|
|
35981
|
+
}
|
|
35902
35982
|
var PeerHealthInputSchema = import_zod11.z.object({
|
|
35903
35983
|
cert: import_zod11.z.number().int().positive().optional().describe("Subject institution CERT to highlight in the ranking. Optional."),
|
|
35904
35984
|
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 +36013,7 @@ Three usage modes:
|
|
|
35933
36013
|
|
|
35934
36014
|
Optionally provide cert to highlight a subject institution's position in the ranking.
|
|
35935
36015
|
|
|
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
|
|
36016
|
+
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
36017
|
|
|
35938
36018
|
NOTE: Public off-site analytical proxy \u2014 not official supervisory ratings.`,
|
|
35939
36019
|
inputSchema: PeerHealthInputSchema,
|
|
@@ -36322,6 +36402,7 @@ NOTE: Public off-site analytical proxy \u2014 not official supervisory ratings.`
|
|
|
36322
36402
|
model: "public_camels_proxy_v1",
|
|
36323
36403
|
official_status: "public off-site proxy, not official CAMELS",
|
|
36324
36404
|
proxy: subjectProxy,
|
|
36405
|
+
proxy_summary: buildProxySummary(subjectProxy),
|
|
36325
36406
|
report_date: params.repdte,
|
|
36326
36407
|
sort_by: params.sort_by,
|
|
36327
36408
|
total_institutions: entries.length,
|