Aller au contenu
login
arrow_backRetour aux issues
no-human-ai/no_human #8

MCP bridge hard-codes 127.0.0.1:8420 instead of honouring `server.port`

ecoDébutant bug good first issue

descriptionDescription

\`src/no_human/intake/mcp_bridge.py\` line 29 fixes the API base URL: \`\`\`python BASE_URL = "http://127.0.0.1:8420" \`\`\` That constant is the only thing \`_client()\` and \`_ensure_api_reachable()\` use; the module never reads config. The server side does: \`nh start\` binds \`server.port\` from \`~/.no_human/config.yaml\` (\`DEFAULT_CONFIG['server'] == {'host': '127.0.0.1', 'port': 8420}\`, documented in \`docs/configuration.md\`). So an operator who moves the board to another port gets: \`\`\` $ nh mcp-serve no_human API unreachable at http://127.0.0.1:8420 \`\`\` with no flag or env var to point it elsewhere (\`nh mcp-serve --help\` has only \`--help\`). **Fix:** resolve the base URL from \`server.host\` / \`server.port\` when the bridge starts, keeping the current literal as the fallback, plus a test that a non-default port is honoured. ~15 lines.
codeOuvre sur GitHub