GitHub Copilot MCP Configuration Guide
November 17, 2025 Β· View on GitHub
βοΈ Hack23 AB β MCP Configuration Guide
π€ Model Context Protocol Setup
π― Enhancing GitHub Copilot with specialized context
π Document Owner: CEO | π Version: 1.0 | π
Last Updated: 2025-11-10 (UTC)
π Review Cycle: Quarterly | β° Next Review: 2026-02-10
GitHub Copilot MCP Configuration Guide
This document explains how Model Context Protocol (MCP) servers enhance GitHub Copilot's capabilities for this game development project.
What are MCP Servers?
Model Context Protocol (MCP) servers provide specialized tools and context to AI assistants like GitHub Copilot. They enable Copilot to:
- Access file systems and repositories
- Search documentation and best practices
- Interact with external services
- Maintain conversation context
- Execute specialized tools
Configured MCP Servers
ποΈ Filesystem Server
Package: @modelcontextprotocol/server-filesystem
Provides secure filesystem access for reading and editing project files.
Capabilities:
- Read and write files in allowed directories
- List directory contents
- Create and delete files
- Search for files
Configuration:
{
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/workspaces/game"]
}
Allowed Directories:
src/- Source codepublic/- Static assetscypress/- E2E testsdocs/- Documentation.github/- GitHub configuration
π GitHub Server
Package: @modelcontextprotocol/server-github
Provides access to GitHub repository data, issues, PRs, and workflows.
Capabilities:
- Read issues and pull requests
- Access repository metadata
- View workflow runs
- Search code and discussions
Configuration:
{
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_TOKEN": "${GITHUB_TOKEN}",
"GITHUB_OWNER": "Hack23",
"GITHUB_REPO": "game"
}
}
Requirements:
GITHUB_TOKENenvironment variable with repo access
π Git Server
Package: @modelcontextprotocol/server-git
Provides Git operations and repository history context.
Capabilities:
- View commit history
- Read branch information
- Access file changes
- Understand code evolution
Configuration:
{
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-git", "--repository", "/workspaces/game"]
}
π§ Memory Server
Package: @modelcontextprotocol/server-memory
Maintains conversation history and context between agent sessions.
Capabilities:
- Store conversation context
- Recall previous interactions
- Maintain user preferences
- Track session history
Configuration:
{
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-memory"]
}
π Brave Search Server (Optional)
Package: @modelcontextprotocol/server-brave-search
Enables searching documentation for React, TypeScript, Three.js, and Vite.
Capabilities:
- Search web documentation
- Find best practices
- Locate API references
- Discover code examples
Configuration:
{
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-brave-search"],
"env": {
"BRAVE_API_KEY": "${BRAVE_API_KEY}"
},
"disabled": true
}
Requirements:
- Brave Search API key from https://brave.com/search/api/
- Set
BRAVE_API_KEYenvironment variable to enable
Recommended Search Domains:
- react.dev - React documentation
- threejs.org - Three.js website
- threejs.org/docs - Three.js API docs
- vitejs.dev - Vite documentation
- vitest.dev - Vitest documentation
- typescriptlang.org - TypeScript docs
- docs.cypress.io - Cypress documentation
- testing-library.com - Testing Library
- developer.mozilla.org - MDN Web Docs
π Playwright Server
Package: @modelcontextprotocol/server-playwright
Browser automation for testing and debugging web applications.
Capabilities:
- Automate browser interactions
- Take screenshots
- Test UI components
- Debug rendering issues
Configuration:
{
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-playwright"]
}
How to Use MCP Servers
In GitHub Codespaces
- Open the repository in Codespaces
- MCP servers are automatically configured
- Use Copilot Chat to interact with them
- Example: "Use the filesystem server to find all React components"
In VS Code
- Install GitHub Copilot extension
- MCP servers load automatically with Copilot context
- Use Copilot Chat with enhanced context
- Example: "Search documentation for Three.js mesh anchors"
With Copilot CLI
- Install GitHub CLI:
gh extension install github/gh-copilot - Configure MCP servers in your environment
- Use:
gh copilot suggest "create a new game component"
Configuration Files
.github/copilot-instructions.md
Provides coding guidelines and project context to Copilot:
- TypeScript strict mode usage
- React and Three.js patterns
- Testing requirements
- Security practices
Stack-Specific Benefits
React Development
- Component generation with proper TypeScript types
- Hook usage patterns
- State management best practices
- Performance optimization tips
TypeScript
- Strict null checking support
- Interface and type generation
- Generic type usage
- Utility type suggestions
Three.js Game Development
- Sprite and container patterns
- Game loop implementation
- Event handling
- Performance optimization
Testing
- Vitest test generation
- Cypress E2E test creation
- Mock and stub patterns
- Coverage improvement suggestions
Security Considerations
Access Controls
- Filesystem server restricted to project directories
- Read-only access to
node_modulesanddist - GitHub token uses minimal required permissions
- No secrets stored in configuration files
Environment Variables
All sensitive data uses environment variables:
GITHUB_TOKEN- GitHub API accessBRAVE_API_KEY- Search API access (optional)
Best Practices
- Never commit API keys or tokens
- Use GitHub Secrets for CI/CD
- Regularly update MCP server packages
- Review server logs for unusual activity
Troubleshooting
MCP Server Not Working
- Verify environment variables are set (especially
GITHUB_TOKEN) - Ensure npm can access the package
- Restart VS Code or Codespace
- Check Copilot output panel for errors
Performance Issues
- Disable unused MCP servers in Copilot settings
- Limit filesystem server to specific directories
- Use caching where available
- Monitor resource usage
Connection Errors
- Check network connectivity
- Verify API keys are valid
- Check firewall settings
- Review server logs
Testing the Configuration
Local Testing
Test MCP servers locally:
# Install an MCP server
npx @modelcontextprotocol/server-filesystem /path/to/project
# Test GitHub server
npx @modelcontextprotocol/server-github
# Test Git server
npx @modelcontextprotocol/server-git --repository .
Note: MCP servers are automatically configured in GitHub Codespaces and VS Code with Copilot.
Further Reading
π Security Considerations
API Key Security
When configuring MCP servers that require API keys (e.g., Brave Search):
- Never commit API keys to the repository
- Store keys in environment variables per Access Control Policy
- Use GitHub Codespaces secrets for secure storage
- Rotate keys regularly following security best practices
- Reference Information Security Policy for credential management
Secure Development Environment
This project follows Hack23 AB's ISMS:
- MCP servers operate in a hardened development environment
- All configurations follow Secure Development Policy
- For security questions, consult the π security-specialist agent
Contributing
To add new MCP servers:
- Research available MCP servers for your use case
- Document the server capabilities in this guide
- Update Copilot configuration as needed
- Test the server integration
- Submit a pull request
Note: MCP servers are configured through Copilot's environment rather than separate config files.
π Related Documents
Internal Documentation
- ποΈ MCP Architecture - Architecture diagrams and design
- π Copilot Quick Start - Getting started guide
- π€ Copilot Instructions - Coding guidelines
- π ISMS Policy Mapping - Feature-to-policy alignment
ISMS-PUBLIC Policies
- π Information Security Policy - Overall security governance
- π οΈ Secure Development Policy - SDLC and CI/CD requirements
- π Access Control Policy - Authentication and authorization controls
- π·οΈ Classification Framework - CIA triad and impact levels
External Resources
- MCP Specification - Official MCP protocol documentation
- GitHub Copilot Documentation - Official Copilot documentation
- MCP Servers Repository - Official MCP server implementations
π Document Control:
β
Approved by: James Pether SΓΆrling, CEO
π€ Distribution: Public
π·οΈ Classification:
π
Effective Date: 2025-11-10
β° Next Review: 2026-02-10
π― Framework Compliance: