How to Run an MCP Server on Windows
Configure a local MCP server on Windows for Claude Desktop or VS Code, diagnose connection failures, and choose between stdio, HTTP, and Windows integration.
Short answer: install the MCP server and its required runtime, copy the launch command from that server’s official documentation, add that command to your MCP client’s configuration, then restart the client. On Windows, Claude Desktop commonly reads %APPDATA%\\Claude\\claude_desktop_config.json; Visual Studio Code uses its own MCP configuration and supports local stdio servers as well as remote HTTP servers. The command is server-specific: it may invoke uv, node, dotnet, or a compiled executable.
A local MCP server is normally a child process started by the host application. With stdio transport, the client writes protocol messages to the process’s standard input and reads responses from standard output. The server is software, not automatically a Windows service. [The MCP Python SDK host guide](https://modelcontextprotocol.io/docs/develop/build-server) and [the VS Code MCP configuration reference](https://code.visualstudio.com/docs/copilot/chat/mcp-servers) describe this process model.
What you need before starting
- Windows account access to install the server and its runtime.
- The selected server’s official installation instructions and launch command.
- An MCP host such as Claude Desktop or Visual Studio Code.
- Any API keys, working directories, certificates, or other environment values required by that server.
- Absolute Windows paths to executables and entry-point files where the host requires them.
Do not paste a command from one MCP server into another server’s configuration. The package determines the runtime, arguments, transport, and required environment variables.
Run a local MCP server with Claude Desktop
1. Install the server and runtime
Follow the server’s own documentation. Typical launch commands include:
uv run ...for a Python server managed withuv.node ...for a TypeScript or JavaScript server whose entry point has been built.dotnet run ...for a .NET server.- A compiled executable for a native server.
Confirm the command works in a terminal first, but remember that Claude Desktop starts a separate process and may not inherit the terminal’s PATH or environment variables.
2. Open Claude Desktop’s Windows configuration file
The usual path is:
%APPDATA%\\Claude\\claude_desktop_config.json
Open it in a text editor. If the file does not exist, create it and ensure the filename is exactly claude_desktop_config.json, not .txt.
3. Add the server entry
Use this structure as a pattern. Replace every placeholder with values from the selected server’s documentation:
{
"mcpServers": {
"my-server": {
"command": "C:/path/to/runtime-or-executable",
"args": [
"argument",
"C:/absolute/path/to/server-entrypoint"
]
}
}
}
Windows paths in JSON can use forward slashes or doubled backslashes:
{
"command": "C:\\Python312\\python.exe",
"args": ["C:\\Users\\you\\mcp\\server.py"]
}
4. Pass environment variables explicitly
A server that needs an API key or configuration value may require an environment section supported by the host and server instructions. Do not assume a variable exported in PowerShell will be visible to the desktop application. Keep secrets out of public examples and use the host’s documented secret-handling method.
5. Save and fully restart Claude Desktop
Close and reopen the application after changing the configuration. A reconnect or chat refresh may not reload the file. Open the client’s developer or connector view and verify that the server appears and exposes its tools.
Run a local MCP server in Visual Studio Code
VS Code has a different configuration location and schema from Claude Desktop. Open the current MCP configuration interface documented by [VS Code](https://code.visualstudio.com/docs/copilot/chat/mcp-servers), add a local server, and supply:
- Command: the runtime or executable.
- Arguments: the server’s documented arguments and absolute entry-point path.
- Working directory: when the server expects relative files.
- Environment variables: values needed at startup.
- Environment file: when the configuration supports loading variables from a file.
VS Code also documents remote HTTP MCP servers. A remote HTTP endpoint is a different deployment model from a locally spawned stdio process, so do not place an HTTP URL into a local command field or expect a local executable to behave like a remote server.
Python launch example with uv
The MCP Python SDK documentation uses uv as a common way to run a Python server. The exact package name and arguments still come from your server’s instructions. If the host cannot locate uv, use its full path in the configuration.
{
"mcpServers": {
"python-server": {
"command": "C:/Users/you/.local/bin/uv.exe",
"args": [
"run",
"C:/Users/you/mcp/server.py"
]
}
}
}
Verify the executable location with PowerShell before saving:
Get-Command uv
Get-ChildItem "C:\Users\you\mcp\server.py"
Node.js launch example
For a TypeScript server, build it first if the package requires a compiled JavaScript entry point. A typical pattern is:
{
"mcpServers": {
"node-server": {
"command": "C:/Program Files/nodejs/node.exe",
"args": [
"C:/Users/you/mcp/dist/index.js"
]
}
}
}
Use the Node executable and entry point specified by the server’s documentation. If the project depends on a local package installation, set the documented working directory or launch through the package manager command.
How stdio transport affects your server
For a stdio server, standard output belongs to MCP protocol traffic. Diagnostic text written there can corrupt JSON-RPC messages. The official MCP build guidance states: “For STDIO-based servers: Never use console.log(), as it writes to standard output (stdout) by default. Writing to stdout will corrupt the JSON-RPC messages and break your server.” Send diagnostics to standard error instead.
- Node.js: use
console.error(), notconsole.log(), for logs. - Python: use the
loggingmodule configured for stderr. - .NET: use a logging sink that does not write protocol data to stdout.
Windows integration choices
| Route | Who starts the process | Where configuration lives | Typical use |
|---|---|---|---|
| Local stdio | Desktop host or editor | Client-specific configuration | A local server launched on demand |
| Remote HTTP | Remote service or separate process manager | Client’s remote-server settings | A server reachable over a network |
| Windows on-device agent registry | Windows agent session | Windows ODR registration | Windows agent integrations with documented resource restrictions |
Microsoft’s [Windows on-device agent registry documentation](https://learn.microsoft.com/en-us/windows/ai/overview/agent-registry) describes packaged-app and manual registration. It is a separate route from configuring Claude Desktop or VS Code. Check its current release status and applicability before depending on it.
Screenshot capture through an MCP server
If your agent needs screenshots as tools, ScreenshotNeo provides an MCP server with take_screenshot, get_page_info, and capture_pdf. Use the current [ScreenshotNeo documentation](https://screenshotneo.com/docs/) for the server-specific installation and launch command, then place that command in the Claude Desktop or VS Code configuration pattern above.
Or skip the browser setup
For a one-off or automated screenshot, call ScreenshotNeo’s HTTP API directly instead of managing a browser locally:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
ScreenshotNeo accepts consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and each response reports its result in X-Page-Verdict and X-Billed headers. Its MCP server lets Claude, Cursor, and other MCP clients take screenshots. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots. See the [API documentation](https://screenshotneo.com/docs/) for the available options.
Create a free ScreenshotNeo account to get 1,000 screenshots each month without a card.
Configuration options worth checking
- Absolute paths: use an explicit executable and entry-point path when discovery through
PATHis unreliable. - Arguments: preserve argument order and quote paths through JSON string escaping.
- Working directory: set it when relative imports, files, or configuration are required.
- Environment: pass API keys and feature flags through the host’s supported environment mechanism.
- Transport: confirm whether the server expects stdio or a remote HTTP connection.
- Permissions: verify that the Windows account running the host can read the files and execute the runtime.
Troubleshooting MCP on Windows
The server does not appear
- Validate the JSON syntax with a JSON-aware editor.
- Check that every executable and entry-point path exists.
- Use absolute paths and correct Windows escaping.
- Fully restart the host after editing the file.
- Confirm the server name is under the correct
mcpServersobject.
The command works in PowerShell but fails in the app
The app launches a separate process. Replace a bare command such as uv or node with its full executable path, and pass required environment variables explicitly. A terminal’s profile scripts and temporary variables are not guaranteed to be loaded by a desktop host.
The process starts, then the connection breaks
Inspect stdout first. Remove banners, debug prints, progress bars, and other ordinary output from stdout. Send logs to stderr so protocol messages remain valid.
Claude Desktop logs show an error
The Python SDK guide identifies %APPDATA%\\Claude\\logs for Claude Desktop, including general MCP logs and per-server stderr logs. Also check the current developer or log interface in the client because paths and UI can change.
Tools are missing after connection
Confirm that the server reached its initialization step and that the client lists the expected tools. Check package installation, runtime version, working directory, and required credentials. A successful process launch does not prove that the server loaded every tool.
Windows path errors
Use forward slashes such as C:/Users/you/mcp/server.py, or escape backslashes as C:\\Users\\you\\mcp\\server.py. Avoid relative paths until the server is working.
Performance, reliability, and cost
- Startup time: a host may start a fresh child process, so package loading and runtime initialization happen before the first tool call.
- Reliability: pin the documented runtime and package versions where the server supports it, use stable absolute paths, and keep logs on stderr.
- Process lifetime: expect the host to own the process lifetime for local stdio; configure a separate process manager only when using a remote deployment.
- Security: limit credentials to the server that needs them and review the tools exposed to the client.
- Network cost: local stdio avoids a separate network hop, while remote HTTP introduces network availability and authentication concerns.
- Screenshot workloads: ScreenshotNeo offers caching with a chosen TTL, async jobs with signed webhooks, bulk capture of up to 100 URLs per call, and image/PDF options. Clean shots are billed; bot checks, blank pages, timeouts, failed loads, and cache hits are not.
Windows MCP setup checklist
- Identify the exact server package and official launch command.
- Install its required runtime.
- Test the command directly in a terminal.
- Convert executable and entry-point paths to absolute paths.
- Escape JSON paths correctly.
- Provide environment variables explicitly.
- Keep stdout reserved for MCP protocol messages.
- Save the client configuration and fully restart the host.
- Confirm the server and its tools in the client’s developer view.
- Read host and server stderr logs when connection fails.
FAQ
Is an MCP server a Windows service?
Usually no. A local MCP server is commonly a program launched as a child process by the MCP host.
Can one configuration file work in every MCP client?
No. Claude Desktop, VS Code, and other clients have different locations and schemas.
Do I need Windows on-device agent registry registration?
No. Ordinary Claude Desktop or VS Code local configuration does not require ODR registration.
Why does a server work when launched manually but not from Claude?
The desktop host may use a different working directory, PATH, permissions, or environment. Use explicit paths and variables.
Can I use a remote MCP server from Windows?
Yes, when the client supports the server’s documented HTTP configuration. That is separate from launching a local stdio process.


