Skip to main content
Glama
pranav797

Credit Risk MCP Server

by pranav797

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MCP_ALLOWED_HOSTSNoComma-separated list of allowed Host headers. By default any host is allowed.
CREDIT_RISK_API_KEYYesBearer key required for HTTP mode. Set as a secret for remote deployment.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
score_borrowerA

Estimate a loan applicant's probability of default.

Use this to get a single risk number for one borrower. Describe the applicant in plain terms — only annual income and loan amount are required; every other field falls back to the population median when omitted.

Returns a dict with:

  • default_probability: estimated probability of default (0-1)

  • risk_tier: "low" / "moderate" / "elevated" / "high"

  • flag_default: True if the probability is at or above the 0.15 decision threshold (this model is tuned for recall, not a 50% cutoff)

  • threshold_used: the decision threshold (0.15)

  • fields_defaulted: which optional fields fell back to medians

Educational model trained on a Kaggle dataset — not real lending advice.

explain_predictionA

Explain a default-risk prediction: which factors push risk up or down.

Use this when the user wants the "why" behind a score, not just the number. Runs SHAP on the single applicant and returns the strongest contributing features with human-readable names.

Args: profile: the applicant to explain. top_n: how many contributing factors to return (default 8).

Returns a dict with default_probability, risk_tier, and top_factors — a list of {feature, friendly_name, value, shap_contribution, direction} ordered by impact, where direction is "increases risk" or "decreases risk".

Educational model — not real lending advice.

get_model_infoA

Describe the model itself: type, performance, and limitations.

Use this to answer questions about how good the model is or how it should be used — no borrower needed. Returns model type, feature count, training size, AUC-ROC, precision/recall at the 0.50 and 0.15 thresholds, the recommended threshold, and an honest limitations note (educational, not real lending advice).

get_feature_importanceA

Return the model's globally most important features (by mean |SHAP|).

Use this for "what drives this model overall?" questions, as opposed to the reasons behind one borrower's score. Returns {"top_features": [...]} ranked by average absolute SHAP impact across a sample, each entry carrying its raw name, a friendly name, and its importance score.

Args: top_n: how many features to return (default 10).

compare_borrowersA

Score several applicants at once and rank them from most to least risky.

Use this to compare a batch of borrowers side by side. Each profile is scored exactly like score_borrower.

Args: profiles: two or more applicants to compare.

Returns {"ranked": [...]} sorted by default_probability descending. Each entry has: rank (1 = riskiest), index (position in the input list), default_probability, and risk_tier.

Educational model — not real lending advice.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.5/5.0

Scored across 5 tools

Disambiguation5/5

Each tool targets a distinct purpose: score_borrower (single), compare_borrowers (batch ranking), explain_prediction (local SHAP), get_feature_importance (global SHAP), and get_model_info (metadata). The descriptions explicitly contrast overlapping-sounding pairs like global feature importance vs per-borrower explanation, leaving no realistic selection ambiguity.

Naming Consistency5/5

All five names follow a clean verb_noun snake_case pattern (get_feature_importance, compare_borrowers, get_model_info, score_borrower, explain_prediction). The verbs are apt and used consistently with no mixing of conventions.

Tool Count5/5

Five tools is a well-scoped set for a model-inference domain, with each tool earning a distinct role (score, compare, explain, global importance, metadata). Nothing is redundant or missing for the apparent purpose.

Completeness5/5

The surface fully covers the inference lifecycle: single scoring, batch comparison, per-prediction explanation, global feature importance, and model metadata/limitations. As a stateless scoring service there are no CRUD gaps, and the tools form a coherent complete workflow.