modelcanon-mcp 0.1.0__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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Digital Lake
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,13 @@
1
+ # Legal & Third-Party Attribution Notice
2
+
3
+ ## ModelCanon
4
+ Copyright (c) 2026 Digital Lake (`https://github.com/digital-lake-ai/modelcanon`).
5
+ Licensed under the MIT License — see [LICENSE](./LICENSE).
6
+
7
+ ## Public Catalog & Documentation Sources
8
+ ModelCanon aggregates publicly accessible technical metadata from:
9
+ - **models.dev** (`https://models.dev/api.json`) — open-source AI model metadata catalog.
10
+ - **LiteLLM** (`https://github.com/BerriAI/litellm`) — open-source model pricing, context window, and RSS changelog datasets.
11
+ - **Official Provider Documentation** — Google Gemini (`ai.google.dev`), Anthropic Claude (`platform.claude.com`), OpenAI (`developers.openai.com`), DeepSeek (`api-docs.deepseek.com`), and Moonshot AI / Kimi (`platform.kimi.ai`, `platform.moonshot.ai`).
12
+
13
+ All third-party trademarks and model names remain the property of their respective owners.
@@ -0,0 +1,162 @@
1
+ Metadata-Version: 2.4
2
+ Name: modelcanon-mcp
3
+ Version: 0.1.0
4
+ Summary: Deterministic MCP server for official AI model changelogs, deprecation tracking, and live API specifications across Gemini, Claude, OpenAI, DeepSeek, and Kimi.
5
+ Author: HorchataHTML (Digital Lake)
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/digital-lake-ai/modelcanon#readme
8
+ Project-URL: Repository, https://github.com/digital-lake-ai/modelcanon
9
+ Project-URL: Issues, https://github.com/digital-lake-ai/modelcanon/issues
10
+ Keywords: mcp,mcp-server,ai-models,deprecations,changelog,llm
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Requires-Python: >=3.10
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ License-File: NOTICE.md
23
+ Dynamic: license-file
24
+
25
+ <!-- mcp-name: io.github.digital-lake-ai/modelcanon -->
26
+
27
+ # ModelCanon (`@digital-lake/modelcanon`)
28
+
29
+ [![CI](https://github.com/digital-lake-ai/modelcanon/actions/workflows/ci.yml/badge.svg)](https://github.com/digital-lake-ai/modelcanon/actions/workflows/ci.yml)
30
+ [![CodeQL](https://github.com/digital-lake-ai/modelcanon/actions/workflows/codeql.yml/badge.svg)](https://github.com/digital-lake-ai/modelcanon/actions/workflows/codeql.yml)
31
+ [![Organization](https://img.shields.io/badge/org-Digital_Lake-7c3aed)](https://github.com/digital-lake-ai)
32
+ [![TypeScript](https://img.shields.io/badge/TypeScript-Strict-3178c6?logo=typescript&logoColor=white)](https://github.com/digital-lake-ai/modelcanon)
33
+ [![Node.js](https://img.shields.io/badge/Node.js-%3E%3D20_LTS-339933?logo=nodedotjs&logoColor=white)](https://nodejs.org)
34
+ [![Platforms](https://img.shields.io/badge/Platforms-Linux_%7C_macOS_%7C_Windows-0284c7)](#zero-friction-installation)
35
+ [![License: MIT](https://img.shields.io/badge/license-MIT-0284c7)](./LICENSE)
36
+
37
+ **Deterministic MCP server for official AI model changelogs, deprecation tracking, and live API specifications across Google Gemini, Anthropic Claude, OpenAI, DeepSeek, and Moonshot Kimi.**
38
+
39
+ ModelCanon prevents coding agents and CI workflows from hardcoding retired model IDs, hitting unexpected shutdown redirects, or using unsupported API parameters (such as `temperature` on models that reject it) due to LLM training cutoffs. Every response is deterministic, cited with primary official URLs, and falls back instantly (`< 15 ms`) to a bundled offline seed snapshot when running in sandboxed or air-gapped environments.
40
+
41
+ ---
42
+
43
+ ## Coverage Matrix (Primary Official Sources)
44
+
45
+ | Provider | ID | Primary Machine-Readable Sources | Optional Live Catalog (`env`) |
46
+ | :--- | :--- | :--- | :--- |
47
+ | **Google Gemini** | `gemini` | `deprecations.md.txt`, `changelog.md.txt`, `llms.txt` | `GEMINI_API_KEY` (`GET /v1beta/models`) |
48
+ | **Anthropic Claude** | `claude` | `model-deprecations.md`, `release-notes/overview.md`, `llms.txt` | `ANTHROPIC_API_KEY` (`GET /v1/models`) |
49
+ | **OpenAI** | `openai` | `deprecations.md`, `changelog.md`, `news/rss.xml` | `OPENAI_API_KEY` (`GET /v1/models`) |
50
+ | **DeepSeek** | `deepseek` | `api-docs.deepseek.com/updates` | `DEEPSEEK_API_KEY` (`GET /models`) |
51
+ | **Moonshot AI (Kimi)** | `kimi` | `platform.kimi.ai/docs/llms.txt`, `pricing/chat.md` | `MOONSHOT_API_KEY` (`GET /v1/models`) |
52
+
53
+ Specs, context windows, output limits, and per-1M token pricing are deterministically enriched via `models.dev/api.json` (`GET`-only) and LiteLLM's open catalog and changelog RSS. No LLMs are invoked at runtime.
54
+
55
+ ---
56
+
57
+ ## Zero-Friction Installation
58
+
59
+ ### Option 1: Node.js (`npx`) — Cursor, VS Code, Claude Desktop, Antigravity
60
+
61
+ ```json
62
+ {
63
+ "mcpServers": {
64
+ "modelcanon": {
65
+ "command": "npx",
66
+ "args": ["-y", "@digital-lake/modelcanon"]
67
+ }
68
+ }
69
+ }
70
+ ```
71
+
72
+ ### Option 2: Python (`uvx`)
73
+
74
+ ```json
75
+ {
76
+ "mcpServers": {
77
+ "modelcanon": {
78
+ "command": "uvx",
79
+ "args": ["modelcanon-mcp"]
80
+ }
81
+ }
82
+ }
83
+ ```
84
+
85
+ ---
86
+
87
+ ## MCP Tools & Example Output
88
+
89
+ 1. **`audit_model_id(model_id)`**: Checks `active | deprecated | retired | unknown`, days remaining until shutdown, official replacement ID, context/output limits, parameter constraints, and citation URL.
90
+ 2. **`get_latest_updates(provider?, days?, category?, limit?)`**: Returns compact extractive changelog and deprecation entries (`< 150` tokens/item).
91
+ 3. **`list_active_models(provider?, include_deprecated?, limit?)`**: Lists active model IDs with context windows, max output tokens, and pricing per 1M tokens.
92
+
93
+ Example `audit_model_id({ "model_id": "claude-sonnet-4-5" })`:
94
+
95
+ ```json
96
+ {
97
+ "queried_id": "claude-sonnet-4-5",
98
+ "canonical_id": "claude-sonnet-4-5-20250929",
99
+ "provider": "claude",
100
+ "status": "deprecated",
101
+ "days_until_shutdown": 4,
102
+ "deprecation_date": "2026-09-30",
103
+ "shutdown_date": "2026-11-30",
104
+ "replacement_id": "claude-sonnet-5-5",
105
+ "context_window": 200000,
106
+ "max_output_tokens": 64000,
107
+ "supports_temperature": true,
108
+ "api_constraints": [],
109
+ "official_url": "https://platform.claude.com/docs/en/about-claude/model-deprecations.md",
110
+ "source_origin": "bundled_seed",
111
+ "stale": true,
112
+ "last_verified_at": "2026-11-26T08:00:00.000Z"
113
+ }
114
+ ```
115
+
116
+ ---
117
+
118
+ ## CLI Usage
119
+
120
+ ```bash
121
+ npx @digital-lake/modelcanon # Start stdio MCP server
122
+ npx @digital-lake/modelcanon audit gpt-4.1 --json # Audit a single model ID
123
+ npx @digital-lake/modelcanon sync --json # Refresh local JSON cache
124
+ ```
125
+
126
+ ---
127
+
128
+ ## Frequently Asked Questions
129
+
130
+ **How can my coding agent check if a Gemini or Claude model ID is deprecated?**
131
+ Install ModelCanon in your MCP client and invoke `audit_model_id` with any dated or undated model ID (e.g., `claude-sonnet-4-5`, `gemini-2.5-pro`, `gpt-4.1`).
132
+
133
+ **Does ModelCanon require provider API keys?**
134
+ No. All five adapters, `models.dev`, and LiteLLM operate without API keys. Setting `GEMINI_API_KEY`, `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `DEEPSEEK_API_KEY`, or `MOONSHOT_API_KEY` only enables optional live `GET /models` cross-checks.
135
+
136
+ **What happens if a model ID is unknown?**
137
+ ModelCanon returns `status: "unknown"` rather than guessing `"active"`.
138
+
139
+ **Does it work offline or inside read-only containers?**
140
+ Yes. Every release ships a verified `data/seed.json` snapshot and falls back automatically to in-memory cache when disk writes are blocked.
141
+
142
+ ---
143
+
144
+ ## First-Release Distribution Checklist (`v0.1.0`)
145
+
146
+ 1. Run `npm publish --access public` manually with 2FA to claim `@digital-lake/modelcanon` on npm.
147
+ 2. Link `.github/workflows/release.yml` as an npm OIDC Trusted Publisher within 48 hours.
148
+ 3. Configure PyPI Pending Publisher for `modelcanon-mcp` pointing to `digital-lake-ai/modelcanon` (`release.yml`, environment `Digital-Lake-ModelCanon`).
149
+ 4. Run `mcp-publisher login github && mcp-publisher publish` for `server.json` (`io.github.digital-lake-ai/modelcanon`).
150
+ 5. Claim the repository on Glama (`glama.json` + `Dockerfile`) and Smithery (`smithery.yaml`).
151
+
152
+ ## Security & Supply-Chain Guarantees
153
+
154
+ - **HTTPS-Only Ingestion:** Rejects non-HTTPS URLs, blocks `https` to `http` downgrade redirects, limits response sizes (`maxBytes`), and strips sensitive headers across cross-origin redirects.
155
+ - **Zero Shell Execution:** Subprocesses and `uvx` wrappers execute strictly with `shell: false` / `shell=False`.
156
+ - **Read-Only MCP Contracts:** All tools declare `readOnlyHint: true`, `destructiveHint: false`, `idempotentHint: true`, `outputSchema`, and `structuredContent`.
157
+ - **No Secret Persistence:** Optional provider API keys remain strictly in memory (`x-goog-api-key` header for Gemini, never query strings).
158
+ - **Automated Supply-Chain Controls:** Published with npm SLSA Provenance (OIDC), PyPI Trusted Publishing, CodeQL (`javascript-typescript` & `python`), and Dependabot.
159
+
160
+ ## License
161
+
162
+ MIT — see [LICENSE](./LICENSE) and [NOTICE.md](./NOTICE.md).
@@ -0,0 +1,138 @@
1
+ <!-- mcp-name: io.github.digital-lake-ai/modelcanon -->
2
+
3
+ # ModelCanon (`@digital-lake/modelcanon`)
4
+
5
+ [![CI](https://github.com/digital-lake-ai/modelcanon/actions/workflows/ci.yml/badge.svg)](https://github.com/digital-lake-ai/modelcanon/actions/workflows/ci.yml)
6
+ [![CodeQL](https://github.com/digital-lake-ai/modelcanon/actions/workflows/codeql.yml/badge.svg)](https://github.com/digital-lake-ai/modelcanon/actions/workflows/codeql.yml)
7
+ [![Organization](https://img.shields.io/badge/org-Digital_Lake-7c3aed)](https://github.com/digital-lake-ai)
8
+ [![TypeScript](https://img.shields.io/badge/TypeScript-Strict-3178c6?logo=typescript&logoColor=white)](https://github.com/digital-lake-ai/modelcanon)
9
+ [![Node.js](https://img.shields.io/badge/Node.js-%3E%3D20_LTS-339933?logo=nodedotjs&logoColor=white)](https://nodejs.org)
10
+ [![Platforms](https://img.shields.io/badge/Platforms-Linux_%7C_macOS_%7C_Windows-0284c7)](#zero-friction-installation)
11
+ [![License: MIT](https://img.shields.io/badge/license-MIT-0284c7)](./LICENSE)
12
+
13
+ **Deterministic MCP server for official AI model changelogs, deprecation tracking, and live API specifications across Google Gemini, Anthropic Claude, OpenAI, DeepSeek, and Moonshot Kimi.**
14
+
15
+ ModelCanon prevents coding agents and CI workflows from hardcoding retired model IDs, hitting unexpected shutdown redirects, or using unsupported API parameters (such as `temperature` on models that reject it) due to LLM training cutoffs. Every response is deterministic, cited with primary official URLs, and falls back instantly (`< 15 ms`) to a bundled offline seed snapshot when running in sandboxed or air-gapped environments.
16
+
17
+ ---
18
+
19
+ ## Coverage Matrix (Primary Official Sources)
20
+
21
+ | Provider | ID | Primary Machine-Readable Sources | Optional Live Catalog (`env`) |
22
+ | :--- | :--- | :--- | :--- |
23
+ | **Google Gemini** | `gemini` | `deprecations.md.txt`, `changelog.md.txt`, `llms.txt` | `GEMINI_API_KEY` (`GET /v1beta/models`) |
24
+ | **Anthropic Claude** | `claude` | `model-deprecations.md`, `release-notes/overview.md`, `llms.txt` | `ANTHROPIC_API_KEY` (`GET /v1/models`) |
25
+ | **OpenAI** | `openai` | `deprecations.md`, `changelog.md`, `news/rss.xml` | `OPENAI_API_KEY` (`GET /v1/models`) |
26
+ | **DeepSeek** | `deepseek` | `api-docs.deepseek.com/updates` | `DEEPSEEK_API_KEY` (`GET /models`) |
27
+ | **Moonshot AI (Kimi)** | `kimi` | `platform.kimi.ai/docs/llms.txt`, `pricing/chat.md` | `MOONSHOT_API_KEY` (`GET /v1/models`) |
28
+
29
+ Specs, context windows, output limits, and per-1M token pricing are deterministically enriched via `models.dev/api.json` (`GET`-only) and LiteLLM's open catalog and changelog RSS. No LLMs are invoked at runtime.
30
+
31
+ ---
32
+
33
+ ## Zero-Friction Installation
34
+
35
+ ### Option 1: Node.js (`npx`) — Cursor, VS Code, Claude Desktop, Antigravity
36
+
37
+ ```json
38
+ {
39
+ "mcpServers": {
40
+ "modelcanon": {
41
+ "command": "npx",
42
+ "args": ["-y", "@digital-lake/modelcanon"]
43
+ }
44
+ }
45
+ }
46
+ ```
47
+
48
+ ### Option 2: Python (`uvx`)
49
+
50
+ ```json
51
+ {
52
+ "mcpServers": {
53
+ "modelcanon": {
54
+ "command": "uvx",
55
+ "args": ["modelcanon-mcp"]
56
+ }
57
+ }
58
+ }
59
+ ```
60
+
61
+ ---
62
+
63
+ ## MCP Tools & Example Output
64
+
65
+ 1. **`audit_model_id(model_id)`**: Checks `active | deprecated | retired | unknown`, days remaining until shutdown, official replacement ID, context/output limits, parameter constraints, and citation URL.
66
+ 2. **`get_latest_updates(provider?, days?, category?, limit?)`**: Returns compact extractive changelog and deprecation entries (`< 150` tokens/item).
67
+ 3. **`list_active_models(provider?, include_deprecated?, limit?)`**: Lists active model IDs with context windows, max output tokens, and pricing per 1M tokens.
68
+
69
+ Example `audit_model_id({ "model_id": "claude-sonnet-4-5" })`:
70
+
71
+ ```json
72
+ {
73
+ "queried_id": "claude-sonnet-4-5",
74
+ "canonical_id": "claude-sonnet-4-5-20250929",
75
+ "provider": "claude",
76
+ "status": "deprecated",
77
+ "days_until_shutdown": 4,
78
+ "deprecation_date": "2026-09-30",
79
+ "shutdown_date": "2026-11-30",
80
+ "replacement_id": "claude-sonnet-5-5",
81
+ "context_window": 200000,
82
+ "max_output_tokens": 64000,
83
+ "supports_temperature": true,
84
+ "api_constraints": [],
85
+ "official_url": "https://platform.claude.com/docs/en/about-claude/model-deprecations.md",
86
+ "source_origin": "bundled_seed",
87
+ "stale": true,
88
+ "last_verified_at": "2026-11-26T08:00:00.000Z"
89
+ }
90
+ ```
91
+
92
+ ---
93
+
94
+ ## CLI Usage
95
+
96
+ ```bash
97
+ npx @digital-lake/modelcanon # Start stdio MCP server
98
+ npx @digital-lake/modelcanon audit gpt-4.1 --json # Audit a single model ID
99
+ npx @digital-lake/modelcanon sync --json # Refresh local JSON cache
100
+ ```
101
+
102
+ ---
103
+
104
+ ## Frequently Asked Questions
105
+
106
+ **How can my coding agent check if a Gemini or Claude model ID is deprecated?**
107
+ Install ModelCanon in your MCP client and invoke `audit_model_id` with any dated or undated model ID (e.g., `claude-sonnet-4-5`, `gemini-2.5-pro`, `gpt-4.1`).
108
+
109
+ **Does ModelCanon require provider API keys?**
110
+ No. All five adapters, `models.dev`, and LiteLLM operate without API keys. Setting `GEMINI_API_KEY`, `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `DEEPSEEK_API_KEY`, or `MOONSHOT_API_KEY` only enables optional live `GET /models` cross-checks.
111
+
112
+ **What happens if a model ID is unknown?**
113
+ ModelCanon returns `status: "unknown"` rather than guessing `"active"`.
114
+
115
+ **Does it work offline or inside read-only containers?**
116
+ Yes. Every release ships a verified `data/seed.json` snapshot and falls back automatically to in-memory cache when disk writes are blocked.
117
+
118
+ ---
119
+
120
+ ## First-Release Distribution Checklist (`v0.1.0`)
121
+
122
+ 1. Run `npm publish --access public` manually with 2FA to claim `@digital-lake/modelcanon` on npm.
123
+ 2. Link `.github/workflows/release.yml` as an npm OIDC Trusted Publisher within 48 hours.
124
+ 3. Configure PyPI Pending Publisher for `modelcanon-mcp` pointing to `digital-lake-ai/modelcanon` (`release.yml`, environment `Digital-Lake-ModelCanon`).
125
+ 4. Run `mcp-publisher login github && mcp-publisher publish` for `server.json` (`io.github.digital-lake-ai/modelcanon`).
126
+ 5. Claim the repository on Glama (`glama.json` + `Dockerfile`) and Smithery (`smithery.yaml`).
127
+
128
+ ## Security & Supply-Chain Guarantees
129
+
130
+ - **HTTPS-Only Ingestion:** Rejects non-HTTPS URLs, blocks `https` to `http` downgrade redirects, limits response sizes (`maxBytes`), and strips sensitive headers across cross-origin redirects.
131
+ - **Zero Shell Execution:** Subprocesses and `uvx` wrappers execute strictly with `shell: false` / `shell=False`.
132
+ - **Read-Only MCP Contracts:** All tools declare `readOnlyHint: true`, `destructiveHint: false`, `idempotentHint: true`, `outputSchema`, and `structuredContent`.
133
+ - **No Secret Persistence:** Optional provider API keys remain strictly in memory (`x-goog-api-key` header for Gemini, never query strings).
134
+ - **Automated Supply-Chain Controls:** Published with npm SLSA Provenance (OIDC), PyPI Trusted Publishing, CodeQL (`javascript-typescript` & `python`), and Dependabot.
135
+
136
+ ## License
137
+
138
+ MIT — see [LICENSE](./LICENSE) and [NOTICE.md](./NOTICE.md).
@@ -0,0 +1,37 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "modelcanon-mcp"
7
+ version = "0.1.0"
8
+ description = "Deterministic MCP server for official AI model changelogs, deprecation tracking, and live API specifications across Gemini, Claude, OpenAI, DeepSeek, and Kimi."
9
+ readme = "README.md"
10
+ license = "MIT"
11
+ requires-python = ">=3.10"
12
+ authors = [
13
+ { name = "HorchataHTML (Digital Lake)" }
14
+ ]
15
+ keywords = ["mcp", "mcp-server", "ai-models", "deprecations", "changelog", "llm"]
16
+ classifiers = [
17
+ "Development Status :: 4 - Beta",
18
+ "Intended Audience :: Developers",
19
+ "Operating System :: OS Independent",
20
+ "Programming Language :: Python :: 3",
21
+ "Programming Language :: Python :: 3.10",
22
+ "Programming Language :: Python :: 3.11",
23
+ "Programming Language :: Python :: 3.12",
24
+ "Programming Language :: Python :: 3.13",
25
+ ]
26
+
27
+ [project.urls]
28
+ Homepage = "https://github.com/digital-lake-ai/modelcanon#readme"
29
+ Repository = "https://github.com/digital-lake-ai/modelcanon"
30
+ Issues = "https://github.com/digital-lake-ai/modelcanon/issues"
31
+
32
+ [project.scripts]
33
+ modelcanon-mcp = "modelcanon_mcp:main_mcp"
34
+
35
+ [tool.setuptools.packages.find]
36
+ where = ["python"]
37
+ include = ["modelcanon_mcp*"]
@@ -0,0 +1,34 @@
1
+ """Cross-platform uvx/pip wrapper for @digital-lake/modelcanon MCP server."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import shutil
6
+ import subprocess
7
+ import sys
8
+ from typing import Sequence
9
+
10
+ __version__ = "0.1.0"
11
+ NPM_PACKAGE = f"@digital-lake/modelcanon@{__version__}"
12
+
13
+
14
+ def _resolve_npx() -> str:
15
+ for candidate in ("npx", "npx.cmd"):
16
+ resolved = shutil.which(candidate)
17
+ if resolved:
18
+ return resolved
19
+ raise FileNotFoundError(
20
+ "Node.js 'npx' executable was not found on PATH. Install Node.js >= 20 to run modelcanon-mcp."
21
+ )
22
+
23
+
24
+ def run_modelcanon(extra_args: Sequence[str] | None = None) -> int:
25
+ npx_bin = _resolve_npx()
26
+ cmd = [npx_bin, "--yes", NPM_PACKAGE]
27
+ if extra_args:
28
+ cmd.extend(extra_args)
29
+ completed = subprocess.run(cmd, shell=False, check=False)
30
+ return int(completed.returncode)
31
+
32
+
33
+ def main_mcp() -> None:
34
+ raise SystemExit(run_modelcanon(sys.argv[1:]))
@@ -0,0 +1,6 @@
1
+ """Module entrypoint for `python -m modelcanon_mcp`."""
2
+
3
+ from modelcanon_mcp import main_mcp
4
+
5
+ if __name__ == "__main__":
6
+ main_mcp()
@@ -0,0 +1,162 @@
1
+ Metadata-Version: 2.4
2
+ Name: modelcanon-mcp
3
+ Version: 0.1.0
4
+ Summary: Deterministic MCP server for official AI model changelogs, deprecation tracking, and live API specifications across Gemini, Claude, OpenAI, DeepSeek, and Kimi.
5
+ Author: HorchataHTML (Digital Lake)
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/digital-lake-ai/modelcanon#readme
8
+ Project-URL: Repository, https://github.com/digital-lake-ai/modelcanon
9
+ Project-URL: Issues, https://github.com/digital-lake-ai/modelcanon/issues
10
+ Keywords: mcp,mcp-server,ai-models,deprecations,changelog,llm
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Requires-Python: >=3.10
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ License-File: NOTICE.md
23
+ Dynamic: license-file
24
+
25
+ <!-- mcp-name: io.github.digital-lake-ai/modelcanon -->
26
+
27
+ # ModelCanon (`@digital-lake/modelcanon`)
28
+
29
+ [![CI](https://github.com/digital-lake-ai/modelcanon/actions/workflows/ci.yml/badge.svg)](https://github.com/digital-lake-ai/modelcanon/actions/workflows/ci.yml)
30
+ [![CodeQL](https://github.com/digital-lake-ai/modelcanon/actions/workflows/codeql.yml/badge.svg)](https://github.com/digital-lake-ai/modelcanon/actions/workflows/codeql.yml)
31
+ [![Organization](https://img.shields.io/badge/org-Digital_Lake-7c3aed)](https://github.com/digital-lake-ai)
32
+ [![TypeScript](https://img.shields.io/badge/TypeScript-Strict-3178c6?logo=typescript&logoColor=white)](https://github.com/digital-lake-ai/modelcanon)
33
+ [![Node.js](https://img.shields.io/badge/Node.js-%3E%3D20_LTS-339933?logo=nodedotjs&logoColor=white)](https://nodejs.org)
34
+ [![Platforms](https://img.shields.io/badge/Platforms-Linux_%7C_macOS_%7C_Windows-0284c7)](#zero-friction-installation)
35
+ [![License: MIT](https://img.shields.io/badge/license-MIT-0284c7)](./LICENSE)
36
+
37
+ **Deterministic MCP server for official AI model changelogs, deprecation tracking, and live API specifications across Google Gemini, Anthropic Claude, OpenAI, DeepSeek, and Moonshot Kimi.**
38
+
39
+ ModelCanon prevents coding agents and CI workflows from hardcoding retired model IDs, hitting unexpected shutdown redirects, or using unsupported API parameters (such as `temperature` on models that reject it) due to LLM training cutoffs. Every response is deterministic, cited with primary official URLs, and falls back instantly (`< 15 ms`) to a bundled offline seed snapshot when running in sandboxed or air-gapped environments.
40
+
41
+ ---
42
+
43
+ ## Coverage Matrix (Primary Official Sources)
44
+
45
+ | Provider | ID | Primary Machine-Readable Sources | Optional Live Catalog (`env`) |
46
+ | :--- | :--- | :--- | :--- |
47
+ | **Google Gemini** | `gemini` | `deprecations.md.txt`, `changelog.md.txt`, `llms.txt` | `GEMINI_API_KEY` (`GET /v1beta/models`) |
48
+ | **Anthropic Claude** | `claude` | `model-deprecations.md`, `release-notes/overview.md`, `llms.txt` | `ANTHROPIC_API_KEY` (`GET /v1/models`) |
49
+ | **OpenAI** | `openai` | `deprecations.md`, `changelog.md`, `news/rss.xml` | `OPENAI_API_KEY` (`GET /v1/models`) |
50
+ | **DeepSeek** | `deepseek` | `api-docs.deepseek.com/updates` | `DEEPSEEK_API_KEY` (`GET /models`) |
51
+ | **Moonshot AI (Kimi)** | `kimi` | `platform.kimi.ai/docs/llms.txt`, `pricing/chat.md` | `MOONSHOT_API_KEY` (`GET /v1/models`) |
52
+
53
+ Specs, context windows, output limits, and per-1M token pricing are deterministically enriched via `models.dev/api.json` (`GET`-only) and LiteLLM's open catalog and changelog RSS. No LLMs are invoked at runtime.
54
+
55
+ ---
56
+
57
+ ## Zero-Friction Installation
58
+
59
+ ### Option 1: Node.js (`npx`) — Cursor, VS Code, Claude Desktop, Antigravity
60
+
61
+ ```json
62
+ {
63
+ "mcpServers": {
64
+ "modelcanon": {
65
+ "command": "npx",
66
+ "args": ["-y", "@digital-lake/modelcanon"]
67
+ }
68
+ }
69
+ }
70
+ ```
71
+
72
+ ### Option 2: Python (`uvx`)
73
+
74
+ ```json
75
+ {
76
+ "mcpServers": {
77
+ "modelcanon": {
78
+ "command": "uvx",
79
+ "args": ["modelcanon-mcp"]
80
+ }
81
+ }
82
+ }
83
+ ```
84
+
85
+ ---
86
+
87
+ ## MCP Tools & Example Output
88
+
89
+ 1. **`audit_model_id(model_id)`**: Checks `active | deprecated | retired | unknown`, days remaining until shutdown, official replacement ID, context/output limits, parameter constraints, and citation URL.
90
+ 2. **`get_latest_updates(provider?, days?, category?, limit?)`**: Returns compact extractive changelog and deprecation entries (`< 150` tokens/item).
91
+ 3. **`list_active_models(provider?, include_deprecated?, limit?)`**: Lists active model IDs with context windows, max output tokens, and pricing per 1M tokens.
92
+
93
+ Example `audit_model_id({ "model_id": "claude-sonnet-4-5" })`:
94
+
95
+ ```json
96
+ {
97
+ "queried_id": "claude-sonnet-4-5",
98
+ "canonical_id": "claude-sonnet-4-5-20250929",
99
+ "provider": "claude",
100
+ "status": "deprecated",
101
+ "days_until_shutdown": 4,
102
+ "deprecation_date": "2026-09-30",
103
+ "shutdown_date": "2026-11-30",
104
+ "replacement_id": "claude-sonnet-5-5",
105
+ "context_window": 200000,
106
+ "max_output_tokens": 64000,
107
+ "supports_temperature": true,
108
+ "api_constraints": [],
109
+ "official_url": "https://platform.claude.com/docs/en/about-claude/model-deprecations.md",
110
+ "source_origin": "bundled_seed",
111
+ "stale": true,
112
+ "last_verified_at": "2026-11-26T08:00:00.000Z"
113
+ }
114
+ ```
115
+
116
+ ---
117
+
118
+ ## CLI Usage
119
+
120
+ ```bash
121
+ npx @digital-lake/modelcanon # Start stdio MCP server
122
+ npx @digital-lake/modelcanon audit gpt-4.1 --json # Audit a single model ID
123
+ npx @digital-lake/modelcanon sync --json # Refresh local JSON cache
124
+ ```
125
+
126
+ ---
127
+
128
+ ## Frequently Asked Questions
129
+
130
+ **How can my coding agent check if a Gemini or Claude model ID is deprecated?**
131
+ Install ModelCanon in your MCP client and invoke `audit_model_id` with any dated or undated model ID (e.g., `claude-sonnet-4-5`, `gemini-2.5-pro`, `gpt-4.1`).
132
+
133
+ **Does ModelCanon require provider API keys?**
134
+ No. All five adapters, `models.dev`, and LiteLLM operate without API keys. Setting `GEMINI_API_KEY`, `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `DEEPSEEK_API_KEY`, or `MOONSHOT_API_KEY` only enables optional live `GET /models` cross-checks.
135
+
136
+ **What happens if a model ID is unknown?**
137
+ ModelCanon returns `status: "unknown"` rather than guessing `"active"`.
138
+
139
+ **Does it work offline or inside read-only containers?**
140
+ Yes. Every release ships a verified `data/seed.json` snapshot and falls back automatically to in-memory cache when disk writes are blocked.
141
+
142
+ ---
143
+
144
+ ## First-Release Distribution Checklist (`v0.1.0`)
145
+
146
+ 1. Run `npm publish --access public` manually with 2FA to claim `@digital-lake/modelcanon` on npm.
147
+ 2. Link `.github/workflows/release.yml` as an npm OIDC Trusted Publisher within 48 hours.
148
+ 3. Configure PyPI Pending Publisher for `modelcanon-mcp` pointing to `digital-lake-ai/modelcanon` (`release.yml`, environment `Digital-Lake-ModelCanon`).
149
+ 4. Run `mcp-publisher login github && mcp-publisher publish` for `server.json` (`io.github.digital-lake-ai/modelcanon`).
150
+ 5. Claim the repository on Glama (`glama.json` + `Dockerfile`) and Smithery (`smithery.yaml`).
151
+
152
+ ## Security & Supply-Chain Guarantees
153
+
154
+ - **HTTPS-Only Ingestion:** Rejects non-HTTPS URLs, blocks `https` to `http` downgrade redirects, limits response sizes (`maxBytes`), and strips sensitive headers across cross-origin redirects.
155
+ - **Zero Shell Execution:** Subprocesses and `uvx` wrappers execute strictly with `shell: false` / `shell=False`.
156
+ - **Read-Only MCP Contracts:** All tools declare `readOnlyHint: true`, `destructiveHint: false`, `idempotentHint: true`, `outputSchema`, and `structuredContent`.
157
+ - **No Secret Persistence:** Optional provider API keys remain strictly in memory (`x-goog-api-key` header for Gemini, never query strings).
158
+ - **Automated Supply-Chain Controls:** Published with npm SLSA Provenance (OIDC), PyPI Trusted Publishing, CodeQL (`javascript-typescript` & `python`), and Dependabot.
159
+
160
+ ## License
161
+
162
+ MIT — see [LICENSE](./LICENSE) and [NOTICE.md](./NOTICE.md).
@@ -0,0 +1,11 @@
1
+ LICENSE
2
+ NOTICE.md
3
+ README.md
4
+ pyproject.toml
5
+ python/modelcanon_mcp/__init__.py
6
+ python/modelcanon_mcp/__main__.py
7
+ python/modelcanon_mcp.egg-info/PKG-INFO
8
+ python/modelcanon_mcp.egg-info/SOURCES.txt
9
+ python/modelcanon_mcp.egg-info/dependency_links.txt
10
+ python/modelcanon_mcp.egg-info/entry_points.txt
11
+ python/modelcanon_mcp.egg-info/top_level.txt
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ modelcanon-mcp = modelcanon_mcp:main_mcp
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+