You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
mcp.port is documented and parsed but never read — MCP always shares the HTTP port #151
docs/CONFIG_REFERENCE.md documents mcp.port in four places (lines 418, 440, 1856, 2005) as the "MCP server port", default 8081. CLAUDE.md's config example shows it too. It does nothing:
parsed at src/config_manager.cpp:466 into mcp_config.port,
logged at debug level at :484,
never read again. MCP is served by the unified server on the HTTP port (http-port / -p / FLAPI_PORT).
Measured
flAPI run with mcp: {enabled: true, port: 8081} and -p <free port>:
tools/list on http://127.0.0.1:<http port>/mcp/jsonrpc → answers, lists the tool
anything listening on 8081 → nothing; http://127.0.0.1:8081/mcp/jsonrpc → connection refused
Why it matters
This is exactly the class CLAUDE.md warns about ("documented and parsed but never read"), and it already caused real damage: the flagship launch blog post in docs/promotion/drafts/ set mcp.port: 8081 and pointed every MCP example at localhost:8081, so a reader following the tutorial would get connection refused. That draft is fixed on the chore/smoke-timeouts-and-server-json-version branch; the config reference still teaches it.
Two more dead declarations nearby, worth removing together:
MCPServerConfig::stdio_transport and MCPServerConfig::mcp_port (src/include/config_manager.hpp:445-446) — never read;
CONTENT_TYPE_SSE (src/include/mcp_constants.hpp:60) — defined, never used; flAPI answers MCP with JSON only.
Suggested fix
Actually serving MCP on a second port would be a real feature and should be decided on its merits. Until then:
remove mcp.port from CONFIG_REFERENCE.md and CLAUDE.md, stating that MCP shares the HTTP port;
warn at startup when mcp.port is set, naming the port MCP actually answers on — an operator who configured it deserves to be told, rather than to discover it by connection refused;
Activity
docs: fix the MCP examples a Codex review found this PR had missed
Merge pull request #154: dead mcp.* keys warn (#151); every publisher…