From a6e5bfd897ae196a042b135351df3dabe0d25a29 Mon Sep 17 00:00:00 2001 From: mbaiza27 Date: Thu, 3 Apr 2025 13:45:13 -0700 Subject: [PATCH 1/2] update readme with VS Code usage instructions --- README.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/README.md b/README.md index 82a1d8e..1217ccc 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,47 @@ You shouldn't ever need to rerun `npx workers-mcp install:claude`, but it's safe ## Using with Other MCP Clients +### VS Code + +For one-click installation, click one of the install buttons below: + +[![Install with NPX in VS Code](https://img.shields.io/badge/VS_Code-NPM-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=mcp-server-motherduck&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22workers-mcp%22%2C%22run%22%2C%22workers-mcp%22%2C%22https%3A%2F%2Fyour-server-url.workers.dev%22%2C%22%24%7BworkspaceFolder%7D%22%5D%2C%22env%22%3A%7B%7D%7D) [![Install with NPX in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-NPM-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=mcp-server-motherduck&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22workers-mcp%22%2C%22run%22%2C%22workers-mcp%22%2C%22https%3A%2F%2Fyour-server-url.workers.dev%22%2C%22%24%7BworkspaceFolder%7D%22%5D%2C%22env%22%3A%7B%7D%7D&quality=insiders) + +#### Manual Installation + +Add the following JSON block to your User Settings (JSON) file in VS Code. You can do this by pressing `Ctrl + Shift + P` and typing `Preferences: Open User Settings (JSON)`. + +```json +{ + "mcp": { + "servers": { + "workers-mcp": { + "command": "npx", + "args": ["workers-mcp", "run", "workers-mcp", "https://your-server-url.workers.dev", "${workspaceFolder}"], + "env": {} + } + } + } +} +``` + +Optionally, you can add it to a file called `.vscode/mcp.json` in your workspace. This will allow you to share the configuration with others. + +```json +{ + "servers": { + "workers-mcp": { + "command": "npx", + "args": ["workers-mcp", "run", "workers-mcp", "https://your-server-url.workers.dev", "${workspaceFolder}"], + "env": {} + } + } +} +``` + +Remember to replace `https://your-server-url.workers.dev` with your actual Worker URL. + + ### Cursor To get your Cloudflare MCP server working in Cursor, you need to combine the 'command' and 'args' from your config file into a single string and use type 'command'. @@ -95,6 +136,7 @@ In Cursor, create an MCP server entry with: * type: `command` * command: `/path/to/workers-mcp run your-mcp-server-name https://your-server-url.workers.dev /path/to/your/project` + ### Other MCP Clients For Windsurf and other MCP clients, update your configuration file to include your worker so you could use the tools directly from the client: From d4b5bade0023be360176816fc451a8210ed1dc20 Mon Sep 17 00:00:00 2001 From: mbaiza27 Date: Thu, 3 Apr 2025 14:14:26 -0700 Subject: [PATCH 2/2] update buttons --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1217ccc..0bee6aa 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,7 @@ You shouldn't ever need to rerun `npx workers-mcp install:claude`, but it's safe For one-click installation, click one of the install buttons below: -[![Install with NPX in VS Code](https://img.shields.io/badge/VS_Code-NPM-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=mcp-server-motherduck&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22workers-mcp%22%2C%22run%22%2C%22workers-mcp%22%2C%22https%3A%2F%2Fyour-server-url.workers.dev%22%2C%22%24%7BworkspaceFolder%7D%22%5D%2C%22env%22%3A%7B%7D%7D) [![Install with NPX in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-NPM-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=mcp-server-motherduck&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22workers-mcp%22%2C%22run%22%2C%22workers-mcp%22%2C%22https%3A%2F%2Fyour-server-url.workers.dev%22%2C%22%24%7BworkspaceFolder%7D%22%5D%2C%22env%22%3A%7B%7D%7D&quality=insiders) +[![Install with NPX in VS Code](https://img.shields.io/badge/VS_Code-NPM-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=workers-mcp&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22workers-mcp%22%2C%22run%22%2C%22workers-mcp%22%2C%22https%3A%2F%2Fyour-server-url.workers.dev%22%2C%22%24%7BworkspaceFolder%7D%22%5D%2C%22env%22%3A%7B%7D%7D) [![Install with NPX in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-NPM-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=workers-mcp&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22workers-mcp%22%2C%22run%22%2C%22workers-mcp%22%2C%22https%3A%2F%2Fyour-server-url.workers.dev%22%2C%22%24%7BworkspaceFolder%7D%22%5D%2C%22env%22%3A%7B%7D%7D&quality=insiderss) #### Manual Installation