Early on in a small MCP server I built to manage my GitHub profile and DEV.to articles, every GitHub API call started failing with a 404 that made no sense. The token was valid, the endpoint was right, the request looked fine in isolation. The bug was one line up the stack: GITHUB_USERNAME was being read straight out of .env, and the value sitting in that variable was enjoy_kumawat, my DEV.to handle, with an underscore. My actual GitHub username has no underscore. GitHub's API doesn't fuzzy-match; it looked for a user that doesn't exist and told me so, correctly.
The .env file had one key doing two jobs. Both platforms needed "the username," both usernames were short lowercase strings that looked plausible in isolation, and whichever one got written to that slot first became the one every script quietly assumed was correct, right up until a call to the other platform used it.
# .env
GITHUB_USERNAME=enjoy_kumawat # looks fine, is actually the dev.to handle
Enter fullscreen mode






