Spaces:
Runtime error
Runtime error
phil71x
commited on
Commit
·
1a8fbbd
1
Parent(s):
6f77f6e
docs: Add comprehensive guide for setting up MCP servers on Windows
Browse files- Introduced a new document detailing the installation of prerequisites, global MCP server installation, and configuration using `cmd` and `/c`.
- Included step-by-step instructions, examples, and troubleshooting tips to enhance user experience and compatibility for Windows users.
- Provided references for further assistance and additional resources related to MCP server setup.
docs/mcp_server_setup_on_windows.md
ADDED
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# MCP Server Setup on Windows: Reference Guide
|
2 |
+
|
3 |
+
## Overview
|
4 |
+
This document summarizes key points and step-by-step instructions for setting up MCP servers on Windows, with a focus on the use of `cmd` and `/c` wrappers in configuration files. It is based on a real troubleshooting and research session.
|
5 |
+
|
6 |
+
---
|
7 |
+
|
8 |
+
## 1. Installing Prerequisites
|
9 |
+
- **Node.js**: Download and install from https://nodejs.org/
|
10 |
+
- **Python 3.10+** (if using Python-based servers): https://www.python.org/downloads/
|
11 |
+
- Add both to your PATH during installation.
|
12 |
+
|
13 |
+
---
|
14 |
+
|
15 |
+
## 2. Installing MCP Servers Globally
|
16 |
+
Open **Command Prompt (CMD) as Administrator** and run:
|
17 |
+
```sh
|
18 |
+
npm install -g @modelcontextprotocol/server-filesystem
|
19 |
+
npm install -g @modelcontextprotocol/server-memory
|
20 |
+
npm install -g @modelcontextprotocol/server-brave-search
|
21 |
+
```
|
22 |
+
(Install any other MCP servers you need.)
|
23 |
+
|
24 |
+
---
|
25 |
+
|
26 |
+
## 3. Using Absolute Paths in Configuration
|
27 |
+
Find your global npm modules path:
|
28 |
+
```sh
|
29 |
+
where node
|
30 |
+
npm root -g
|
31 |
+
```
|
32 |
+
Use these absolute paths in your config files.
|
33 |
+
|
34 |
+
---
|
35 |
+
|
36 |
+
## 4. Example MCP Server Configuration (with cmd and /c)
|
37 |
+
```json
|
38 |
+
"sentiment-analysis": {
|
39 |
+
"command": "cmd",
|
40 |
+
"args": [
|
41 |
+
"/c",
|
42 |
+
"npx",
|
43 |
+
"-y",
|
44 |
+
"mcp-remote",
|
45 |
+
"https://freemansel-mcp-sentiment.hf.space/gradio_api/mcp/sse",
|
46 |
+
"--transport",
|
47 |
+
"sse-only"
|
48 |
+
]
|
49 |
+
}
|
50 |
+
```
|
51 |
+
|
52 |
+
### What does `cmd` and `/c` do?
|
53 |
+
- **`cmd`**: Launches the Windows Command Prompt.
|
54 |
+
- **`/c`**: Tells `cmd.exe` to execute the following command and then terminate.
|
55 |
+
- This ensures the command runs in a Windows shell, which is important for compatibility and environment handling.
|
56 |
+
|
57 |
+
---
|
58 |
+
|
59 |
+
## 5. When to Use This Pattern
|
60 |
+
- Use `cmd` and `/c` when you want to ensure a command runs in the Windows Command Prompt, especially for shell-specific syntax or command chaining.
|
61 |
+
- For simple scripts, you can sometimes use `node` or `npx` directly, but `cmd` is the most compatible for complex or chained commands.
|
62 |
+
|
63 |
+
---
|
64 |
+
|
65 |
+
## 6. Windows CLI Wrapper Example
|
66 |
+
For a Windows-specific CLI wrapper (to expose PowerShell, CMD, or Git Bash as MCP tools):
|
67 |
+
- [win-cli-mcp-server](https://github.com/SimonB97/win-cli-mcp-server)
|
68 |
+
|
69 |
+
Install and configure:
|
70 |
+
```sh
|
71 |
+
npm install -g @simonb97/server-win-cli
|
72 |
+
```
|
73 |
+
Config example:
|
74 |
+
```json
|
75 |
+
"windows-cli": {
|
76 |
+
"command": "npx",
|
77 |
+
"args": ["-y", "@simonb97/server-win-cli"]
|
78 |
+
}
|
79 |
+
```
|
80 |
+
|
81 |
+
---
|
82 |
+
|
83 |
+
## 7. Tips and Troubleshooting
|
84 |
+
- Always use **absolute paths** for both Node and server files.
|
85 |
+
- Run Cursor/Claude Desktop as **Administrator** for best compatibility.
|
86 |
+
- If you need environment variables, set them in the `env` section of your config.
|
87 |
+
- If you get errors, try running the server directly in CMD to check for issues.
|
88 |
+
|
89 |
+
---
|
90 |
+
|
91 |
+
## 8. References
|
92 |
+
- [MCP-Windows Setup Guide (Gist)](https://gist.github.com/feveromo/7a340d7795fca1ccd535a5802b976e1f)
|
93 |
+
- [win-cli-mcp-server GitHub](https://github.com/SimonB97/win-cli-mcp-server)
|
94 |
+
|
95 |
+
---
|
96 |
+
|
97 |
+
## Conversation Summary
|
98 |
+
- The use of `cmd` and `/c` is a Windows-specific wrapper to ensure commands run in a shell and terminate after execution.
|
99 |
+
- This pattern is common in MCP server configs for Windows to maximize compatibility.
|
100 |
+
- For more details or troubleshooting, see the references above or ask for help in the Cursor/Claude community forums.
|