Commit 34a42cd
docs(mcp): fix python -m invocation in README — point at .server module
Addresses Copilot's suppressed-confidence comment on PR #166 (which the
reviewer surfaced manually): the \"Using Python Environment\" example
told users to invoke \`python -m stocktrim_mcp_server\`, but the package
ships no \`__main__.py\` so that command fails at runtime with:
/path/python: No module named stocktrim_mcp_server.__main__;
'stocktrim_mcp_server' is a package and cannot be directly executed
Users following the example would hit this immediately.
Fix: change the example's args to \`[\"-m\", \"stocktrim_mcp_server.server\"]\`
— \`server.py\` already exposes \`main()\` and an \`if __name__ == \"__main__\"\`
guard, so it's directly runnable today. Smoke-tested:
\`uv run python -m stocktrim_mcp_server.server\` launches the FastMCP
server end-to-end (prompts registered, caching enabled, server starting).
Considered adding a \`__main__.py\` shim to make the original short form
work — rejected because that would expand the public invocation surface
beyond what the existing console script (\`stocktrim-mcp-server\`) and the
\`.mcpb\` bundle already cover. Pointing at the module that already exists
is the minimum correct change.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 07f7f7a commit 34a42cd
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
| 119 | + | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| |||
0 commit comments