Getting Started
Clone the project and install dependencies:CLI Arguments
context7-mcp accepts the following CLI flags:
Get your API key by creating an account at context7.com/dashboard.
Examples
HTTP transport on port 8080:Environment Variables
You can use theCONTEXT7_API_KEY environment variable instead of passing the --api-key flag. This is useful for:
- Storing API keys securely in
.envfiles - Integration with MCP server setups that use dotenv
- Tools that prefer environment variable configuration
Using .env File
CONTEXT7_MCP_HOST to choose the bind interface and
CONTEXT7_MCP_ALLOWED_ORIGINS to add exact, comma-separated browser origins.
The --host flag takes precedence over CONTEXT7_MCP_HOST. Keep the default
loopback bind for local use; set --host 0.0.0.0 only behind a trusted network
boundary.