Skip to main content
Glama

EDGAR MCP — SEC companyfacts, frames, Form 4, 13F

User-Agent로 SEC EDGAR에 연결하는 MCP 서버입니다. API 키는 없습니다. 재무 데이터는 FMP가 아니라 companyfacts / frames로 읽으며, XBRL 태그 매핑은 xbrl_map.py에 있습니다.

도구

도구

용도

search_company

Ticker / CIK / 이름

get_company

SIC, 거래소, 회계연도 말

get_financials

매핑된 손익계산서, 대차대조표, 현금흐름

get_concept

단일 us-gaap/ifrs/dei 태그의 원시 시계열

get_frame

동일 개념 + 기간, 모든 제출자(스냅샷)

list_filings

10-K, 10-Q, 8-K, 4, 13F-HR...

get_form4

내부자 거래 (발행사 ticker 또는 개인 CIK)

get_13f

기관의 13F-HR 포트폴리오 (주식 ticker 아님)

search_filings

Full-text (efts.sec.gov)

Related MCP server: edgarmcp

설치

cd edgar-mcp
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt
copy .env.example .env

.env에서 EDGAR_USER_AGENT는 실명 + 이메일이어야 합니다. SEC는 일반적인 python-requests 에이전트를 403으로 차단합니다.

EDGAR_USER_AGENT=Your Name your.email@example.com
MCP_TRANSPORT=stdio

Cursor (stdio)

%USERPROFILE%\.cursor\mcp.json:

{
  "mcpServers": {
    "edgar": {
      "command": "python",
      "args": ["server.py"],
      "cwd": "C:\\Users\\yunus\\Documents\\dev\\edgar-mcp",
      "env": {
        "MCP_TRANSPORT": "stdio",
        "EDGAR_USER_AGENT": "Your Name your.email@example.com"
      }
    }
  }
}

Railway → Claude (Streamable HTTP)

PORT가 있으면 기본 transport는 http이고 엔드포인트는 https://<railway-host>/mcp입니다. MCP_TRANSPORT=stdio를 설정하지 마세요 — 프로세스가 수신 대기하지 않아 Railway는 "online"으로 표시되지만 Claude는 연결할 수 없습니다.

변수

키

값

EDGAR_USER_AGENT

Ad Soyad you@email.com (SEC 403 방지를 위해 실제 정보)

MCP_TRANSPORT

http (또는 추가하지 않음)

MCP_AUTH_TOKEN

Claude.ai에는 설정하지 마세요. Connector 폼은 header를 보내지 않으므로 token이 있으면 401 + "Authentication failed" 오류가 발생합니다.

확인: https://<host>/health → {"ok": true, ...}

Claude (claude.ai / Desktop Connectors)

  1. Customize → Connectors → Add custom connector

  2. URL: https://<host>/mcp (끝에 /sse 아님)

  3. OAuth 필드는 비워 두고 Individual sign-in은 끄세요

  4. Add를 누른 뒤 채팅에서 + → Connectors로 여세요

Claude Code가 header를 보낼 수 있다면 MCP_AUTH_REQUIRED=true 및 Authorization: Bearer <token>을 사용하세요.

이전 /sse 방식은 MCP_TRANSPORT=sse로 설정하세요 (Claude connector에는 권장하지 않음).

테스트

python -m unittest tests.test_xbrl_map tests.test_form_parsers tests.test_http_auth tests.test_client_utils

참고 자료

13F 값은 SEC 관례에 따라 천(千) USD 단위입니다. 13F는 주식이 아니라 기관이 제출합니다.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Hosted MCP server that gives AI agents real-time access to SEC EDGAR filings search, 10-K/8-K reading, XBRL financial facts, and insider-trade (Form 4) alerts.
    13 npm
    1
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    MCP server for SEC EDGAR that provides real-time access to filings, financial statements, and full-text search across all EDGAR documents.
    Apache 2.0
  • A
    license
    Not graded
    quality
    D
    maintenance
    A free, key-less MCP server for SEC EDGAR that provides company filings, XBRL financial facts, and full-text search directly from the SEC.
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    An MCP server that wraps SEC EDGAR APIs to provide company financial data, screening metrics, and disclosure signals for investment diligence, with every figure traced to its source filing.
    8
    MIT