edinet-util-mcp-server 0.1.0.dev0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. edinet_util_mcp_server-0.1.0.dev0/.gitignore +226 -0
  2. edinet_util_mcp_server-0.1.0.dev0/LICENSE +21 -0
  3. edinet_util_mcp_server-0.1.0.dev0/PKG-INFO +106 -0
  4. edinet_util_mcp_server-0.1.0.dev0/README.md +88 -0
  5. edinet_util_mcp_server-0.1.0.dev0/pyproject.toml +52 -0
  6. edinet_util_mcp_server-0.1.0.dev0/skill/edinet-company-profiles/NOTICE +16 -0
  7. edinet_util_mcp_server-0.1.0.dev0/skill/edinet-company-profiles/SKILL.md +68 -0
  8. edinet_util_mcp_server-0.1.0.dev0/skill/edinet-company-profiles/data/company.lst +3812 -0
  9. edinet_util_mcp_server-0.1.0.dev0/skill/edinet-company-profiles/references/financial_diagnosis.md +56 -0
  10. edinet_util_mcp_server-0.1.0.dev0/skill/edinet-company-profiles/scripts/edinet_profiles.py +867 -0
  11. edinet_util_mcp_server-0.1.0.dev0/src/edinet_util_mcp_server/__init__.py +12 -0
  12. edinet_util_mcp_server-0.1.0.dev0/src/edinet_util_mcp_server/__main__.py +7 -0
  13. edinet_util_mcp_server-0.1.0.dev0/src/edinet_util_mcp_server/api.py +178 -0
  14. edinet_util_mcp_server-0.1.0.dev0/src/edinet_util_mcp_server/codelist.py +99 -0
  15. edinet_util_mcp_server-0.1.0.dev0/src/edinet_util_mcp_server/convert.py +407 -0
  16. edinet_util_mcp_server-0.1.0.dev0/src/edinet_util_mcp_server/export.py +328 -0
  17. edinet_util_mcp_server-0.1.0.dev0/src/edinet_util_mcp_server/figures.py +416 -0
  18. edinet_util_mcp_server-0.1.0.dev0/src/edinet_util_mcp_server/guideline.py +67 -0
  19. edinet_util_mcp_server-0.1.0.dev0/src/edinet_util_mcp_server/server.py +301 -0
  20. edinet_util_mcp_server-0.1.0.dev0/tests/fixtures.py +128 -0
  21. edinet_util_mcp_server-0.1.0.dev0/tests/test_api.py +59 -0
  22. edinet_util_mcp_server-0.1.0.dev0/tests/test_convert.py +113 -0
  23. edinet_util_mcp_server-0.1.0.dev0/tests/test_figures.py +201 -0
  24. edinet_util_mcp_server-0.1.0.dev0/tests/test_live.py +59 -0
  25. edinet_util_mcp_server-0.1.0.dev0/tests/test_server.py +239 -0
  26. edinet_util_mcp_server-0.1.0.dev0/tests/test_skill.py +182 -0
  27. edinet_util_mcp_server-0.1.0.dev0/tests/test_snapshot.py +157 -0
  28. edinet_util_mcp_server-0.1.0.dev0/tools/build_profiles.py +104 -0
  29. edinet_util_mcp_server-0.1.0.dev0/tools/snapshot/__init__.py +5 -0
  30. edinet_util_mcp_server-0.1.0.dev0/tools/snapshot/cache.py +75 -0
  31. edinet_util_mcp_server-0.1.0.dev0/tools/snapshot/peers.py +143 -0
  32. edinet_util_mcp_server-0.1.0.dev0/tools/snapshot/schema.py +132 -0
  33. edinet_util_mcp_server-0.1.0.dev0/tools/snapshot/steps.py +296 -0
