Context7 Platform -- Up-to-date docs for AI agents
Merge branch 'get-library-id-from-user'
enesakarfce7023012cc
diff --cc README.mdindex 31efca4f,c427301c..6ecbc266--- a/README.md+++ b/README.md@@@ -247,58 -198,58 +251,58 @@@ Once saved, enter in the chat `get-librIf you prefer to run the MCP server in a Docker container:-1. **Build the Docker Image:**+1. **Build the Docker Image:**-- First, create a `Dockerfile` in the project root (or anywhere you prefer):++ First, create a `Dockerfile` in the project root (or anywhere you prefer):-- <details>-- <summary>Click to see Dockerfile content</summary>++ <details>++ <summary>Click to see Dockerfile content</summary>-- ```Dockerfile-- FROM node:18-alpine++ ```Dockerfile++ FROM node:18-alpine-- WORKDIR /app++ WORKDIR /app-- # Install the latest version globally- RUN npm install -g @upstash/context7-mcp- RUN npm install -g @upstash/context7-mcp@latest++ # 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++ # Expose default port if needed (optional, depends on MCP client interaction)++ # EXPOSE 3000-- # Default command to run the server-- CMD ["context7-mcp"]-- ```++ # Default command to run the server++ CMD ["context7-mcp"]++ ```-- </details>++ </details>-- Then, build the image using a tag (e.g., `context7-mcp`). **Make sure Docker Desktop (or the Docker daemon) is running.** Run the following command in the same directory where you saved the `Dockerfile`:++ Then, build the image using a tag (e.g., `context7-mcp`). **Make sure Docker Desktop (or the Docker daemon) is running.** Run the following command in the same directory where you saved the `Dockerfile`:-- ```bash-- docker build -t context7-mcp .-- ```++ ```bash++ docker build -t context7-mcp .++ ```-2. **Configure Your MCP Client:**+2. **Configure Your MCP Client:**-- Update your MCP client's configuration to use the Docker command.-- *Example for a cline_mcp_settings.json:*-- ```json- {- "mcpServers": {- "Сontext7": {- "autoApprove": [],- "disabled": false,- "timeout": 60,- "command": "docker",- "args": ["run", "-i", "--rm", "context7-mcp"],- "transportType": "stdio"- }- }- }- ```++ Update your MCP client's configuration to use the Docker command.- *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.*- _Example for a cline_mcp_settings.json:_++ _Example for a cline_mcp_settings.json:_+- ```json- {- "mcpServers": {- "Сontext7": {- "autoApprove": [],- "disabled": false,- "timeout": 60,- "command": "docker",- "args": ["run", "-i", "--rm", "context7-mcp"],- "transportType": "stdio"- }- }- }- ```++ ```json++ {++ "mcpServers": {++ "Сontext7": {++ "autoApprove": [],++ "disabled": false,++ "timeout": 60,++ "command": "docker",++ "args": ["run", "-i", "--rm", "context7-mcp"],++ "transportType": "stdio"++ }++ }++ }++ ```+- _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._++ _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._### Install in Windows@@@ -346,13 -290,10 +345,14 @@@ Example configuration with environment### Available Tools+Context7 MCP provides the following tools that LLMs can use:+- `resolve-library-id`: Resolves a general library name into a Context7-compatible library ID.- - `libraryName` (required)+++ - `libraryName` (required): The name of the library to search for+- `get-library-docs`: Fetches documentation for a library using a Context7-compatible library ID.- - `context7CompatibleLibraryID` (required)+ - `context7CompatibleLibraryID` (required): Exact Context7-compatible library ID (e.g., `/mongodb/docs`, `/vercel/next.js`)- `topic` (optional): Focus the docs on a specific topic (e.g., "routing", "hooks")- `tokens` (optional, default 10000): Max number of tokens to return. Values less than the configured `DEFAULT_MINIMUM_TOKENS` value or the default value of 10000 are automatically increased to that value.@@@ -427,31 -364,15 +423,27 @@@ For errors like `Error: Cannot find mod}```-### MCP Client Errors+### TLS/Certificate Issues-1. Try removing `@latest` from the package name.+Use the `--experimental-fetch` flag to bypass TLS-related problems:-2. Try using `bunx` as an alternative.+```json+{+ "mcpServers": {+ "context7": {+ "command": "npx",- "args": [- "-y",- "--node-options=--experimental-fetch",- "@upstash/context7-mcp"- ]++ "args": ["-y", "--node-options=--experimental-fetch", "@upstash/context7-mcp"]+ }+ }+}+```-3. Try using `deno` as an alternative.+### General MCP Client Errors-4. Make sure you are using Node v18 or higher to have native fetch support with `npx`.+1. Try adding `@latest` to the package name+2. Use `bunx` as an alternative to `npx`+3. Consider using `deno` as another alternative+4. Ensure you're using Node.js v18 or higher for native fetch support## Disclaimer