Troubleshooting
Common issues and solutions for snippets-mcp.
AI assistant doesn’t use the tools
Symptoms: Your AI assistant responds to snippet requests without using the MCP tools.
Solutions:
- Restart your AI client after adding server configuration
- Check the configuration file path is correct for your OS
- Verify the binary path in your configuration exists and is executable
- Look for errors in your client’s MCP server logs
Test the server directly:
/usr/local/bin/snippets-mcp
# Should output MCP initialization JSON
GitHub Token Errors
“github token not found”
Symptoms: Server fails to start or returns token error.
Solutions:
Store token in keychain:
snippets-mcp --set-credentialOr set environment variable:
export GITHUB_TOKEN=ghp_your_token_hereVerify token is stored:
- Open Keychain Access.app
- Search for “snippets-mcp”
“github token is invalid or expired”
Symptoms: Authentication fails when calling tools.
Solutions:
- Check token status at github.com/settings/tokens
- Verify token hasn’t expired
- Re-run
snippets-mcp --set-credentialwith a fresh token
“github token is missing required ‘gist’ scope”
Symptoms: Token validates but operations fail.
Solution: Create a new token with the gist scope enabled:
- Go to github.com/settings/tokens/new
- Select gist scope
- Generate and store the new token
Connection Errors
“Timeout” or “connection refused”
Symptoms: Tools fail with network errors.
Solutions:
- Check internet connectivity
- Verify GitHub API is reachable:
curl https://api.github.com/zen - Increase timeout for slow connections:
"env": { "SNIPPETS_TIMEOUT": "60s" } - Check if firewall or proxy is blocking
api.github.com
Rate limiting
Symptoms: Operations fail after many requests.
Solution: GitHub API has rate limits. Wait a few minutes and retry. Authenticated requests (with valid token) have higher limits than unauthenticated.
No Results
list_snippets returns empty
Possible causes:
- No gists exist for this GitHub account
- Filters are too restrictive
- Token belongs to different account
Solutions:
- Verify gists exist at gist.github.com
- Try without filters first
- Check token belongs to the expected account:
curl -H "Authorization: token ghp_..." https://api.github.com/user
Search doesn’t find expected snippets
Possible causes:
- Search term not in description
- Tag format incorrect
Solutions:
- Search is case-insensitive but matches description text
- Tags must be hashtags in description (e.g.,
#gonot justgo)
Debug Logging
Enable debug logging to see detailed operations:
{
"mcpServers": {
"snippets": {
"command": "/usr/local/bin/snippets-mcp",
"env": {
"SNIPPETS_LOG_LEVEL": "debug"
}
}
}
}
Check logs for:
- Token resolution (keychain vs environment)
- API requests and responses
- Error details
Common Error Messages
| Error | Cause | Solution |
|---|---|---|
exec format error | Wrong binary for OS/architecture | Download correct platform binary |
permission denied | Binary not executable | chmod +x /path/to/snippets-mcp |
connection refused | Network issue | Check connectivity to api.github.com |
invalid JSON | Malformed config file | Validate JSON syntax |
context deadline exceeded | Request timeout | Increase SNIPPETS_TIMEOUT |
Keychain Issues
Can’t store token in keychain
macOS: Keychain Access must be unlocked. Check for prompts asking to allow access.
Linux: Requires libsecret and a running secret service (GNOME Keyring or similar).
Windows: Uses Windows Credential Manager.
Token stored but not found
Solutions:
- Verify service name is “snippets-mcp” in Keychain Access
- Delete and re-add:
snippets-mcp --set-credential - Fall back to environment variable if keychain issues persist
Getting Help
If you’re still having issues:
- Check GitHub Issues for similar problems
- Open a new issue with:
- Operating system and version
- Full error message
- Steps to reproduce
- Configuration (with token redacted)