Skip to content

Commit 34a42cd

Browse files
dougborgclaude
andcommitted
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

File tree

stocktrim_mcp_server/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ If you have the server installed in a specific Python environment:
116116
"mcpServers": {
117117
"stocktrim": {
118118
"command": "python",
119-
"args": ["-m", "stocktrim_mcp_server"],
119+
"args": ["-m", "stocktrim_mcp_server.server"],
120120
"env": {
121121
"STOCKTRIM_API_AUTH_ID": "your_tenant_id_here",
122122
"STOCKTRIM_API_AUTH_SIGNATURE": "your_tenant_name_here"

0 commit comments

Comments
 (0)