The Model Context Protocol (MCP) is a framework to connect tools, APIs, and data sources into a unified, programmable environment. This guide helps you clone, install, configure, and troubleshoot the entire MCP ecosystem, including Git and GitHub MCP servers.
- Prerequisites
- Cloning Repositories
- Installing Dependencies
- Building MCP Servers
- Configuring Authentication
- Registering MCP Servers
- Running & Testing
- Troubleshooting
- Common Errors & Fixes (Detailed)
- Additional Tips
- Resources
- Contributing
- Node.js (v14+) → Download
- Python (3.7+) → Download
- Git → Download
- GitHub Account with a Personal Access Token (PAT) → Generate Token
- Scopes:
repo
,workflow
,read:org
- Scopes:
Verify installations:
node -v
npm -v
python --version
git --version
Optional: Create a Python virtual environment:
python -m venv venv
venv\Scripts\activate # Windows
source venv/bin/activate # macOS/Linux
Clone this guide and all related MCP servers:
git clone https://github.com/VoiceLessQ/mcp-comprehensive-guide.git
git clone https://github.com/VoiceLessQ/github-mcp.git
git clone https://github.com/VoiceLessQ/git-mcp.git
# Clone other MCP servers as needed
Verify:
ls mcp-comprehensive-guide
ls github-mcp
ls git-mcp
Error | Cause | Fix |
---|---|---|
fatal: repository not found |
Wrong URL or permissions | Check URL, login to GitHub |
Permission denied |
SSH key issues | Use HTTPS or fix SSH keys |
cd github-mcp
npm install
npm run build
cd git-mcp
pip install -r requirements.txt
Error | Cause | Fix |
---|---|---|
Module not found |
Missing deps | Run npm install or pip install |
Build failed |
TypeScript errors | Fix errors, then npm run build |
- For TypeScript servers, always run:
npm run build
- Verify build output exists (
dist/
orbuild/
directory).
Error | Cause | Fix |
---|---|---|
Cannot find module |
Wrong build path | Check MCP config paths |
Syntax errors |
TypeScript issues | Fix code, rebuild |
- Go to GitHub Tokens
- Click Generate new token
- Select scopes:
repo
,workflow
,read:org
- Copy and save the token securely
Edit cline_mcp_settings.json
(usually in VSCode global storage):
{
"github": {
"command": "node",
"args": ["C:/path/to/github-mcp/dist/index.js"],
"env": {
"GITHUB_TOKEN": "your-token-here"
}
},
"git": {
"command": "python",
"args": ["-m", "mcp_server_git", "--repository", "C:/path/to/git-mcp/test-repo"]
}
}
- Use absolute paths.
- Validate JSON syntax.
Error | Cause | Fix |
---|---|---|
401 Unauthorized |
Invalid token | Generate new PAT, update config |
Repository not found |
Wrong repo path | Use correct absolute path |
- Add entries as shown above to
cline_mcp_settings.json
. - Save the file.
- Restart VSCode or the MCP environment.
Error | Cause | Fix |
---|---|---|
Connection refused |
Server misconfig | Check command, args, env |
Path errors |
Wrong paths | Use absolute, existing paths |
- Verify servers are running (check MCP interface).
- Run test commands:
# GitHub MCP
list_repositories
# Git MCP
git_status
- Expected outputs: list of repos, git status info.
Error | Cause | Fix |
---|---|---|
Tool not found |
Server not running | Check MCP config, restart |
Rate limit exceeded |
No auth or too many calls | Use PAT, wait for reset |
Error | Cause | Fix |
---|---|---|
Module not found |
Missing deps | npm install or pip install |
401 Unauthorized |
Invalid token | Generate new PAT |
Permission denied |
File access | Run as admin, fix perms |
Build errors |
TypeScript issues | Fix code, rebuild |
Connection refused |
Server misconfig | Check MCP config |
Repository not found |
Wrong path | Use absolute, existing repo path |
Rate limit exceeded |
No auth | Use PAT, wait |
Diagnostic Commands:
node -v
python --version
git --version
Error | Cause | Fix |
---|---|---|
ModuleNotFoundError |
Missing Python packages | Run pip install -r requirements.txt inside git-mcp |
Repository not found |
Wrong or relative repo path | Use absolute path to an existing Git repo |
Permission denied |
File access issues | Run terminal as admin, fix folder permissions |
Python not found |
Wrong interpreter | Verify python --version , use correct venv |
Error | Cause | Fix |
---|---|---|
401 Unauthorized |
Invalid or missing GitHub token | Generate new PAT with repo , workflow , read:org scopes, update MCP config |
Rate limit exceeded |
No auth or too many API calls | Use PAT, wait for reset (~1 hour) |
Module not found |
Missing Node packages | Run npm install inside github-mcp |
Build failed |
TypeScript errors | Fix errors, then npm run build |
Cannot find module |
Wrong build path in MCP config | Check MCP config points to dist/index.js or build/index.js |
Error | Cause | Fix |
---|---|---|
Port already in use |
Port conflict | Change port in server config or stop other services |
Environment variable missing |
Misconfigured .env or MCP config |
Add required env vars (tokens, keys) |
Connection refused |
Server not running or misconfigured | Check MCP config, restart server |
- Use simple language and avoid jargon.
- Include platform-specific notes (Windows paths, Linux permissions).
- Verify each step before proceeding.
- Update the guide as you learn more.
- Contribute fixes or improvements via pull requests.
- Node.js
- Python
- Git
- GitHub Tokens
- Model Context Protocol (MCP) (if available)
- VSCode
If you encounter new errors or have suggestions, please open an issue or pull request to improve this guide for everyone.
Update it as the MCP ecosystem evolves!