MCP Server Integration Guide
Prerequisites
- Node.js installed (version 14 or higher)
- npm package manager
- Python environment with required dependencies
Setup Steps
Install MCP Server Package
bashnpm install -g @modelcontextprotocol/server-githubStart MCP Server
bashnpx @modelcontextprotocol/server-githubThe server should start and display a connection URL.
Verify Connection
- Look for the plug icon (🔌) in your Chainlit interface
- A number (1) should appear next to the plug icon indicating successful connection
- The console should show: "GitHub plugin setup completed successfully" (along with additional status lines)
Troubleshooting
Common Issues
Port Conflict
bashError: listen EADDRINUSE: address already in useSolution: Change the port using:
bashnpx @modelcontextprotocol/server-github --port 3001Authentication Issues
- Ensure GitHub credentials are properly configured
- Check .env file contains required tokens
- Verify GitHub API access
Connection Failed
- Confirm server is running on expected port
- Check firewall settings
- Verify Python environment has required packages
Connection Verification
Your MCP server is properly connected when:
- Console shows "GitHub plugin setup completed successfully"
- Connection logs show "✓ MCP Connection Status: Active"
- GitHub commands work in chat interface
Environment Variables
Required in your .env file:
GITHUB_TOKEN=your_github_token
MCP_SERVER_PORT=3000 # Optional, default is 3000Testing Connection
Send this test message in chat:
Show me the repositories for username: [GitHub Username]A successful response will show repository information.