Edinet Mcp

io.github.ajtgjmdjp由 GitHub 账号 ajtgjmdjp 发布v0.4.1更新于 Oct 25, 2026

Access Japanese financial disclosures (EDINET). Search companies, retrieve BS/PL/CF statements.

已验证STDIO仅桌面金融数据与分析

概览

AI 生成的概览

本地 MCP 服务器,让 AI 助手访问日本 EDINET 企业披露文件,包括规范化财务报表和叙述性章节。

可以做什么
按公司名称、证券代码或 EDINET 代码搜索企业,按期间或企业列出披露文件,并获取企业详情和可用财务科目清单。获取跨 J-GAAP、IFRS、US-GAAP 规范化的资产负债表、利润表和现金流量表,支持日文或英文标签。计算 ROE、ROA、利润率等财务指标,并比较期间增减额与增减率。一次最多对 20 家企业进行指标筛选与对比。以分页纯文本提取事业等风险、MD&A、经营方针等叙述性章节。可选获取关键科目的可验证证据记录。
适用场景
适合需要基于原始披露文件研究日本上市公司的场景:最新业绩、财务报表、盈利能力指标、同比变化、同业筛选,或定性风险与 MD&A 文本,且数字可追溯到原始文件。
运行要求
以 Python 包(pip 或 uvx)或 Docker 镜像在本地运行,通过 stdio 配置。需要免费的 EDINET API 密钥,通过环境变量 EDINET_API_KEY 提供,并需访问 EDINET 服务的网络。可选的证据记录功能需额外安装。
安装前请注意
EDINET_API_KEY 是密钥,会写入 MCP 配置或环境变量,请勿放入共享文件。查询和企业检索会发送至 EDINET 这一第三方政府服务,并受其速率限制约束。period 参数是提交年份而非会计年度,混淆时可能误读结果。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Edinet Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

edinet-mcp

EDINET XBRL parsing library and MCP server for Japanese financial data.

日本語版READMEはこちら

[PyPI] [Python] [CI] [Downloads] [License] [ClawHub]

📝 日本語チュートリアル: Claude に聞くだけで上場企業の決算がわかる (Zenn)

Part of the Japan Finance Data Stack: edinet-mcp (securities filings) | tdnet-disclosure-mcp (timely disclosures) | estat-mcp (government statistics) | stockprice-mcp (stock prices & FX)

Building a high-throughput pipeline, batch-parsing thousands of filings, or need SEC EDGAR coverage too? See xbrl-facts — a Rust iXBRL engine for SEC + EDINET with byte-range provenance.

What it looks like

Ask your AI assistant (with edinet-mcp connected):

You: トヨタの最新の決算と、会社が挙げている主要なリスクを教えて

Claude: トヨタ自動車 (E02144) の有価証券報告書(2026年6月10日提出)によると——

  • 売上高: 50.7兆円(前期 48.0兆円、約 +5.5%)
  • 事業等のリスク(有報本文より): 自動車市場の競争激化 — CASE などの技術革新が進むことで競争は一層激化し、業界再編につながる可能性も指摘 …

Every number and passage above is fetched from the actual EDINET filing via get_financial_statements / get_narrative — nothing comes from the model's memory.

What is this?

edinet-mcp provides programmatic access to Japan's EDINET financial disclosure system. It normalizes XBRL filings across accounting standards (J-GAAP / IFRS / US-GAAP) into canonical Japanese labels and exposes them as an MCP server for AI assistants.

  • Search 5,000+ listed Japanese companies
  • Retrieve annual/quarterly/semiannual reports (有価証券報告書, 四半期報告書, 半期報告書) plus extraordinary (臨時報告書) and large shareholding (大量保有報告書) filings
  • Automatic normalization: stmt["売上高"] works regardless of accounting standard
  • Bilingual labels: stmt["Revenue"] works too (case-insensitive), and the MCP tool supports language='en' for fully English output
  • Financial metrics (ROE, ROA, profit margins) and year-over-year comparisons
  • Parse XBRL into Polars/pandas DataFrames (BS, PL, CF)
  • Multi-company screening: Compare financial metrics across up to 20 companies
  • Cross-period diff (xbrl-diff): Compare financial statements across periods with change amounts (増減額) and growth rates (増減率)
  • Narrative sections: extract 事業等のリスク, MD&A, 経営方針 and more as plain text (get_narrative)
  • Evidence receipts (optional): machine-verifiable claim-to-source records for key figures, backed by the xbrl-facts Rust engine (get_receipts, pip install edinet-mcp[receipts])
  • MCP server with 11 tools for Claude Desktop and other AI tools

Why edinet-mcp?

Unlike commercial EDINET data APIs, edinet-mcp is fully free and local: the XBRL parser runs on your machine, the only credential you need is a free EDINET API key from the FSA, and every number is traceable to the original filing. No paid tiers, no usage caps beyond EDINET's own rate limits, Apache-2.0 licensed.

