counterparty-credit
상대방 신용(Counterparty Credit)
공개 데이터에서 공공 에너지 기업의 신용 건전성을 평가하는 개방적이고 투명한 MCP 서버입니다. 에이전트에게 유틸리티, 발전사, 중간유통 사업자, 전력/가스 마케터의 건전성을 물어보세요. Counterparty Credit은 0–100점의 점수, 요인별 분석, 그리고 모든 숫자 뒤에 있는 공개 출처로 답합니다.
신용등급이 아닌 의사결정 지원 도구입니다. 모든 출력은 출처가 명시되고 설명 가능하며, 인간의 검토를 위한 것입니다. 핵심은 논쟁할 수 있는 점수이지, 블랙박스가 아닙니다.
ComtechAI 제작. 방법론 버전: ccr-ref-1.3.
상태: v1, 의도적으로 안정적
이 저장소는 범위가 고정된 참조 구현입니다. 게시된 상태로 계속 작동하며, 버그 수정과 상위 호환성 패치는 환영하지만, 새로운 기능은 여기서 범위를 벗어납니다. 설정, 테스트, 기여 규칙은 DEVELOPMENT.md를 참조하세요.
Related MCP server: Pulse MCP Server
작동 방식
하나의 MCP 도구인 counterparty.health는 회사 이름이나 티커를 입력받습니다. SEC 필러를 식별하고, 공개 재무 데이터와 시장 데이터를 가져와 네 가지 요인을 평가한 후, 이를 설명적 등급(강함 / 안정 / 주시 / 스트레스 / 위기)이 있는 복합 점수로 혼합합니다.
요인 | 읽는 데이터 | 출처 |
F1 — 대차대조표 건전성 | 레버리지, 이자보상배율, 유동비율 | SEC EDGAR (XBRL) |
F3 — 시장 반영 위험 | 파산거리(단순 Merton) + 주가 변동성 | Tiingo 일일 가격 + EDGAR |
F4 — 사업 구성 / 상품 노출 | 사업 유형별 현금흐름의 구조적 보호 정도 | 분류 유니버스(27개 기업) |
F5 — 이벤트 / 뉴스 | 등급 변경, 계약/유동성 사건, 계획 외 정전 | Google News RSS |
복합 점수는 이번 실행에서 실제로 계산된 요인들에 대한 재정규화된 가중 혼합입니다. 참조 가중치는 F1 0.20 · F3 0.15 · F4 0.25 · F5 0.15입니다. 요인의 입력이 누락된 경우(시장 피드가 없는 F3, 분류되지 않은 기업의 F4) 해당 요인은 제외되고 가중치는 나머지에 재분배됩니다. 어떤 것도 대체 추정하지 않습니다. 요인은 실제 데이터로 계산되거나 존재하지 않습니다.
모든 결과에는 methodology_version과 as_of 날짜가 포함되며, 각 요인은 그 뒤에 있는 서류나 피드를 명시합니다. 수치가 대리값인 경우(제한 사항 참조) 출처 줄에 그렇게 표시됩니다.
설치
Python 3.10–3.14 필요.
python3 -m venv venv && source venv/bin/activate # Windows: venv\Scripts\activate
pip install -e .사용 방법
명령줄에서
export SEC_USER_AGENT="Your Name you@example.com" # SEC requires a contact User-Agent
export TIINGO_TOKEN="your_tiingo_key" # optional; F3 is skipped without it
python3 -m counterparty_credit.cli "NextEra Energy"
python3 -m counterparty_credit.cli DUKSEC는 설명적인 User-Agent 없이는 HTTP 403을 반환합니다. 무료 Tiingo 토큰은 F3을 활성화합니다. 생략하면 도구는 F1/F4/F5로 점수를 매기고 그렇게 명시합니다. 서류와 티커 매핑은 ~/.cache/counterparty-credit에 24시간 동안 캐시됩니다.
Claude Desktop에서
claude_desktop_config.example.json을 Claude Desktop 설정에 복사하고, command를 이 저장소의 venv Python(절대 경로)으로 설정하고 env에 키를 입력한 후 Claude를 재시작하고 *"How financially sound is NextEra as a counterparty?"*라고 물어보세요. Claude가 도구를 호출하고 점수, 분석, 출처를 읽어줍니다.
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
회사를 식별할 수 없거나 데이터를 가져올 수 없으면 도구는 숫자 대신 오류를 반환합니다. 점수는 실제로 계산된 경우에만 반환됩니다.
방법론
점수는 하드코딩된 상수가 아닌 Methodology 구성 객체에서 읽습니다. Methodology.default()는 ccr-ref-1.3으로 고정된 공개 참조입니다. 커밋된 기록:
src/counterparty_credit/methodology.py— 모든 곡선, 가중치, 임계값의 진실 원본docs/methodology-c0.md— 사람이 읽을 수 있는 방법론 기록docs/methodology-c0.json— 기계 사양(테스트가 표류 방지)
사용자 정의 방법론은 재정의만 명시하고 나머지는 참조를 상속합니다:
CCR_METHODOLOGY=/path/to/methodology.json python3 -m counterparty_credit.cli "NextEra Energy"모든 결과는 버전이 표시되므로 사용자 정의 구성이 참조가 아님을 명확히 알 수 있습니다. 고정된 숫자는 실제 기업에 대해 정제된 시작 가설입니다. 재보정은 새로운 버전이지, 조용한 재작성이 아닙니다.
제한 사항
이것들은 의도적이며 명확히 명시됩니다. 정직한 범위가 참조 도구의 핵심입니다.
신용등급이 아님. 공개 데이터 기반 의사결정 지원. 발행자 참여, 비공개 정보, 신용평가사 방법론 없음.
F2(유동성/담보)는 실시간 혼합에서 제외됨. v0 현금 대리값은 신용도와 관계없이 거의 동일한 점수를 반환하여 변별력이 없습니다. 방법론에는 정의되어 있지만 실제 담보 스트레스 모델이 대리값을 대체할 때까지 제외됩니다.
F3은 시장 피드가 필요합니다. Tiingo 토큰이 없거나 깨끗한 가격 데이터가 없는 기업의 경우 F3은 제외되고 가중치가 재분배됩니다.
F4는 고정된 27개 기업 유니버스의 북미 에너지 발행자를 다룹니다. 이 범위 밖의 기업은 사업 구성 요인 없이 점수가 매겨지며 추측하지 않습니다.
F5는 고정된 어휘에 의존합니다. 업그레이드 / 다운그레이드로 표현된 등급 변경(신용평가사 맥락을 요구하도록 제한)과 일부 신용 이벤트를 감지합니다. 다른 동사로 표현된 등급 변경은 놓칠 수 있으며, 헤드라인 감정 분석은 거칠습니다.
이자보상배율은 현금 지급 대리값을 사용할 수 있습니다. 일부 대형 필러는 이자 비용 개념을 태그하지 않습니다. 이러한 경우 이자보상배율은 현금 지급 이자로 계산되며, 자본화 이자는 제외됩니다. 출처 줄은 기업별로 이를 표시합니다.
시점 공개 데이터. 수치는 최신 서류 기준입니다. 오래된 서류는 조용히 사용되지 않고 표시됩니다.
구조
src/counterparty_credit/
schema.py # locked I/O contract (HealthResult)
methodology.py # config object — reference default + worksheet loader
resolve.py # name/ticker → CIK + ticker (SEC company_tickers.json)
edgar.py # XBRL companyfacts → financials (recency-aware tag selection)
ratios.py # leverage / coverage / liquidity
market.py # daily prices → price + annualized vol (Tiingo)
dtd.py # naive-Merton distance-to-default
news.py # recent headlines (Google News RSS)
scoring.py # F1, F3, F5 scorers
f4_business_mix.py # F4 business-mix lookup over the universe
universe.json # 27-name classification universe
score.py # orchestration → weighted composite → HealthResult
server.py # MCP tool
cli.py # one-command live scoring
tests/면책 조항
Counterparty Credit은 공개 데이터에서 의사결정 지원을 생성합니다. 신용등급, 투자 조언이 아니며, 어떤 신용평가사나 평가 대상 발행자와도 관련이 없습니다. 출력은 출처가 명시되고 인간의 검토를 위한 것입니다.
Available Tools
1 toolcounterparty.healthA
Assess the credit health of a public energy company from public data.
Use this when asked how financially sound or risky an energy counterparty is — a regulated utility, merchant generator/IPP, midstream operator, or power/gas marketer. Accepts a company name or ticker.
Returns a 0-100 health score and descriptive band (Strong/Stable/Watch/Stressed/ Distressed), a factor-by-factor breakdown with the public source behind each factor, a plain-language summary, the methodology version, and an as-of date. This is transparent decision-support, not a credit rating.
Raises rather than guessing when the company cannot be resolved or its public data cannot be retrieved. A score is only ever returned when it was actually computed.
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| band | Yes | Descriptive band derived from the score |
| name | Yes | The query as the caller sent it |
| as_of | Yes | As-of date for the underlying data (YYYY-MM-DD) |
| score | Yes | Composite 0–100 health score |
| ticker | No | Equity ticker, if resolved |
| factors | Yes | Factor-by-factor breakdown, each independently sourced |
| summary | Yes | Plain-language read a desk could act on |
| disclaimer | No | Non-negotiable framing — this is not a rating. |
| resolved_name | Yes | Canonical entity name after resolution |
| methodology_version | Yes | Versioned methodology id, e.g. 'tenor-0.1.0-stub' |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure, and it does so thoroughly. It explains the return contents (health score, band, factor breakdown, sources, summary, methodology version, as-of date), frames the output as 'transparent decision-support, not a credit rating,' and explicitly states it 'raises rather than guessing' when resolution or data retrieval fails.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with the main action, immediately followed by usage context, output details, and an explicit failure behavior. Every sentence contributes necessary information without redundancy, and the structure makes it easy for an agent to quickly determine purpose and call behavior.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's single parameter, no annotations, no siblings, and an output schema that can carry return structure, the description covers all key contextual needs: input type, applicable domain, output semantics, methodological transparency, and error behavior. An agent has enough information to invoke the tool correctly and interpret its result.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema only provides a required string property 'name' with 0% description coverage, so the description must compensate. It does by adding that the tool 'Accepts a company name or ticker.' This is meaningful semantic guidance for the single parameter, though slightly more detail about accepted formats would push it higher.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description starts with a specific verb and resource: 'Assess the credit health of a public energy company from public data.' It further clarifies the exact scope by listing company types (regulated utility, merchant generator/IPP, midstream operator, marketer) and the accepted inputs (company name or ticker). Even without siblings, the purpose is unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly states when to use the tool: 'Use this when asked how financially sound or risky an energy counterparty is.' It gives clear context and enumerates the applicable counterparty types, but it does not explicitly state when not to use it or name alternatives. Since there are no sibling tools, this is a clear and sufficient usage guideline.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v0.1.0- First observed
counterparty.health
TDQS
Scored across 1 tool
With only one tool, there is no possibility of confusion or overlap with other tools. The tool's purpose is clearly defined and unique within this server.
A single tool name naturally presents no inconsistencies. The dotted notation 'counterparty.health' is descriptive and suggests a clear action/domain pattern.
One tool feels thin for a server, even when narrowly scoped. The functionality is focused, but a server with a single tool offers little flexibility or breadth for an agent.
The tool covers the core domain of assessing counterparty credit health thoroughly, returning scores, factors, sources, and methodology. It lacks supplementary operations like historical comparisons or bulk screening, but these are not essential for the stated purpose.
Maintenance
Related MCP Connectors
Independent trust scores, tool surfaces and change history for MCP servers.
MCP server providing access to the Scorecard API to evaluate and optimize LLM systems.
Scores any MCP server before you trust it: free quick check, full paid report, 2-5 way compare.
Remote MCP server to enrich company profiles with structured B2B data and confidence scores.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP server for Axonn, enabling access to US energy regulatory filings, real-time ISO prices, and market data.MIT
- FlicenseNot gradedqualityCmaintenanceAn MCP server that exposes Moody's Pulse (Cortera) trade-credit data with grounded knowledge-base context, enabling search, report retrieval, and explanation of metrics and use cases.-
- FlicenseNot gradedqualityBmaintenanceMCP server that exposes the credit scoring model's deterministic tools (probability of default, SHAP explanations, typicality check, financial ratios) to AI agents, enabling natural language credit risk assessment.-
- AlicenseNot gradedqualityCmaintenanceProvides complete credit dossiers for individuals or companies, including registration data, risk score, and pending issues, via a hosted MCP server with a single read-only tool.MIT