@@ -0,0 +1,226 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[codz]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py.cover
50
+ *.lcov
51
+ .hypothesis/
52
+ .pytest_cache/
53
+ cover/
54
+
55
+ # Translations
56
+ *.mo
57
+ *.pot
58
+
59
+ # Django stuff:
60
+ *.log
61
+ local_settings.py
62
+ db.sqlite3
63
+ db.sqlite3-journal
64
+
65
+ # Flask stuff:
66
+ instance/
67
+ .webassets-cache
68
+
69
+ # Scrapy stuff:
70
+ .scrapy
71
+
72
+ # Sphinx documentation
73
+ docs/_build/
74
+
75
+ # PyBuilder
76
+ .pybuilder/
77
+ target/
78
+
79
+ # Jupyter Notebook
80
+ .ipynb_checkpoints
81
+
82
+ # IPython
83
+ profile_default/
84
+ ipython_config.py
85
+
86
+ # pyenv
87
+ # For a library or package, you might want to ignore these files since the code is
88
+ # intended to run in multiple environments; otherwise, check them in:
89
+ # .python-version
90
+
91
+ # pipenv
92
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
93
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
94
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
95
+ # install all needed dependencies.
96
+ # Pipfile.lock
97
+
98
+ # uv
99
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
100
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
101
+ # commonly ignored for libraries.
102
+ # uv.lock
103
+
104
+ # poetry
105
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
106
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
107
+ # commonly ignored for libraries.
108
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
109
+ # poetry.lock
110
+ # poetry.toml
111
+
112
+ # pdm
113
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
114
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
115
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
116
+ # pdm.lock
117
+ # pdm.toml
118
+ .pdm-python
119
+ .pdm-build/
120
+
121
+ # pixi
122
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
123
+ # pixi.lock
124
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
125
+ # in the .venv directory. It is recommended not to include this directory in version control.
126
+ .pixi/*
127
+ !.pixi/config.toml
128
+
129
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
130
+ __pypackages__/
131
+
132
+ # Celery stuff
133
+ celerybeat-schedule*
134
+ celerybeat.pid
135
+
136
+ # Redis
137
+ *.rdb
138
+ *.aof
139
+ *.pid
140
+
141
+ # RabbitMQ
142
+ mnesia/
143
+ rabbitmq/
144
+ rabbitmq-data/
145
+
146
+ # ActiveMQ
147
+ activemq-data/
148
+
149
+ # SageMath parsed files
150
+ *.sage.py
151
+
152
+ # Environments
153
+ .env
154
+ .envrc
155
+ .venv
156
+ env/
157
+ venv/
158
+ ENV/
159
+ env.bak/
160
+ venv.bak/
161
+
162
+ # Spyder project settings
163
+ .spyderproject
164
+ .spyproject
165
+
166
+ # Rope project settings
167
+ .ropeproject
168
+
169
+ # mkdocs/Zensical documentation
170
+ /site
171
+
172
+ # mypy
173
+ .mypy_cache/
174
+ .dmypy.json
175
+ dmypy.json
176
+
177
+ # Pyre type checker
178
+ .pyre/
179
+
180
+ # pytype static type analyzer
181
+ .pytype/
182
+
183
+ # Cython debug symbols
184
+ cython_debug/
185
+
186
+ # PyCharm
187
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
188
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
189
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
190
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
191
+ # .idea/
192
+
193
+ # Abstra
194
+ # Abstra is an AI-powered process automation framework.
195
+ # Ignore directories containing user credentials, local state, and settings.
196
+ # Learn more at https://abstra.io/docs
197
+ .abstra/
198
+
199
+ # Visual Studio Code
200
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore that
201
+ # can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
202
+ # and can be added to the global gitignore or merged into this file. However, if you prefer, you
203
+ # could uncomment the following to ignore the entire vscode folder
204
+ # .vscode/
205
+ # Temporary file for partial code execution
206
+ tempCodeRunnerFile.py
207
+
208
+ # Ruff stuff:
209
+ .ruff_cache/
210
+
211
+ # PyPI configuration file
212
+ .pypirc
213
+
214
+ # Marimo
215
+ marimo/_static/
216
+ marimo/_lsp/
217
+ __marimo__/
218
+
219
+ # Streamlit
220
+ .streamlit/secrets.toml
221
+
222
+ # Snapshot build output (released separately, not in git)
223
+ skill/*/data/*.sqlite
224
+
225
+ # macOS
226
+ .DS_Store
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 GotoAI Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,106 @@
1
+ Metadata-Version: 2.5
2
+ Name: edinet-util-mcp-server
3
+ Version: 0.1.0.dev0
4
+ Summary: A skill-style MCP server for EDINET (金融庁) API v2 disclosures
5
+ License-Expression: MIT
6
+ License-File: LICENSE
7
+ Requires-Python: >=3.11
8
+ Requires-Dist: httpx>=0.27
9
+ Requires-Dist: lxml>=5
10
+ Requires-Dist: mcp<3,>=2.3
11
+ Provides-Extra: dev
12
+ Requires-Dist: numpy>=1.26; extra == 'dev'
13
+ Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
14
+ Requires-Dist: pytest>=8; extra == 'dev'
15
+ Requires-Dist: ruff>=0.6; extra == 'dev'
16
+ Requires-Dist: scikit-learn>=1.4; extra == 'dev'
17
+ Description-Content-Type: text/markdown
18
+
19
+ # edinet-util-mcp-server
20
+
21
+ An MCP server for the [EDINET](https://disclosure2.edinet-fsa.go.jp/) API v2 (金融庁), and the
22
+ builder of the company-profile snapshot used by the `edinet-company-profiles` skill.
23
+
24
+ EDINET API v2 を使って有価証券報告書などの開示書類を扱う MCP サーバーと、上場企業のプロフィール・
25
+ 主要指標・同業他社リストをまとめたスナップショットのビルダーです。
26
+
27
+ > **Unofficial.** This project is not affiliated with or endorsed by the Financial Services
28
+ > Agency (金融庁), which operates EDINET.
29
+
30
+ **Status:** work in progress (0.1.0.dev0). The server, the skill and the snapshot builder work;
31
+ not yet published.
32
+
33
+ ## Layout
34
+
35
+ | Path | What it is |
36
+ |---|---|
37
+ | `src/edinet_util_mcp_server/` | The package: the MCP server (`server`, `guideline`), filing export (`export`, `convert`), API client (`api`), code list (`codelist`), key figures from the type-5 CSV (`figures`) |
38
+ | `tools/build_profiles.py`, `tools/snapshot/` | The snapshot builder, a development tool not shipped in the wheel |
39
+ | `skill/edinet-company-profiles/` | The skill: `SKILL.md`, `scripts/edinet_profiles.py` (standard library only), `references/financial_diagnosis.md`, `NOTICE`; the builder writes its database to `data/edinet_profiles.sqlite` (not in git) |
40
+
41
+ ## The server
42
+
43
+ A skill-style MCP server over stdio, with the user's own API key:
44
+
45
+ | Tool | Does |
46
+ |---|---|
47
+ | `load_guideline` | How the tools work together, the conditions of use |
48
+ | `list_filings` | Filings submitted between two dates (at most 31 days), filtered by company or document type |
49
+ | `export_filing` | One filing → Markdown files: `index.md`, `figures.md`, `sections/`, `images/` |
50
+
51
+ Settings (environment variables): `EDINET_API_KEY` (required) and `EDINET_OUTPUT_DIR`
52
+ (default `~/Documents/EDINET`), the only place the server writes. Run it with
53
+ `python -m edinet_util_mcp_server`; Kari finds the command through the `kari.mcp_servers`
54
+ entry point.
55
+
56
+ ## The skill
57
+
58
+ `skill/edinet-company-profiles/` is a standard `SKILL.md` folder. Copy it, with its database,
59
+ into `~/.agents/skills/` (Kari's main app) or import it in an Agent Desk. Its script opens the
60
+ database read-only in place:
61
+
62
+ ```sh
63
+ python skill/edinet-company-profiles/scripts/edinet_profiles.py compare 5586 --peers "ABEJA,エクサウィザーズ"
64
+ ```
65
+
66
+ Commands: `company`, `peers`, `compare`, `filings`, `sql`, `about` (`--json` for structured
67
+ output).
68
+
69
+ ## Tests
70
+
71
+ ```sh
72
+ ../../.venv/bin/pytest # offline
73
+ EDINET_LIVE=1 ../../.venv/bin/pytest tests/test_live.py # real API over stdio, key from .env
74
+ ../../.venv/bin/ruff check src tests tools skill
75
+ ```
76
+
77
+ ## Building the snapshot
78
+
79
+ Put the key in `.env` at the repository root (`EDINET_API_KEY=…`; the file is ignored by git),
80
+ then:
81
+
82
+ ```sh
83
+ python tools/build_profiles.py all
84
+ ```
85
+
86
+ Steps, each re-runnable on its own: `cohort` (every listed company in the EDINET code list) →
87
+ `filings` (every cohort filing in the daily lists of the last 18 months, or `--from`..`--to`)
88
+ → `profiles` (key figures and listing market from each latest annual report's CSV; a company
89
+ is covered when that report shows at least 3 fiscal years) → `peers` (top 10 per company in
90
+ the same TSE industry, scored 0.5 × scale similarity + 0.5 × similarity of the report's
91
+ 事業の内容 and 経営方針 text) → `finish` (manifest, attribution, `VACUUM`).
92
+
93
+ The builder needs the dev extras (`pip install -e ".[dev]"`, which include numpy and
94
+ scikit-learn for the `peers` step); the server itself does not.
95
+
96
+ Downloads are cached in `build/edinet-cache/`, so an interrupted run resumes and a rebuild makes
97
+ no repeat calls. Requests go one at a time, 1 second apart, slowing down after an HTTP 429.
98
+
99
+ ## Data and licence
100
+
101
+ The code is MIT-licensed. Data from EDINET is used under the
102
+ [公共データ利用規約(第1.0版)](https://www.digital.go.jp/resources/open_data/public_data_license_v1.0)
103
+ (PDL1.0). The snapshot is processed data, not the original filings:
104
+
105
+ - 出典:EDINET閲覧(提出)サイト(https://disclosure2.edinet-fsa.go.jp/)、PDL1.0(https://www.digital.go.jp/resources/open_data/public_data_license_v1.0)
106
+ - EDINET閲覧(提出)サイトの提出書類をもとに GotoAI が加工して作成
@@ -0,0 +1,88 @@
1
+ # edinet-util-mcp-server
2
+
3
+ An MCP server for the [EDINET](https://disclosure2.edinet-fsa.go.jp/) API v2 (金融庁), and the
4
+ builder of the company-profile snapshot used by the `edinet-company-profiles` skill.
5
+
6
+ EDINET API v2 を使って有価証券報告書などの開示書類を扱う MCP サーバーと、上場企業のプロフィール・
7
+ 主要指標・同業他社リストをまとめたスナップショットのビルダーです。
8
+
9
+ > **Unofficial.** This project is not affiliated with or endorsed by the Financial Services
10
+ > Agency (金融庁), which operates EDINET.
11
+
12
+ **Status:** work in progress (0.1.0.dev0). The server, the skill and the snapshot builder work;
13
+ not yet published.
14
+
15
+ ## Layout
16
+
17
+ | Path | What it is |
18
+ |---|---|
19
+ | `src/edinet_util_mcp_server/` | The package: the MCP server (`server`, `guideline`), filing export (`export`, `convert`), API client (`api`), code list (`codelist`), key figures from the type-5 CSV (`figures`) |
20
+ | `tools/build_profiles.py`, `tools/snapshot/` | The snapshot builder, a development tool not shipped in the wheel |
21
+ | `skill/edinet-company-profiles/` | The skill: `SKILL.md`, `scripts/edinet_profiles.py` (standard library only), `references/financial_diagnosis.md`, `NOTICE`; the builder writes its database to `data/edinet_profiles.sqlite` (not in git) |
22
+
23
+ ## The server
24
+
25
+ A skill-style MCP server over stdio, with the user's own API key:
26
+
27
+ | Tool | Does |
28
+ |---|---|
29
+ | `load_guideline` | How the tools work together, the conditions of use |
30
+ | `list_filings` | Filings submitted between two dates (at most 31 days), filtered by company or document type |
31
+ | `export_filing` | One filing → Markdown files: `index.md`, `figures.md`, `sections/`, `images/` |
32
+
33
+ Settings (environment variables): `EDINET_API_KEY` (required) and `EDINET_OUTPUT_DIR`
34
+ (default `~/Documents/EDINET`), the only place the server writes. Run it with
35
+ `python -m edinet_util_mcp_server`; Kari finds the command through the `kari.mcp_servers`
36
+ entry point.
37
+
38
+ ## The skill
39
+
40
+ `skill/edinet-company-profiles/` is a standard `SKILL.md` folder. Copy it, with its database,
41
+ into `~/.agents/skills/` (Kari's main app) or import it in an Agent Desk. Its script opens the
42
+ database read-only in place:
43
+
44
+ ```sh
45
+ python skill/edinet-company-profiles/scripts/edinet_profiles.py compare 5586 --peers "ABEJA,エクサウィザーズ"
46
+ ```
47
+
48
+ Commands: `company`, `peers`, `compare`, `filings`, `sql`, `about` (`--json` for structured
49
+ output).
50
+
51
+ ## Tests
52
+
53
+ ```sh
54
+ ../../.venv/bin/pytest # offline
55
+ EDINET_LIVE=1 ../../.venv/bin/pytest tests/test_live.py # real API over stdio, key from .env
56
+ ../../.venv/bin/ruff check src tests tools skill
57
+ ```
58
+
59
+ ## Building the snapshot
60
+
61
+ Put the key in `.env` at the repository root (`EDINET_API_KEY=…`; the file is ignored by git),
62
+ then:
63
+
64
+ ```sh
65
+ python tools/build_profiles.py all
66
+ ```
67
+
68
+ Steps, each re-runnable on its own: `cohort` (every listed company in the EDINET code list) →
69
+ `filings` (every cohort filing in the daily lists of the last 18 months, or `--from`..`--to`)
70
+ → `profiles` (key figures and listing market from each latest annual report's CSV; a company
71
+ is covered when that report shows at least 3 fiscal years) → `peers` (top 10 per company in
72
+ the same TSE industry, scored 0.5 × scale similarity + 0.5 × similarity of the report's
73
+ 事業の内容 and 経営方針 text) → `finish` (manifest, attribution, `VACUUM`).
74
+
75
+ The builder needs the dev extras (`pip install -e ".[dev]"`, which include numpy and
76
+ scikit-learn for the `peers` step); the server itself does not.
77
+
78
+ Downloads are cached in `build/edinet-cache/`, so an interrupted run resumes and a rebuild makes
79
+ no repeat calls. Requests go one at a time, 1 second apart, slowing down after an HTTP 429.
80
+
81
+ ## Data and licence
82
+
83
+ The code is MIT-licensed. Data from EDINET is used under the
84
+ [公共データ利用規約(第1.0版)](https://www.digital.go.jp/resources/open_data/public_data_license_v1.0)
85
+ (PDL1.0). The snapshot is processed data, not the original filings:
86
+
87
+ - 出典:EDINET閲覧(提出)サイト(https://disclosure2.edinet-fsa.go.jp/)、PDL1.0(https://www.digital.go.jp/resources/open_data/public_data_license_v1.0)
88
+ - EDINET閲覧(提出)サイトの提出書類をもとに GotoAI が加工して作成
@@ -0,0 +1,52 @@
1
+ [project]
2
+ name = "edinet-util-mcp-server"
3
+ version = "0.1.0.dev0"
4
+ description = "A skill-style MCP server for EDINET (金融庁) API v2 disclosures"
5
+ readme = "README.md"
6
+ license = "MIT"
7
+ license-files = ["LICENSE"]
8
+ requires-python = ">=3.11"
9
+ dependencies = [
10
+ "mcp>=2.3,<3",
11
+ "httpx>=0.27",
12
+ "lxml>=5",
13
+ ]
14
+
15
+ [project.optional-dependencies]
16
+ dev = [
17
+ "pytest>=8",
18
+ "pytest-asyncio>=0.24",
19
+ "ruff>=0.6",
20
+ "numpy>=1.26",
21
+ "scikit-learn>=1.4",
22
+ ]
23
+
24
+ [project.scripts]
25
+ edinet-util-mcp-server = "edinet_util_mcp_server.server:main"
26
+
27
+ # What to run, declared so a client that installs this wheel does not have to be
28
+ # told. Kari reads this group after installing a Python Package MCP server and
29
+ # fills its command field from it; the module is runnable with `-m`, which is
30
+ # what that field holds.
31
+ [project.entry-points."kari.mcp_servers"]
32
+ default = "edinet_util_mcp_server:main"
33
+
34
+ [build-system]
35
+ requires = ["hatchling>=1.26"]
36
+ build-backend = "hatchling.build"
37
+
38
+ [tool.hatch.build.targets.wheel]
39
+ packages = ["src/edinet_util_mcp_server"]
40
+
41
+ [tool.pytest.ini_options]
42
+ asyncio_mode = "auto"
43
+ testpaths = ["tests"]
44
+ pythonpath = ["src", "tools"]
45
+ markers = ["live: calls the real EDINET API (set EDINET_LIVE=1 to run)"]
46
+
47
+ [tool.ruff]
48
+ line-length = 100
49
+ target-version = "py311"
50
+
51
+ [tool.ruff.lint.isort]
52
+ known-first-party = ["edinet_util_mcp_server", "snapshot", "fixtures"]
@@ -0,0 +1,16 @@
1
+ edinet-company-profiles
2
+
3
+ Code (scripts/): MIT License, Copyright (c) 2026 GotoAI Inc. See the LICENSE file of
4
+ edinet-util-mcp-server.
5
+
6
+ Data (data/edinet_profiles.sqlite): processed data derived from documents filed on
7
+ EDINET, used under the Public Data License (Version 1.0) (公共データ利用規約 第1.0版).
8
+
9
+ 出典:EDINET閲覧(提出)サイト(https://disclosure2.edinet-fsa.go.jp/)、PDL1.0(https://www.digital.go.jp/resources/open_data/public_data_license_v1.0)
10
+ EDINET閲覧(提出)サイトの提出書類をもとに GotoAI が加工して作成
11
+
12
+ The data is processed: figures are read from the XBRL-to-CSV files of each company's
13
+ latest annual report, peer candidates are computed, and the filing index is a
14
+ selection of EDINET's daily document lists. It is not the original data and must not
15
+ be presented as unaltered government data. The snapshot date is in the database's
16
+ manifest table (`scripts/edinet_profiles.py about`).
@@ -0,0 +1,68 @@
1
+ ---
2
+ name: edinet-company-profiles
3
+ description: 日本の上場企業(約3,800社)のプロファイル・5年分の主要財務数値・同業候補・提出書類の書類管理番号を、EDINETの有価証券報告書から作った読み取り専用のデータベースで調べる。企業の概要確認、同業他社との比較、財務診断に使う。
4
+ metadata:
5
+ snapshot_id: "2026-11-02"
6
+ source: EDINET(金融庁)、PDL1.0
7
+ ---
8
+
9
+ # EDINET 企業プロファイル
10
+
11
+ EDINET の有価証券報告書から作った、上場企業のデータベースと、それを引くスクリプトです。
12
+ データは読み取り専用で、スナップショット時点(`about` で確認)までのものです。
13
+
14
+ - **このスキル**:会社を探す、プロファイルと5年分の数値、同業候補、指標の比較、書類管理番号。
15
+ - **edinet-util(MCPサーバー)**:書類そのものを読む(`export_filing`)、スナップショット後の提出を
16
+ 探す(`list_filings`)。本文や、データベースにない数値(有利子負債、設備投資、研究開発費、
17
+ セグメント別)はこちらで読みます。
18
+
19
+ 同業比較や財務診断を頼まれたら、まず `references/financial_diagnosis.md` を読んでください。
20
+
21
+ ## 使い方
22
+
23
+ Kari では python_run で、スキルのフォルダ(読み込み時に表示される Skill directory)の
24
+ スクリプトを呼びます。
25
+
26
+ ```python
27
+ import runpy
28
+ profiles = runpy.run_path("<Skill directory>/scripts/edinet_profiles.py")
29
+ status, text = profiles["run"](["compare", "5586"])
30
+ print(text)
31
+ ```
32
+
33
+ シェルが使える環境では `python scripts/edinet_profiles.py compare 5586` でも同じです。
34
+ 標準ライブラリだけで動きます。
35
+
36
+ | コマンド | 返すもの |
37
+ |---|---|
38
+ | `company <会社>` | プロファイル(証券コード、業種、市場、決算日、会計基準)と5年分の数値 |
39
+ | `peers <会社> [-n 10]` | 同業候補(同じ東証33業種で、規模と事業内容の文章が近い順。スコアと理由つき) |
40
+ | `compare <会社> [--peers "A,B"] [-n 5]` | 対象と同業他社の指標表、同業中央値・差・順位、推移、注記、各社の有価証券報告書の書類管理番号 |
41
+ | `filings <会社> [--types 120,160] [--limit 30]` | 提出書類の一覧と書類管理番号(120 有価証券報告書、160 半期報告書、180 臨時報告書) |
42
+ | `sql "SELECT …"` | 上で足りないときの読み取り専用クエリ(表と列は `about` に) |
43
+ | `about` | スナップショットの時点、件数、出所、表と列 |
44
+
45
+ - `<会社>` は証券コード(5586、5586.T、55860)、EDINETコード(E38755)、社名の一部(漢字・カナ・
46
+ 英語)のどれでも構いません。候補が複数あると一覧を返すので、コードで選び直してください。
47
+ - `--json` をつけると構造化データで返ります。
48
+ - `compare --peers` には利用者が挙げた同業他社を渡します。足りない分は同業候補の上位から順に
49
+ 補います(`-n` が合計の社数)。比較できない会社は理由つきで「外した企業」に出ます。
50
+
51
+ ## 数値の読み方
52
+
53
+ - 金額は円、比率は小数で保存しています(表示は百万円・%)。各社の最新期どうしの比較で、
54
+ 決算期が違えば注記に出ます。
55
+ - `sec_code` は EDINET の5桁(先頭4桁が普段の証券コード)です。表示は4桁にしてください。
56
+ - 状態が `ok` 以外の会社(3期未満、有価証券報告書なし、CSVなし)は数値と同業候補がありません。
57
+ 理由は `company` が示します。
58
+ - スナップショットより後に提出された書類は入っていません。新しい決算が出ていそうなときは
59
+ `list_filings` で確かめます。
60
+
61
+ ## 出典の表示(必ず守ってください)
62
+
63
+ スクリプトの出力の末尾に、出典・加工の表示・データ時点が付いています。この数値を使って
64
+ 回答や資料を作るときは、次の2行とデータ時点を必ず添えてください。加工したデータを、
65
+ 加工していない政府のデータであるかのように示してはいけません。
66
+
67
+ - 出典:EDINET閲覧(提出)サイト(https://disclosure2.edinet-fsa.go.jp/)、PDL1.0(https://www.digital.go.jp/resources/open_data/public_data_license_v1.0)
68
+ - EDINET閲覧(提出)サイトの提出書類をもとに GotoAI が加工して作成