Quick Start

Installation

bash
pip install edinet-mcp# oruv add edinet-mcp# or with Dockerdocker run -e EDINET_API_KEY=your_key ghcr.io/ajtgjmdjp/edinet-mcp serve

Get an API Key

Register (free) at EDINET and set:

bash
export EDINET_API_KEY=your_key_here

30-Second Example

python
import asynciofrom edinet_mcp import EdinetClient
async def main():    async with EdinetClient() as client:        # Search for Toyota        companies = await client.search_companies("トヨタ")        print(companies[0].name, companies[0].edinet_code)        # トヨタ自動車株式会社 E02144
        # Get normalized financial statements        stmt = await client.get_financial_statements("E02144", period="2025")
        # Dict-like access — works for J-GAAP, IFRS, and US-GAAP        revenue = stmt.income_statement["売上高"]        print(revenue)  # {"当期": 45095325000000, "前期": 37154298000000}
        # English labels work too (case-insensitive)        assert stmt.income_statement["Revenue"] == revenue        print(stmt.income_statement.labels_en)        # ["Revenue", "Cost of Sales", "Gross Profit", ...]
        # See all available line items        print(stmt.income_statement.labels)        # ["売上高", "売上原価", "売上総利益", "営業利益", ...]
        # Export as DataFrame        print(stmt.income_statement.to_polars())
asyncio.run(main())

Narrative Sections (定性情報)

python
import asynciofrom edinet_mcp import EdinetClient
async def main():    async with EdinetClient() as client:        # 事業等のリスク as plain text        risks = await client.get_narrative("E02144", "business_risks")        print(risks.text[:200])
        # Other sections: mdna, business_policy, description_of_business,        # corporate_governance, research_and_development
asyncio.run(main())

Financial Metrics

python
import asynciofrom edinet_mcp import EdinetClient, calculate_metrics
async def main():    async with EdinetClient() as client:        stmt = await client.get_financial_statements("E02144", period="2025")        metrics = calculate_metrics(stmt)        print(metrics["profitability"])        # {"売上総利益率": "25.30%", "営業利益率": "11.87%", "ROE": "12.50%", ...}
asyncio.run(main())

Multi-Company Screening

