# Github MCP doesn't work in dev containers

**URL:** <https://forum.cursor.com/t/github-mcp-doesnt-work-in-dev-containers/149123>\
**Category:** Bug Reports\
**Tags:** mcp, devcontainers, github\
**Created:** [January 16, 2026, 8:34pm UTC](https://forum.cursor.com/t/github-mcp-doesnt-work-in-dev-containers/149123 "2026-01-16T20:34:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aaron\_Young](https://avatars.discourse-cdn.com/v4/letter/a/e495f1/32.png) [@Aaron\_Young](https://forum.cursor.com/u/Aaron_Young)\
**Post date:** [January 16, 2026, 8:34pm UTC](https://forum.cursor.com/t/github-mcp-doesnt-work-in-dev-containers/149123/1 "2026-01-16T20:34:42Z")

</div>

### Where does the bug appear (feature/product)?

Cursor IDE

### Describe the Bug

When using devcontainers, the Github MCP link from the documentation doesn’t work

### Steps to Reproduce

Head to [https://cursor.com/docs/context/mcp/directory](https://cursor.com/docs/context/mcp/directory)  
Click add to cursor, add Personal Access Token  
Open a devcontainer, attempt to activate the mcp

### Expected Behavior

Github should activate using the streaming mcp server

### Screenshots / Screen Recordings

 ![error messages.jpg](https://us1.discourse-cdn.com/cursor1/original/3X/c/b/cb42c062776a5d7c4f0756350f110777b99c96ab.jpeg)

### Operating System

MacOS

### Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.3.35  
VSCode Version: 1.105.1  
Commit: cf8353edc265f5e46b798bfb276861d0bf3bf120  
Date: 2026-01-13T07:39:18.564Z  
Electron: 37.7.0  
Chromium: 138.0.7204.251  
Node.js: 22.20.0  
V8: 13.8.258.32-electron.0  
OS: Darwin arm64 25.2.0

### Additional Information

We are using Dev containers

### Does this stop you from using Cursor

No - Cursor works, but with this issue

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [January 17, 2026, 10:29am UTC](https://forum.cursor.com/t/github-mcp-doesnt-work-in-dev-containers/149123/4 "2026-01-17T10:29:51Z")

</div>

Hey, thanks for the report. `stdio`-type MCP servers run inside the devcontainer (this is expected behavior since v0.50+). But the GitHub MCP uses the `docker run` command, and the Docker CLI is usually not available inside the container, so you get `spawn docker ENOENT`.

Possible fixes:

1. Add Docker CLI to the devcontainer (recommended)

In `devcontainer.json`, add this feature:

```json
{
  "features": {
    "ghcr.io/devcontainers/features/docker-outside-of-docker:1": {}
  }
}

```

This gives the container access to the host Docker engine.

1. Use the npx version of GitHub MCP instead of Docker

In `mcp.json`:

```json
{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "your_token"
      }
    }
  }
}

```

This requires Node.js in the devcontainer.

Try option 2 first since it’s simpler. Let me know if it still doesn’t work.

---

<div class="post-metadata">

**Author:** ![Aaron\_Young](https://avatars.discourse-cdn.com/v4/letter/a/e495f1/32.png) [@Aaron\_Young](https://forum.cursor.com/u/Aaron_Young)\
**Post date:** [January 22, 2026, 4:39pm UTC](https://forum.cursor.com/t/github-mcp-doesnt-work-in-dev-containers/149123/5 "2026-01-22T16:39:36Z")

</div>

Thanks!

Option 2 worked with one caveat, you need to install NodeJS with NPM in the container for it to work.

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/127254_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [February 13, 2026, 4:39pm UTC](https://forum.cursor.com/t/github-mcp-doesnt-work-in-dev-containers/149123/7 "2026-02-13T16:39:43Z")

</div>

Closed on February 13, 2026, 4:39pm UTC

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.
