Skip to content

Context7 Platform -- Up-to-date docs for AI agents

docs: document Docker MCP Toolkit stdio transport (#2734)

Yui(ゆい)43e410645c78
diff --git a/docs/resources/all-clients.mdx b/docs/resources/all-clients.mdx
index 40368c9c..9faca502 100644
--- a/docs/resources/all-clients.mdx
+++ b/docs/resources/all-clients.mdx
@@ -971,7 +971,7 @@ qwen mcp add context7 -- npx -y @upstash/context7-mcp --api-key YOUR_API_KEY
FROM node:22-alpine
WORKDIR /app
RUN npm install -g @upstash/context7-mcp
-CMD ["context7-mcp"]
+CMD ["context7-mcp", "--transport", "stdio"]
```
2. Build the image:
@@ -994,6 +994,35 @@ docker build -t context7-mcp .
}
```
+If you use the Docker MCP Toolkit image (`mcp/context7`) with a stdio-based client, set `MCP_TRANSPORT=stdio` so the container starts with stdio transport instead of its HTTP default. For Cline, Roo Code, and Claude Desktop, use:
+
+```json
+{
+ "mcpServers": {
+ "context7": {
+ "command": "docker",
+ "args": ["run", "-i", "--rm", "-e", "MCP_TRANSPORT=stdio", "mcp/context7"]
+ }
+ }
+}
+```
+
+For VS Code, use the same Docker command in the `servers` format:
+
+```json
+{
+ "servers": {
+ "context7": {
+ "type": "stdio",
+ "command": "docker",
+ "args": ["run", "-i", "--rm", "-e", "MCP_TRANSPORT=stdio", "mcp/context7"]
+ }
+ }
+}
+```
+
+Keep using the remote server URL for HTTP-based clients.
+
</Accordion>
<Accordion title="Windows">
diff --git a/packages/mcp/README.md b/packages/mcp/README.md
index 5769b1f9..3c53ca53 100644
--- a/packages/mcp/README.md
+++ b/packages/mcp/README.md
@@ -863,7 +863,7 @@ If you prefer to run the MCP server in a Docker container:
# EXPOSE 3000
# Default command to run the server
- CMD ["context7-mcp"]
+ CMD ["context7-mcp", "--transport", "stdio"]
```
</details>
@@ -897,6 +897,37 @@ If you prefer to run the MCP server in a Docker container:
_Note: This is an example configuration. Please refer to the specific examples for your MCP client (like Cursor, VS Code, etc.) earlier in this README to adapt the structure (e.g., `mcpServers` vs `servers`). Also, ensure the image name in `args` matches the tag used during the `docker build` command._
+ If you use the Docker MCP Toolkit image (`mcp/context7`) with a stdio-based client,
+ set `MCP_TRANSPORT=stdio` so the container starts with stdio transport instead of its
+ HTTP default. For Cline, Roo Code, and Claude Desktop, use:
+
+ ```json
+ {
+ "mcpServers": {
+ "context7": {
+ "command": "docker",
+ "args": ["run", "-i", "--rm", "-e", "MCP_TRANSPORT=stdio", "mcp/context7"]
+ }
+ }
+ }
+ ```
+
+ For VS Code, use the same Docker command in the `servers` format:
+
+ ```json
+ {
+ "servers": {
+ "context7": {
+ "type": "stdio",
+ "command": "docker",
+ "args": ["run", "-i", "--rm", "-e", "MCP_TRANSPORT=stdio", "mcp/context7"]
+ }
+ }
+ }
+ ```
+
+ Keep using the remote server URL for HTTP-based clients.
+
</details>
<details>