python
import asynciofrom edinet_mcp import EdinetClient, screen_companies
async def main():    async with EdinetClient() as client:        result = await screen_companies(            client,            ["E02144", "E01777", "E01967"],  # Toyota, Sony, Keyence            period="2025",            sort_by="営業利益率",  # Sort by operating margin        )        for r in result["results"]:            print(f"{r['company_name']}: {r['profitability']['営業利益率']}")        # 株式会社キーエンス: 51.91%        # ソニーグループ株式会社: 11.69%        # トヨタ自動車株式会社: 9.98%
asyncio.run(main())

Cross-Period Diff

python
import asynciofrom edinet_mcp import EdinetClient, diff_statements
async def main():    async with EdinetClient() as client:        result = await diff_statements(            client, "E02144",            period1="2024", period2="2025",        )        for d in result["diffs"][:5]:            print(f"{d['科目']}: {d['増減額']:+,.0f} ({d['増減率']})")        # 売上高: +7,941,027,000,000 (+21.38%)        # 営業利益: +1,204,832,000,000 (+28.44%)        # ...
asyncio.run(main())

MCP Server

Add to your AI tool's MCP config:

Claude Desktop (~⁠/Library/Application Support/Claude/claude_desktop_config.json)
json
{  "mcpServers": {    "edinet": {      "command": "uvx",      "args": ["edinet-mcp", "serve"],      "env": {        "EDINET_API_KEY": "your_key_here"      }    }  }}
Cursor (~⁠/.cursor/mcp.json)
json
{  "mcpServers": {    "edinet": {      "command": "uvx",      "args": ["edinet-mcp", "serve"],      "env": {        "EDINET_API_KEY": "your_key_here"      }    }  }}
Claude Code
bash
claude mcp add edinet -- uvx edinet-mcp serve# Then set EDINET_API_KEY in your environment

Then ask your AI: "トヨタの最新の営業利益を教えて"

Available MCP Tools

ToolDescription
search_companies企業名・証券コード・EDINETコードで検索
get_filings指定期間の開示書類一覧を取得
get_financial_statements正規化された財務諸表 (BS/PL/CF) を取得
get_financial_metricsROE・ROA・利益率等の財務指標を計算
compare_financial_periods前年比較(増減額・増減率)
screen_companies複数企業の財務指標を一括比較(最大20社)
get_narrative定性情報(事業等のリスク・MD&A 等)をページング付きで取得
get_receipts主要科目の検証可能な evidence receipt を取得(要 [receipts] extra)
list_available_labels取得可能な財務科目の一覧
get_company_info企業の詳細情報を取得
diff_financial_statements2期間の財務諸表を比較(増減額・増減率)

Note: The period parameter is the filing year, not the fiscal year. Japanese companies with a March fiscal year-end file annual reports in June of the following year (e.g., FY2024 → filed 2025 → period="2025").

CLI

bash
# Search companiesedinet-mcp search トヨタ
# Fetch income statementedinet-mcp statements -c E02144 -p 2024
# Screen multiple companiesedinet-mcp screen E02144 E01777 E02529 --sort-by ROE
# Compare across periods (xbrl-diff)edinet-mcp diff -c E02144 -p1 2023 -p2 2024
# Start MCP serveredinet-mcp serve

API Reference

EdinetClient

All client methods are async. Use async with for proper resource cleanup:

python
import asynciofrom edinet_mcp import EdinetClient
async def main():    async with EdinetClient(        api_key="...",        # or EDINET_API_KEY env var        cache_dir="~/.cache/edinet-mcp",        rate_limit=0.5,       # requests per second    ) as client:        # Search        companies: list[Company] = await client.search_companies("query")        company: Company = await client.get_company("E02144")
        # Filings        filings: list[Filing] = await client.get_filings(            start_date="2024-01-01",            edinet_code="E02144",            doc_type="annual_report",        )
        # Financial statements (by edinet_code + period)        stmt: FinancialStatement = await client.get_financial_statements(            edinet_code="E02144",            period="2024",  # Filing year (not fiscal year)        )
        # Or get the most recent filing (within past 365 days)        stmt = await client.get_financial_statements(edinet_code="E02144")
        df = stmt.income_statement.to_polars()  # Polars DataFrame        df = stmt.income_statement.to_pandas()  # pandas DataFrame (optional dep)
asyncio.run(main())

Filing

Filing objects returned by get_filings() have the following attributes:

python
for filing in filings:    print(filing.description)    # "有価証券報告書-第121期(...)"    print(filing.filing_date)    # datetime.date(2025, 6, 18)    print(filing.doc_id)         # "S100VWVY"    print(filing.company_name)   # "トヨタ自動車株式会社"    print(filing.period_start)   # datetime.date(2024, 4, 1)    print(filing.period_end)     # datetime.date(2025, 3, 31)

StatementData

Each financial statement (BS, PL, CF) is a StatementData object with dict-like access:

python
# Dict-like access by Japanese labelstmt.income_statement["売上高"]       # → {"当期": 45095325, "前期": 37154298}stmt.income_statement.get("営業利益") # → {"当期": 5352934} or Nonestmt.income_statement.labels          # → ["売上高", "営業利益", ...]
# DataFrame exportstmt.balance_sheet.to_polars()    # → polars.DataFramestmt.balance_sheet.to_pandas()    # → pandas.DataFrame (requires pandas)stmt.balance_sheet.to_dicts()     # → list[dict]len(stmt.balance_sheet)           # number of line items
# Raw XBRL data preservedstmt.income_statement.raw_items   # original pre-normalization data

Normalization

edinet-mcp automatically normalizes XBRL element names across accounting standards:

Accounting StandardXBRL ElementNormalized Label
J-GAAPNetSales売上高
IFRSRevenue, SalesRevenuesIFRS売上高
US-GAAPRevenues売上高

Mappings are defined in taxonomy.yaml — 161 items covering PL (42), BS (79), and CF (40), with IFRS/US-GAAP element variants automatically resolved via suffix stripping. Add new mappings by editing the YAML file, no code changes needed.

python
from edinet_mcp import get_taxonomy_labels
# Discover available labelslabels = get_taxonomy_labels("income_statement")# [{"id": "revenue", "label": "売上高", "label_en": "Revenue"}, ...]

EDINET Suffix Stripping

EDINET appends accounting-standard and section-specific suffixes to XBRL element names (e.g., TotalAssetsIFRSSummaryOfBusinessResults). These are automatically stripped to match canonical taxonomy entries. Non-consolidated (単体) contexts are filtered out to prefer consolidated figures.

Architecture

EDINET API → Parser (XBRL/TSV) → Normalizer (taxonomy.yaml) → MCP Server                                        ↓                              StatementData["売上高"]                              calculate_metrics(stmt)                              compare_periods(stmt)

Development

bash
git clone https://github.com/ajtgjmdjp/edinet-mcpcd edinet-mcpuv sync --extra devuv run pytest -v           # 336 testsuv run ruff check src/

Data Attribution

This project uses data from EDINET (Electronic Disclosure for Investors' NETwork), operated by the Financial Services Agency of Japan (金融庁). EDINET data is provided under the Public Data License 1.0.

Related Projects

Japan Finance Data Stack (by same author):

Community:

License

Apache-2.0. See NOTICE for third-party attributions.

来源:README.md,提交 5fbcb95

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.4.1最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分