Skip to content

Instantly share code, notes, and snippets.

@ibombonato
Last active November 28, 2025 14:49
Show Gist options
  • Select an option

  • Save ibombonato/45a321af1751bd1867df58ef681a59e0 to your computer and use it in GitHub Desktop.

Select an option

Save ibombonato/45a321af1751bd1867df58ef681a59e0 to your computer and use it in GitHub Desktop.
TIL: Setup context7 MCP as docker container in VSCode
Create a dockerfile for Context7 image:
https://github.com/upstash/context7?tab=readme-ov-file#b-manual-configuration
dockerfile.context7:
```
FROM node:18-alpine
WORKDIR /app
# Install the latest version globally
RUN npm install -g @upstash/context7-mcp
# Expose default port if needed (optional, depends on MCP client interaction)
# EXPOSE 3000
# Default command to run the server
CMD ["context7-mcp"]
```
Build it locally:
```
docker build -f dockerfile.context7 -t context7-mcp .
```
Add the config to your VSCode:
CMD+Shift+P: MCP Open User Configuration
```
{
"servers": {
"context7": {
"type": "stdio",
"command": "docker",
"args": ["run", "-i", "--rm", "context7-mcp"]
}
}
}
```
Activating it in the project, so everyone that pulls the project will have it configured. This will assume that everyone has the docker image in their machine, wich would not be true...
In VSCode, add the MCP config to your project, by creating a file `mcp.json` in `.vscode` folder.
`.vscode/mcp.json`
```
{
"servers": {
"context7": {
"type": "stdio",
"command": "docker",
"args": ["run", "-i", "--rm", "context7-mcp"]
}
}
}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment