Model Context Protocol (MCP) Tips and Best Practices
A collection of tips and best practices for working with Model Context Protocol (MCP) servers
AndreaGriffiths11
README
Model Context Protocol (MCP) Tips and Best Practices
What is MCP?
The Model Context Protocol (MCP) is a protocol that enables AI models to communicate with development environments and tools. It allows AI assistants to gather context, execute commands, and make changes to codebases in a structured and secure way. MCP servers act as intermediaries between AI models and development environments, providing a standardized interface for interactions.
Setup Guide
Prerequisites
- Docker installed on your system
- GitHub Personal Access Token (PAT) with appropriate permissions
- VS Code with the necessary extensions
Basic Setup Steps
-
Environment Configuration
- Set up your GitHub token as an environment variable:
export GITHUB_TOKEN=your_token_here
- Set up your GitHub token as an environment variable:
-
Docker Image
- The MCP server runs in a Docker container
- The official image is available at:
ghcr.io/github/github-mcp-server
-
VS Code Settings
- Configure the MCP server in your VS Code settings.json
- Basic configuration example:
{ "mcp": { "servers": { "github": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN=${env:GITHUB_TOKEN}", "ghcr.io/github/github-mcp-server" ], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "$GITHUB_TOKEN" } } } } }
Configuration Tips
Best Practices
-
Token Security
- Never commit your GitHub token to version control
- Use environment variables for sensitive information
- Regularly rotate your PAT for security
-
Docker Configuration
- Use the
--rm
flag to automatically remove containers after they stop - Consider using volume mounts for persistent data
- Keep your Docker image updated to the latest version
- Use the
-
VS Code Integration
- Keep your VS Code and extensions updated
- Configure logging levels appropriately
- Use workspace-specific settings when needed
Troubleshooting
Common Issues and Solutions
-
Connection Issues
- Verify Docker is running
- Check if your GitHub token is valid and properly set
- Ensure proper network connectivity to GitHub
-
Authentication Problems
- Verify your PAT has the required scopes
- Check environment variable configuration
- Ensure the token hasn't expired
-
Docker-related Issues
- Clear Docker cache if experiencing image problems
- Check Docker logs for detailed error messages
- Verify Docker has sufficient system resources
-
VS Code Integration Issues
- Reset VS Code settings to default if needed
- Check VS Code's extension logs
- Verify MCP configuration syntax in settings.json
Debugging Tips
- Enable verbose logging in VS Code
- Check Docker container logs
- Verify environment variable availability
- Monitor system resource usage
Advanced Configuration
Custom Server Configuration
- Configure multiple MCP servers
- Set up custom environment variables
- Configure resource limits
Performance Optimization
- Configure caching settings
- Optimize Docker container resources
- Set appropriate timeout values
Additional Resources
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
MCP Package Docs Server
Facilitates LLMs to efficiently access and fetch structured documentation for packages in Go, Python, and NPM, enhancing software development with multi-language support and performance optimization.
Claude Code MCP
An implementation of Claude Code as a Model Context Protocol server that enables using Claude's software engineering capabilities (code generation, editing, reviewing, and file operations) through the standardized MCP interface.
@kazuph/mcp-taskmanager
Model Context Protocol server for Task Management. This allows Claude Desktop (or any MCP client) to manage and execute tasks in a queue-based system.
Linear MCP Server
Enables interaction with Linear's API for managing issues, teams, and projects programmatically through the Model Context Protocol.
mermaid-mcp-server
A Model Context Protocol (MCP) server that converts Mermaid diagrams to PNG images.
Jira-Context-MCP
MCP server to provide Jira Tickets information to AI coding agents like Cursor

Linear MCP Server
A Model Context Protocol server that integrates with Linear's issue tracking system, allowing LLMs to create, update, search, and comment on Linear issues through natural language interactions.

Sequential Thinking MCP Server
This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.