mcp-ship-check 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,18 @@
1
+ name: test
2
+ on: [push, pull_request]
3
+ jobs:
4
+ test:
5
+ runs-on: ubuntu-latest
6
+ strategy:
7
+ matrix:
8
+ python: ["3.11", "3.13"]
9
+ steps:
10
+ - uses: actions/checkout@v4
11
+ - uses: actions/setup-python@v5
12
+ with:
13
+ python-version: ${{ matrix.python }}
14
+ - run: pip install -e ".[dev,mcp]"
15
+ - run: pytest -q
16
+ - name: Dogfood - the checker checks itself (live)
17
+ run: mcp-ship-check . --command mcp-ship-check-mcp --json > report.json || true
18
+ - run: python -c "import json;r=json.load(open('report.json'));print(r['score'],r['grade']);assert r['counts']['fail']==0,r"
@@ -0,0 +1,5 @@
1
+ .venv/
2
+ __pycache__/
3
+ dist/
4
+ *.egg-info/
5
+ .pytest_cache/
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Saad Ali Khan
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,109 @@
1
+ Metadata-Version: 2.5
2
+ Name: mcp-ship-check
3
+ Version: 0.1.0
4
+ Summary: Pre-flight checker for MCP servers: annotations, tests, packaging, live stdio handshake, Glama build spec. CLI, MCP server and Claude Code skill.
5
+ Project-URL: Homepage, https://github.com/ali-saad-khan/mcp-ship-check
6
+ Project-URL: Source, https://github.com/ali-saad-khan/mcp-ship-check
7
+ Project-URL: Issues, https://github.com/ali-saad-khan/mcp-ship-check/issues
8
+ License: MIT
9
+ License-File: LICENSE
10
+ Keywords: checker,claude-code,glama,lint,mcp,model-context-protocol,quality,skill
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Topic :: Software Development :: Quality Assurance
16
+ Requires-Python: >=3.11
17
+ Provides-Extra: dev
18
+ Requires-Dist: pytest>=8; extra == 'dev'
19
+ Provides-Extra: mcp
20
+ Requires-Dist: mcp>=1.2; extra == 'mcp'
21
+ Description-Content-Type: text/markdown
22
+
23
+ # mcp-ship-check
24
+
25
+ **Pre-flight checker for MCP servers.** One command tells you whether your repo is ready to publish and exactly what to fix: tool annotations, tests per tool, README, packaging, committed secrets, a live stdio handshake against the real server, and the Glama build spec that actually works.
26
+
27
+ Most MCP servers listed in directories are abandoned or break on first run. This is the checklist that avoids that, as a CLI, an MCP server and a Claude Code skill. No dependencies for the CLI.
28
+
29
+ ```console
30
+ $ pip install mcp-ship-check
31
+ $ mcp-ship-check path/to/your-server --live
32
+
33
+ PASS LICENSE file present
34
+ PASS tools discovered statically
35
+ 5 tools: check_environment, fetch_poem, make_music_bed, plan_poem, render_poem
36
+ PASS every tool is named in a test
37
+ WARN mcp dependency declared where default installs get it
38
+ mcp is only in the optional extra [mcp]
39
+ fix: A plain `uv sync` or `pip install .` will not install it and the server will not start. ...
40
+ PASS stdio initialize and tools/list succeed
41
+ ready in 1.2s; versereel 2.x; 5 tools
42
+ PASS all four annotation hints on every tool (live)
43
+ WARN every parameter is described
44
+ 17/17 parameters have no description, e.g. plan_poem.title, plan_poem.stanzas, ...
45
+ INFO recommended Glama build spec
46
+ Build steps: ["uv pip install --python /usr/local/bin/python --break-system-packages 'versereel[mcp]==0.1.2'", ...]
47
+ CMD arguments: ['mcp-proxy', '--', 'python', '-m', 'versereel.mcp_server']
48
+
49
+ score 95/100 (grade A) 18 pass, 3 warn, 0 fail
50
+ ```
51
+
52
+ ## What it checks
53
+
54
+ | Area | Checks |
55
+ |---|---|
56
+ | Repo | LICENSE, README (install + client config + every tool named), CI runs tests, tests exist and name every tool, git tag for the version |
57
+ | Packaging | pyproject metadata, console-script entry point, `python -m` start-up guard, `mcp` dependency reachable by a default install |
58
+ | Tools (static, AST) | `@x.tool(...)` found; all four annotation hints (`readOnlyHint`, `destructiveHint`, `idempotentHint`, `openWorldHint`) explicit; TypeScript `server.tool(...)` names found |
59
+ | Security | known key patterns (placeholders ignored), tracked `.env`/keys, `eval`/`exec`/`shell=True` to review |
60
+ | Live (opt-in) | stdio `initialize` + `tools/list` within 10 s, clean stdout (no stray `print`), real tool descriptions, all four hints, parameter descriptions, snake_case names |
61
+ | Glama | prints the build steps and command to paste into Glama's Admin > Dockerfile |
62
+
63
+ Score is 0-100 with grade A-D. Exit code is 1 on any FAIL (`--strict`: warnings too), so it works in CI.
64
+
65
+ ```bash
66
+ mcp-ship-check . # static: reads files, never runs your code
67
+ mcp-ship-check . --live # also starts the repo's console script and inspects the real tools
68
+ mcp-ship-check . --command "my-server" # explicit launch command
69
+ mcp-ship-check . --markdown # paste into a PR; --json for CI; --list-checks
70
+ ```
71
+
72
+ ### In CI
73
+ ```yaml
74
+ - run: pip install mcp-ship-check
75
+ - run: mcp-ship-check . --command my-server --strict
76
+ ```
77
+
78
+ ## Safety
79
+ Static mode only reads files. **`--live` / `--command` start the server process**, so only use them on code you trust (ideally inside a container). The MCP server wrapper keeps these apart: `check_repo` is read-only; `check_live` is annotated as destructive because it runs a command.
80
+
81
+ ## As an MCP server
82
+ ```bash
83
+ pip install "mcp-ship-check[mcp]"
84
+ ```
85
+ ```json
86
+ { "mcpServers": { "mcp-ship-check": { "command": "mcp-ship-check-mcp" } } }
87
+ ```
88
+ Tools: `check_repo` (static, read-only), `check_live` (runs the server command), `list_checks`.
89
+
90
+ ## As a Claude Code skill
91
+ Copy `skill/mcp-ship-check/` to `~/.claude/skills/mcp-ship-check/`. It runs the checker, applies fixes in the right order, and walks through PyPI, release, Glama and directory listings (`references/directories.md`).
92
+
93
+ ## Why these checks
94
+ They come from shipping [versereel](https://github.com/ali-saad-khan/versereel): missing annotation hints, a Glama default build that could not start the server (extra not installed, entry point not on PATH), no release, and no test per tool each cost time. The checker dogfoods itself: CI runs it against its own MCP server.
95
+
96
+ ## Limits
97
+ Static tool discovery understands Python `@x.tool(...)` decorators and simple TypeScript `server.tool("name", ...)` calls; tools registered another way are only seen in live mode. The Glama spec assumes a package published on PyPI. Checks are heuristics, not a security audit.
98
+
99
+ ## Develop
100
+ ```bash
101
+ git clone https://github.com/ali-saad-khan/mcp-ship-check && cd mcp-ship-check
102
+ uv venv && uv pip install -e ".[dev,mcp]" && pytest
103
+ ```
104
+
105
+ ## Author
106
+ Built by Saad Ali Khan, a full stack and AI engineer. Portfolio: [saadconsulting.tech](https://saadconsulting.tech). Available for freelance work on AI tooling, MCP servers and automation.
107
+
108
+ ## Licence
109
+ MIT
@@ -0,0 +1,87 @@
1
+ # mcp-ship-check
2
+
3
+ **Pre-flight checker for MCP servers.** One command tells you whether your repo is ready to publish and exactly what to fix: tool annotations, tests per tool, README, packaging, committed secrets, a live stdio handshake against the real server, and the Glama build spec that actually works.
4
+
5
+ Most MCP servers listed in directories are abandoned or break on first run. This is the checklist that avoids that, as a CLI, an MCP server and a Claude Code skill. No dependencies for the CLI.
6
+
7
+ ```console
8
+ $ pip install mcp-ship-check
9
+ $ mcp-ship-check path/to/your-server --live
10
+
11
+ PASS LICENSE file present
12
+ PASS tools discovered statically
13
+ 5 tools: check_environment, fetch_poem, make_music_bed, plan_poem, render_poem
14
+ PASS every tool is named in a test
15
+ WARN mcp dependency declared where default installs get it
16
+ mcp is only in the optional extra [mcp]
17
+ fix: A plain `uv sync` or `pip install .` will not install it and the server will not start. ...
18
+ PASS stdio initialize and tools/list succeed
19
+ ready in 1.2s; versereel 2.x; 5 tools
20
+ PASS all four annotation hints on every tool (live)
21
+ WARN every parameter is described
22
+ 17/17 parameters have no description, e.g. plan_poem.title, plan_poem.stanzas, ...
23
+ INFO recommended Glama build spec
24
+ Build steps: ["uv pip install --python /usr/local/bin/python --break-system-packages 'versereel[mcp]==0.1.2'", ...]
25
+ CMD arguments: ['mcp-proxy', '--', 'python', '-m', 'versereel.mcp_server']
26
+
27
+ score 95/100 (grade A) 18 pass, 3 warn, 0 fail
28
+ ```
29
+
30
+ ## What it checks
31
+
32
+ | Area | Checks |
33
+ |---|---|
34
+ | Repo | LICENSE, README (install + client config + every tool named), CI runs tests, tests exist and name every tool, git tag for the version |
35
+ | Packaging | pyproject metadata, console-script entry point, `python -m` start-up guard, `mcp` dependency reachable by a default install |
36
+ | Tools (static, AST) | `@x.tool(...)` found; all four annotation hints (`readOnlyHint`, `destructiveHint`, `idempotentHint`, `openWorldHint`) explicit; TypeScript `server.tool(...)` names found |
37
+ | Security | known key patterns (placeholders ignored), tracked `.env`/keys, `eval`/`exec`/`shell=True` to review |
38
+ | Live (opt-in) | stdio `initialize` + `tools/list` within 10 s, clean stdout (no stray `print`), real tool descriptions, all four hints, parameter descriptions, snake_case names |
39
+ | Glama | prints the build steps and command to paste into Glama's Admin > Dockerfile |
40
+
41
+ Score is 0-100 with grade A-D. Exit code is 1 on any FAIL (`--strict`: warnings too), so it works in CI.
42
+
43
+ ```bash
44
+ mcp-ship-check . # static: reads files, never runs your code
45
+ mcp-ship-check . --live # also starts the repo's console script and inspects the real tools
46
+ mcp-ship-check . --command "my-server" # explicit launch command
47
+ mcp-ship-check . --markdown # paste into a PR; --json for CI; --list-checks
48
+ ```
49
+
50
+ ### In CI
51
+ ```yaml
52
+ - run: pip install mcp-ship-check
53
+ - run: mcp-ship-check . --command my-server --strict
54
+ ```
55
+
56
+ ## Safety
57
+ Static mode only reads files. **`--live` / `--command` start the server process**, so only use them on code you trust (ideally inside a container). The MCP server wrapper keeps these apart: `check_repo` is read-only; `check_live` is annotated as destructive because it runs a command.
58
+
59
+ ## As an MCP server
60
+ ```bash
61
+ pip install "mcp-ship-check[mcp]"
62
+ ```
63
+ ```json
64
+ { "mcpServers": { "mcp-ship-check": { "command": "mcp-ship-check-mcp" } } }
65
+ ```
66
+ Tools: `check_repo` (static, read-only), `check_live` (runs the server command), `list_checks`.
67
+
68
+ ## As a Claude Code skill
69
+ Copy `skill/mcp-ship-check/` to `~/.claude/skills/mcp-ship-check/`. It runs the checker, applies fixes in the right order, and walks through PyPI, release, Glama and directory listings (`references/directories.md`).
70
+
71
+ ## Why these checks
72
+ They come from shipping [versereel](https://github.com/ali-saad-khan/versereel): missing annotation hints, a Glama default build that could not start the server (extra not installed, entry point not on PATH), no release, and no test per tool each cost time. The checker dogfoods itself: CI runs it against its own MCP server.
73
+
74
+ ## Limits
75
+ Static tool discovery understands Python `@x.tool(...)` decorators and simple TypeScript `server.tool("name", ...)` calls; tools registered another way are only seen in live mode. The Glama spec assumes a package published on PyPI. Checks are heuristics, not a security audit.
76
+
77
+ ## Develop
78
+ ```bash
79
+ git clone https://github.com/ali-saad-khan/mcp-ship-check && cd mcp-ship-check
80
+ uv venv && uv pip install -e ".[dev,mcp]" && pytest
81
+ ```
82
+
83
+ ## Author
84
+ Built by Saad Ali Khan, a full stack and AI engineer. Portfolio: [saadconsulting.tech](https://saadconsulting.tech). Available for freelance work on AI tooling, MCP servers and automation.
85
+
86
+ ## Licence
87
+ MIT
@@ -0,0 +1,28 @@
1
+ # mcp-ship-check: plan
2
+
3
+ **Goal:** one command tells an MCP server author whether the repo is ready to ship, and exactly what to fix. Free MIT release first; pricing only on demand (see the channel repo's `docs/tools-roadmap.md`).
4
+
5
+ **Why it is needed:** the open gap in MCP is quality, not categories. Shipping versereel took a day of avoidable traps: missing annotation hints, a Glama default build that cannot start the server, no release, no test per tool. This tool automates that checklist.
6
+
7
+ **What it is:** a dependency-free Python CLI (`mcp-ship-check`), an MCP server wrapping it (`mcp-ship-check-mcp`, annotated and self-checked), and a Claude skill that walks through fixing and shipping.
8
+
9
+ ## Checks
10
+ - **Repo:** LICENSE, README with install and each tool named, CI, tests, tests that name every tool, secrets scan, tracked `.env`, git tag for the version.
11
+ - **Python packaging:** pyproject metadata, entry point, `mcp` dependency (warn if only an optional extra: Glama's default `uv sync` will not install it), `__main__` guard so `python -m pkg.module` starts the server.
12
+ - **Tools (static, AST):** `@x.tool(...)` found, all four annotation hints explicit.
13
+ - **Live (opt-in, runs the server command):** stdio handshake, time to ready, clean stdout, tool descriptions, all four hints, parameter descriptions, snake_case names.
14
+ - **Glama:** recommended build spec printed for the Admin form.
15
+ - Score 0-100 and grade; exit code 1 on any FAIL (`--strict`: also on WARN); text, JSON or Markdown output.
16
+
17
+ ## Phases (one at a time, each shippable)
18
+ 1. **Core:** repo and packaging checks, static tool scan, report, CLI, tests.
19
+ 2. **Live:** stdlib JSON-RPC stdio client, live checks, fake-server tests.
20
+ 3. **MCP server + skill:** `check_repo` (read-only), `check_live` (runs a command, flagged as such), `list_checks`; SKILL.md and directory reference.
21
+ 4. **Ship:** GitHub repo, CI green, dogfood (run it on versereel and itself), PyPI, Glama claim and release, M8ven badge.
22
+ 5. **Advertise:** README with real output, portfolio case study, LinkedIn post draft, directory submissions (mcpservers.org, awesome-mcp-servers PR), Show HN draft. Posts and PRs only after the owner's go.
23
+
24
+ ## Safety
25
+ Static mode never executes repo code. Live mode starts the given command: only use it on code you trust, ideally in a container.
26
+
27
+ ## Pricing ideas (later, on demand)
28
+ Hosted GitHub App or Action that comments the report on PRs; Pro rules (supply-chain, schema quality); consulting. Core stays free.
@@ -0,0 +1,39 @@
1
+ [project]
2
+ name = "mcp-ship-check"
3
+ version = "0.1.0"
4
+ description = "Pre-flight checker for MCP servers: annotations, tests, packaging, live stdio handshake, Glama build spec. CLI, MCP server and Claude Code skill."
5
+ readme = "README.md"
6
+ license = { text = "MIT" }
7
+ requires-python = ">=3.11"
8
+ dependencies = []
9
+ keywords = ["mcp", "model-context-protocol", "lint", "checker", "claude-code", "skill", "glama", "quality"]
10
+ classifiers = [
11
+ "Development Status :: 4 - Beta",
12
+ "Intended Audience :: Developers",
13
+ "License :: OSI Approved :: MIT License",
14
+ "Programming Language :: Python :: 3",
15
+ "Topic :: Software Development :: Quality Assurance",
16
+ ]
17
+
18
+ [project.urls]
19
+ Homepage = "https://github.com/ali-saad-khan/mcp-ship-check"
20
+ Source = "https://github.com/ali-saad-khan/mcp-ship-check"
21
+ Issues = "https://github.com/ali-saad-khan/mcp-ship-check/issues"
22
+
23
+ [project.optional-dependencies]
24
+ mcp = ["mcp>=1.2"]
25
+ dev = ["pytest>=8"]
26
+
27
+ [project.scripts]
28
+ mcp-ship-check = "mcp_ship_check.cli:main"
29
+ mcp-ship-check-mcp = "mcp_ship_check.mcp_server:main"
30
+
31
+ [build-system]
32
+ requires = ["hatchling"]
33
+ build-backend = "hatchling.build"
34
+
35
+ [tool.hatch.build.targets.wheel]
36
+ packages = ["src/mcp_ship_check"]
37
+
38
+ [tool.pytest.ini_options]
39
+ testpaths = ["tests"]
@@ -0,0 +1,39 @@
1
+ ---
2
+ name: mcp-ship-check
3
+ description: Check that an MCP server repo is ready to ship and fix what is missing, then publish it to directories. Runs the mcp-ship-check CLI (annotation hints, tests per tool, README, packaging, secrets, live stdio handshake, Glama build spec), applies the fixes, and walks through PyPI, git tag, Glama claim and release, awesome-mcp-servers and other listings. Use for "is my MCP server ready to publish", "ship my MCP server", "Glama build fails", "add tool annotations", "MCP quality score", "submit to MCP directories".
4
+ ---
5
+
6
+ # mcp-ship-check
7
+
8
+ Ship an MCP server the way registries and scanners expect. Static checks never run the repo's code; **live checks execute the server command, so only run them on code you trust.**
9
+
10
+ ## 0. Install
11
+ ```bash
12
+ pip install "mcp-ship-check[mcp]" # CLI + optional MCP server (mcp-ship-check-mcp)
13
+ ```
14
+
15
+ ## 1. Check
16
+ ```bash
17
+ mcp-ship-check . # static: safe, reads files only
18
+ mcp-ship-check . --live # + start the repo's console script over stdio and inspect the real tools
19
+ mcp-ship-check . --command "my-server" # same, explicit command
20
+ mcp-ship-check . --markdown # paste into a PR; --json for CI; --strict fails on warnings too
21
+ ```
22
+ Read the FAIL lines first (they exit 1), then WARN, then INFO. Each carries a `fix:`.
23
+
24
+ ## 2. Fix, in this order
25
+ 1. **Secrets** (`sec.secrets`, `sec.env_tracked`): rotate first, then remove from the repo and history.
26
+ 2. **Annotations**: every tool needs all four hints as explicit booleans: `readOnlyHint`, `destructiveHint`, `idempotentHint`, `openWorldHint`. Rule of thumb: pure readers `read_only=True, destructive=False, idempotent=True`; tools that write or overwrite files `read_only=False, destructive=True`; anything calling the network `open_world=True`; anything that runs code the caller supplies is destructive and not idempotent.
27
+ 3. **Tests**: one test per tool name at minimum (scanners count this), plus a test that starts the server.
28
+ 4. **README**: install line, an `mcpServers` config snippet, one line per tool.
29
+ 5. **Parameter descriptions**: `Annotated[str, Field(description="...")]`. Do not put `from __future__ import annotations` in the module that defines tools if you alias types locally; pydantic cannot resolve them.
30
+ 6. **stdout**: never `print()` in a stdio server; log to stderr.
31
+ 7. **Packaging**: console script, `if __name__ == "__main__": main()`, project URLs, classifiers, a git tag and GitHub release for the version.
32
+
33
+ Re-run until no FAIL remains. Aim for grade A.
34
+
35
+ ## 3. Publish
36
+ Follow `references/directories.md` (order matters: PyPI, tag and release, Glama, then lists that require Glama). Ask the owner before any public step: PyPI upload, GitHub release, directory submissions, PRs and posts are all outward actions.
37
+
38
+ ## 4. Glama build (the traps)
39
+ `mcp-ship-check` prints a recommended spec (`glama.spec`). The default `uv sync` build usually fails because the `mcp` extra is not installed and the console script is not on PATH. Use build steps that install the published package into `/usr/local/bin/python` and a command `mcp-proxy -- python -m <module>`. Add `apt-get` steps first if the server needs ffmpeg, fonts or other system tools. Run **Build**, read the test page if it fails (reload it; it does not live-update), then **Build & Release**. The form resets on reload until a build has saved it.
@@ -0,0 +1,11 @@
1
+ # Where to list an MCP server (order that worked)
2
+
3
+ 1. **PyPI**: `python -m build && twine upload dist/*`. Wait for the JSON page to return 200, then do a clean `pip install` test.
4
+ 2. **Git tag + GitHub release** (`v<version>`). Glama and others look for a release.
5
+ 3. **Glama** (glama.ai): the server is usually auto-listed. Sign in, open the listing's Admin tab, **Connect GitHub** (this claims it), then set the Dockerfile build spec, **Build**, **Build & Release**. Add the Glama badge to the README (some lists require it).
6
+ 4. **mcpservers.org**: free submission form. Approval can take a day or two.
7
+ 5. **punkpeye/awesome-mcp-servers**: PR adding one line in the right category, alphabetical, with the emoji tags. The bot asks for the Glama listing and a quality score, so do Glama first.
8
+ 6. **M8ven** (m8ven.ai): auto-indexes public GitHub MCP servers and grades them. Optional: claim, badge in the README. Treat "Connect Live" (installs a GitHub App) as a deliberate choice.
9
+ 7. Official MCP registry and others: check their current docs; the process changes.
10
+
11
+ Do not post to Reddit/HN/LinkedIn until at least steps 1-3 are done and the README has a real demo.
@@ -0,0 +1,6 @@
1
+ """mcp-ship-check: pre-flight checker for MCP servers."""
2
+ from .model import Result, Report
3
+ from .checks import run_checks
4
+
5
+ __version__ = "0.1.0"
6
+ __all__ = ["Result", "Report", "run_checks", "__version__"]