Skip to main content

Overview

The Model Context Protocol (MCP) allows you to connect DebtStack directly to Claude Desktop, Claude Code, Cursor, and other MCP-compatible clients, giving them access to corporate debt data in natural conversations.

Installation

pip install debtstack-ai[mcp]
This installs the debtstack-mcp command-line server and all required dependencies.

Client Configuration

Claude Desktop

Add to your Claude Desktop config: macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "debtstack-ai": {
      "command": "debtstack-mcp",
      "env": {
        "DEBTSTACK_API_KEY": "ds_xxxxx"
      }
    }
  }
}

Claude Code

Add to ~/.claude/mcp.json:
{
  "mcpServers": {
    "debtstack-ai": {
      "command": "debtstack-mcp",
      "env": {
        "DEBTSTACK_API_KEY": "ds_xxxxx"
      }
    }
  }
}

Cursor

Add to .cursor/mcp.json:
{
  "mcpServers": {
    "debtstack-ai": {
      "command": "debtstack-mcp",
      "env": {
        "DEBTSTACK_API_KEY": "ds_xxxxx"
      }
    }
  }
}

Alternative: Python Module

If you prefer not to use the console script, run with python -m instead:
{
  "mcpServers": {
    "debtstack-ai": {
      "command": "python",
      "args": ["-m", "debtstack.mcp_server"],
      "env": {
        "DEBTSTACK_API_KEY": "ds_xxxxx"
      }
    }
  }
}
After saving the configuration, restart your MCP client to load the DebtStack server.

Available Tools

Once configured, Claude has access to 8 DebtStack tools:
ToolDescription
search_companiesSearch companies by ticker, sector, leverage ratio, and risk flags
search_bondsSearch bonds by ticker, seniority, yield, spread, and maturity
resolve_bondLook up a bond by CUSIP, ISIN, or description (e.g., “RIG 8% 2027”)
get_guarantorsFind all entities that guarantee a bond
get_corporate_structureGet full parent-subsidiary hierarchy for a company
search_pricingGet FINRA TRACE bond prices, YTM, and spreads
search_documentsSearch SEC filing sections (debt footnotes, credit agreements, indentures)
get_changesSee what changed in a company’s debt structure since a date

Example Conversations

Leverage Analysis

You: Which of the MAG7 companies has the highest leverage? Claude: Let me search for the MAG7 companies and compare their leverage ratios. [Uses search_companies tool] Based on my search, here are the MAG7 companies ranked by net leverage ratio…

Bond Screening

You: Find me senior secured bonds yielding more than 8% Claude: I’ll search for high-yield secured bonds. [Uses search_bonds tool] I found several bonds matching your criteria. Here are the top results:
  • RIG 8.00% Senior Secured Notes due 2027: 9.42% YTM

Structural Analysis

You: Who guarantees Transocean’s 8% 2027 notes? Claude: Let me look up that bond and check its guarantee structure. [Uses resolve_bond tool, then get_guarantors tool] The 8.00% Senior Secured Notes due 2027 (CUSIP: 893830AK8) are guaranteed by 47 entities including Transocean Inc., Transocean Offshore Deepwater Drilling Inc., and Triton Holding Company…

Corporate Structure

You: Show me RIG’s corporate structure — where does the debt sit? Claude: Let me pull up the full corporate hierarchy. [Uses get_corporate_structure tool] Transocean Ltd. has 230 entities in its corporate structure. The debt is primarily issued at…

Covenant Research

You: What are Charter’s leverage covenants? Claude: I’ll search Charter’s SEC filings for covenant details. [Uses search_documents tool] Based on Charter’s credit agreement filings, the key leverage covenants are…

Change Tracking

You: What changed in CVS’s debt structure since June 2025? Claude: Let me check for recent changes. [Uses get_changes tool] Since June 2025, CVS has had the following changes to its debt structure…

More Example Queries

Here are additional questions you can ask Claude with the DebtStack MCP server:
  • “Which energy companies have near-term maturities and high leverage?”
  • “Compare Charter’s debt structure to Altice”
  • “Find all bonds maturing before 2026 with yield above 7%”
  • “What are the change-of-control provisions in Altice’s indentures?”
  • “Search for restricted payment language in RIG’s credit agreements”
  • “Which companies in the telecom sector have structural subordination?”
  • “How has ORCL’s leverage changed since their Cerner acquisition?”

Troubleshooting

Server Not Loading

  1. Verify the package is installed: pip show debtstack-ai
  2. Check the console script exists: debtstack-mcp --help (should fail with missing API key, not “command not found”)
  3. Ensure your API key is set correctly in the config
  4. Check your MCP client logs for errors

API Errors

If you see API errors, verify:
  1. Your API key is valid (starts with ds_)
  2. You have credits remaining (check at debtstack.ai/dashboard)
  3. You’re not exceeding rate limits (60/min for Pay-as-You-Go, 100/min for Pro)

Debugging

Enable verbose logging by setting the DEBUG environment variable:
{
  "mcpServers": {
    "debtstack-ai": {
      "command": "debtstack-mcp",
      "env": {
        "DEBTSTACK_API_KEY": "ds_xxxxx",
        "DEBUG": "true"
      }
    }
  }
}

Next Steps