You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/mcp/README.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1443,6 +1443,7 @@ bun run dist/index.js
1443
1443
1444
1444
-`--transport <stdio|http>` – Transport to use (`stdio` by default). Use `http` for remote HTTP server or `stdio` for local integration.
1445
1445
-`--port <number>` – Port to listen on when using `http` transport (default `3000`).
1446
+
-`--host <host>` – Interface to bind when using `http` transport (default `127.0.0.1`). Set this explicitly, for example to `0.0.0.0`, only when deploying behind a trusted network boundary.
1446
1447
-`--api-key <key>` – API key for authentication (or set `CONTEXT7_API_KEY` env var). You can get your API key by creating an account at [context7.com/dashboard](https://context7.com/dashboard).
1447
1448
1448
1449
Example with HTTP transport and port 8080:
@@ -1474,6 +1475,13 @@ You can use the `CONTEXT7_API_KEY` environment variable instead of passing the `
1474
1475
CONTEXT7_API_KEY=your_api_key_here
1475
1476
```
1476
1477
1478
+
HTTP deployments can also set these security options:
1479
+
1480
+
-`CONTEXT7_MCP_HOST` – Interface to bind; the CLI `--host` value takes precedence.
1481
+
-`CONTEXT7_MCP_ALLOWED_ORIGINS` – Comma-separated additional browser origins allowed to call the server. Values must be exact origins, such as `https://docs.example.com`.
1482
+
1483
+
Requests without an `Origin` header, such as normal server-to-server MCP clients, continue to work. When bound to loopback, browser requests must use a loopback origin and the Host header is validated against DNS rebinding. With a non-loopback bind, Context7's production web origins and any explicitly configured origins are allowed.
1484
+
1477
1485
**Example MCP configuration using environment variable:**
0 commit comments