Context
packages/loopover-mcp/README.md:218 and printHelp() (packages/loopover-mcp/bin/loopover-mcp.js:2686) both document the env-token precedence as: LOOPOVER_API_TOKEN, LOOPOVER_MCP_TOKEN, LOOPOVER_TOKEN. The actual implementation, getEnvApiToken() (line 3296-3298): process.env.LOOPOVER_API_TOKEN ?? process.env.LOOPOVER_TOKEN ?? process.env.LOOPOVER_MCP_TOKEN. If both LOOPOVER_MCP_TOKEN and LOOPOVER_TOKEN are set, the code picks LOOPOVER_TOKEN first — the opposite of the documented order.
Requirements
- Determine which is actually correct (was the doc written first and the code has a bug, or was the code intentional and the doc never updated?) by checking git history/any linked issue for context.
- Fix whichever side is wrong so the documented and actual precedence match exactly.
Test Coverage Requirements
99%+ Codecov patch coverage on getEnvApiToken if the code changes; add/update a test asserting the exact precedence order matches the (corrected) documentation.
Deliverables
Expected Outcome
A user setting multiple token env vars gets the behavior the docs actually promise.
Links & Resources
packages/loopover-mcp/README.md:218
packages/loopover-mcp/bin/loopover-mcp.js:2686,3296-3298
Context
packages/loopover-mcp/README.md:218andprintHelp()(packages/loopover-mcp/bin/loopover-mcp.js:2686) both document the env-token precedence as:LOOPOVER_API_TOKEN, LOOPOVER_MCP_TOKEN, LOOPOVER_TOKEN. The actual implementation,getEnvApiToken()(line 3296-3298):process.env.LOOPOVER_API_TOKEN ?? process.env.LOOPOVER_TOKEN ?? process.env.LOOPOVER_MCP_TOKEN. If bothLOOPOVER_MCP_TOKENandLOOPOVER_TOKENare set, the code picksLOOPOVER_TOKENfirst — the opposite of the documented order.Requirements
Test Coverage Requirements
99%+ Codecov patch coverage on
getEnvApiTokenif the code changes; add/update a test asserting the exact precedence order matches the (corrected) documentation.Deliverables
Expected Outcome
A user setting multiple token env vars gets the behavior the docs actually promise.
Links & Resources
packages/loopover-mcp/README.md:218packages/loopover-mcp/bin/loopover-mcp.js:2686,3296-3298