Configure GitHub MCP server in devcontainer environment (Closes #25)

This commit is contained in:
Peter Wood
2025-05-03 10:51:11 -04:00
parent 8e12184cc8
commit d5babec187
4 changed files with 62 additions and 4 deletions

View File

@@ -2,7 +2,9 @@
"name": "Finance App Development",
"image": "mcr.microsoft.com/devcontainers/typescript-node:1-20-bullseye",
"features": {
"ghcr.io/devcontainers/features/git:1": {}
"ghcr.io/devcontainers/features/git:1": {},
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/devcontainers/features/github-cli:1": {}
},
"customizations": {
"vscode": {
@@ -40,12 +42,23 @@
"**/node_modules": true,
"**/.idea": true
},
"terminal.integrated.defaultProfile.linux": "bash"
"terminal.integrated.defaultProfile.linux": "bash",
"mcp.servers.github": {
"command": "docker",
"args": ["run", "-i", "--rm", "--env-file", "${containerWorkspaceFolder}/.devcontainer/.env", "ghcr.io/github/github-mcp-server"],
"env": {}
}
}
}
},
"forwardPorts": [3000],
"postCreateCommand": "npm install && npm run check",
"remoteUser": "node",
"mounts": ["type=bind,source=${localEnv:HOME}/.ssh,target=/home/node/.ssh,readonly"]
"mounts": [
"type=bind,source=${localEnv:HOME}/.ssh,target=/home/node/.ssh,readonly"
],
"remoteEnv": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "${localEnv:GITHUB_PERSONAL_ACCESS_TOKEN}"
},
"postStartCommand": "gh auth status || gh auth login"
}