Skip to content

Instantly share code, notes, and snippets.

@miteshmap
Created August 18, 2025 21:25
Show Gist options
  • Select an option

  • Save miteshmap/fcb716cf47e9ccb392d0138c81524352 to your computer and use it in GitHub Desktop.

Select an option

Save miteshmap/fcb716cf47e9ccb392d0138c81524352 to your computer and use it in GitHub Desktop.
Docker MCP
## MCP Server Configuration
### Recommended Setup: Use MCP Gateway
To ensure efficient and persistent connections between your MCP server and the Cursor client, **do not** use a direct `docker run` command that spins up a new container on every request.
Instead, use the MCP Gateway to manage your server container. This approach keeps the server running persistently, allowing Cursor to discover tools and prompts properly.
---
### Example MCP Gateway Configuration
In your `mcp.json` (Cursor configuration), use:
```json
"context7": {
"command": "docker",
"args": [
"mcp",
"gateway",
"run",
"--servers=context7"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment