一键导入
mcp-gateway-configuration
MCP gateway setup for multi-server integration, security configuration, tool routing, and access control
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
MCP gateway setup for multi-server integration, security configuration, tool routing, and access control
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Identity and access management: RBAC, least privilege, MFA, quarterly reviews per ISO 27001 A.5.15, A.8.2, A.8.3
Business continuity and disaster recovery: 30-day retention, quarterly restore tests, RTO/RPO targets per ISO 27001 A.17
Political psychology, cognitive biases, group dynamics, leadership analysis, decision-making patterns for Swedish political intelligence
Risk-based data and asset classification framework: PUBLIC, INTERNAL, CONFIDENTIAL, RESTRICTED aligned with ISO 27001 A.5.12 and CIA triad
Unified compliance verification across ISO 27001, NIST CSF, CIS Controls, NIS2, EU CRA, GDPR, SOC 2, PCI DSS, and HIPAA for cybersecurity consulting
Cryptographic controls implementation: TLS 1.3, AES-256-GCM, bcrypt, RSA-4096, key management per NIST FIPS 140-2 and ISO 27001 A.8.24
| name | mcp-gateway-configuration |
| description | MCP gateway setup for multi-server integration, security configuration, tool routing, and access control |
| license | Apache-2.0 |
This skill provides guidance for configuring MCP (Model Context Protocol) gateways for the CIA platform. It covers multi-server integration, tool routing, security configuration, and access control to enable secure and efficient AI-assisted development workflows.
Apply this skill when:
.github/copilot-mcp-config.jsonDo NOT use for:
┌─────────────────────────────────────────────┐
│ GitHub Copilot │
│ (AI Assistant Client) │
└──────────────────┬──────────────────────────┘
│
▼
┌─────────────────────────────────────────────┐
│ MCP Gateway Layer │
│ ┌─────────────────────────────────────┐ │
│ │ copilot-mcp-config.json │ │
│ │ - Server definitions │ │
│ │ - Tool routing rules │ │
│ │ - Access control policies │ │
│ └─────────────────────────────────────┘ │
└──────┬──────────┬──────────┬────────────────┘
│ │ │
▼ ▼ ▼
┌──────────┐ ┌──────────┐ ┌──────────┐
│ GitHub │ │ Filesystem│ │ Playwright│
│ MCP │ │ MCP │ │ MCP │
│ Server │ │ Server │ │ Server │
└──────────┘ └──────────┘ └──────────┘
copilot-mcp-config.json){
"mcpServers": {
"server-name": {
"type": "stdio",
"command": "command-to-run",
"args": ["arg1", "arg2"],
"env": {
"ENV_VAR": "value"
}
}
}
}
stdio Servers (Local Process):
{
"filesystem": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed"],
"env": {}
}
}
SSE Servers (Remote HTTP):
{
"remote-server": {
"type": "sse",
"url": "https://mcp-server.example.com/sse",
"headers": {
"Authorization": "Bearer ${MCP_TOKEN}"
}
}
}
| Server | Purpose | Tools Provided |
|---|---|---|
| github | Repository operations | Issues, PRs, code search, Actions |
| filesystem | Local file operations | Read, write, search files |
| playwright | Browser automation | UI testing, screenshots |
1. Minimize Filesystem Access:
{
"filesystem": {
"type": "stdio",
"command": "npx",
"args": [
"-y", "@modelcontextprotocol/server-filesystem",
"/home/runner/work/cia/cia"
]
}
}
Only expose the project root — never expose /, /home, or parent directories.
2. Use Environment Variables for Secrets:
{
"github": {
"type": "stdio",
"command": "github-mcp-server",
"env": {
"GITHUB_TOKEN": "${GITHUB_TOKEN}"
}
}
}
Never hardcode tokens in configuration files.
3. Specify Exact Package Versions:
{
"args": ["-y", "@modelcontextprotocol/server-filesystem@1.2.3"]
}
Pin versions to prevent supply chain attacks.
| Category | Server | Example Tools |
|---|---|---|
| Code Management | github | create_pull_request, push_files |
| Code Analysis | github | search_code, get_file_contents |
| File Operations | filesystem | read_file, write_file, search |
| UI Testing | playwright | navigate, click, screenshot |
| Issue Management | github | create_issue, list_issues |
| CI/CD | github | list_workflows, get_job_logs |
{
"mcpServers": {
"filesystem": {
"type": "stdio",
"command": "npx",
"args": [
"-y", "@modelcontextprotocol/server-filesystem",
"/home/runner/work/cia/cia"
],
"env": {
"ALLOWED_OPERATIONS": "read,write,search"
}
}
}
}
Allowed directories should follow the principle of least privilege:
✅ /home/runner/work/cia/cia — Project root
✅ /home/runner/work/cia/cia/src — Source code
✅ /home/runner/work/cia/cia/.github — CI/CD configuration
❌ /home/runner — Too broad
❌ /etc — System configuration
❌ /tmp — Temporary files (security risk)
| Issue | Symptom | Resolution |
|---|---|---|
| Server not starting | "Failed to connect" error | Check command path and args |
| Permission denied | Tool call fails | Verify filesystem paths and permissions |
| Token expired | Authentication errors | Refresh environment variables |
| Version mismatch | Unexpected tool behavior | Pin and update package versions |
| Timeout | Tool call hangs | Check network connectivity for SSE servers |
# Verify MCP config syntax
cat .github/copilot-mcp-config.json | python3 -m json.tool
# Check if MCP server binary is available
which github-mcp-server
# Test filesystem server
npx -y @modelcontextprotocol/server-filesystem --help
# Check environment variables
env | grep -i mcp
env | grep -i github_token
□ JSON syntax is valid
□ All server commands exist and are executable
□ Environment variables are properly referenced (not hardcoded)
□ Filesystem paths follow least privilege
□ Package versions are pinned
□ No secrets in configuration file
□ Configuration is committed to repository
□ Server definitions match documented architecture
□ Access control rules are documented
| Configuration Area | ISO 27001 | NIST CSF | CIS Controls |
|---|---|---|---|
| Access Control | A.8.3 | PR.AC-4 | CIS 6.1 |
| Secret Management | A.8.24 | PR.DS-1 | CIS 3.11 |
| Configuration Mgmt | A.8.9 | PR.IP-1 | CIS 4.1 |
| Audit Logging | A.8.15 | DE.AE-3 | CIS 8.2 |
| Change Control | A.8.32 | PR.IP-3 | CIS 4.2 |