Skip to content

GUIDE, read 12 Nov 2026

Local MCP servers run with the user's full privileges, so find the config files first and restrict which servers may start

See the full indexAll guides

Surfaces this guide covers

  • Desktop apps
  • IDE assistants
  • Command-line agents
  • MCP servers
  • Browser extensions
  • SaaS copilots

Actions it covers

  • File read
  • Shell command
  • Network call
  • Credential access
  • Data paste
  • Package install

A local MCP server is a program the AI client launches as the user

The Model Context Protocol (MCP) lets an AI application call tools and read data through a standard interface. It defines two standard transports: stdio, where the client launches the server as a subprocess and talks to it over standard input and output, and Streamable HTTP (Model Context Protocol specification, transports page, read 12 Nov 2026). On a laptop, stdio is the common local case. The spec says clients SHOULD support stdio whenever possible.

That design has a direct endpoint consequence. When a user adds a stdio server, the client config holds a command, its arguments and environment variables. The client runs that command. The resulting process has the same file, network and credential access as the user. The MCP security best practices page says this plainly: local MCP servers may have direct access to the user's system and may be accessible to other processes on the machine, which makes them attractive targets (modelcontextprotocol.io, security best practices page, read 12 Nov 2026).

This guide covers servers on the laptop. Remote MCP servers reached over HTTP raise different questions, and gateways that sit in front of them are a separate product category that this site does not cover.

Each client keeps its server list in a different file, so discovery needs one path per client

There is no registry of which MCP servers a machine runs. The only inventory is the set of client config files, plus the processes those clients start. These are the locations documented by each vendor, read on 12 Nov 2026.

ClientWhere the config livesSource
Claude DesktopmacOS: ~/Library/Application Support/Claude/claude_desktop_config.json. Windows: %APPDATA%\Claude\claude_desktop_config.json. Linux: ~/.config/Claude/claude_desktop_config.jsonmodelcontextprotocol.io, connect local servers
CursorProject: .cursor/mcp.json. Global: ~/.cursor/mcp.json. Fields for stdio servers include type, command, args and envCursor docs, MCP
VS Codemcp.json files that VS Code reads for workspace and user servers, with enterprise policy keys ChatMCP (chat.mcp.access) and ChatAllowedMcpServersVS Code docs, MCP servers and enterprise policies
Claude CodeProject: .mcp.json in the repository. User and local scope: ~/.claude.json. Organization: managed-mcp.json at a fixed system pathAnthropic, Claude Code MCP and managed MCP

Project-level configs travel with the repository, which changes who can add a server

Two of the four clients accept a config file inside the project folder: Cursor reads .cursor/mcp.json, and Claude Code reads .mcp.json in the repository. A project file can be committed to source control, which means a teammate or a cloned repository can introduce a server definition to a developer's machine. The user adds nothing by hand.

Anthropic's documentation addresses this. Claude Code has a project server approval step and a workspace trust step that govern how approvals committed to a repository are treated (Anthropic, Claude Code MCP page, read 12 Nov 2026). Treat those prompts as part of your control surface. A developer who clicks through an approval for a repository they just cloned has given that repository's author a way to start a process on the laptop.

This is the same pattern the MCP security page lists first among local-server attacks: an attacker includes a malicious startup command in a client configuration. The page names three attacks in all, which are a malicious startup command in a config, a malicious payload inside the server itself, and access to an insecure local server left running on localhost, through DNS rebinding.

The MCP specification names the risks of local servers and the client controls that answer them

The security best practices page has a section on local MCP server compromise. It says that without proper sandboxing and consent requirements, an attacker can include a malicious startup command in a client configuration, distribute a malicious payload inside the server, or reach an insecure server left running on localhost through DNS rebinding. It lists the impacts as remote code execution with user privileges, session hijacking, credential theft and unauthorized actions (modelcontextprotocol.io, security best practices page, read 12 Nov 2026).

Its mitigations are written for client authors, but each one maps to something an endpoint team can check or enforce:

  • Consent before connecting. For one-click configuration, the client MUST show the exact command, with arguments and parameters and without truncation, identify it as a potentially dangerous operation that executes code, and require explicit user approval. Check whether each client you allow does this.
  • Warn on dangerous patterns. The page asks clients to highlight commands that access sensitive locations such as the home directory, SSH keys and system directories.
  • Warn that servers run with the client's privileges. Users should be told that a server acts as them.
  • Sandbox the server. The page recommends running server commands in a sandboxed environment with minimal default privileges, restricted file system and network access, and a way for users to grant specific extra access.
  • Use platform sandboxing. Containers, chroot and application sandboxes are named as options, kept up to date.

Inventory starts with the config files and ends with the running processes

Discovery has two layers, and you need both. The config layer tells you which servers a user has defined. The process layer tells you which are running and what they started.

For the config layer, collect the files in the table above from every user profile on the machine, not only the logged-in user. Parse out the command, args, env keys and url fields. Record the file path, a hash of the file and the modification time so that you can detect change. Do not collect the values of env entries: they often hold API tokens, and your inventory should not become a second copy of them.

Pay attention to the command field. A server defined as npx, uvx, docker run or a bare interpreter pulls and executes code from a package registry or image at launch. A server defined as a path to a binary in the user's home directory is a program you have not reviewed. Both patterns are normal for MCP, and both are worth a line in the inventory.

For the process layer, look for child processes of the AI clients: Claude Desktop, Cursor, VS Code and its derivatives, and command-line agents. A stdio server is a child of the client, so process ancestry separates an MCP server from an unrelated Node or Python process. Your EDR or an OS-level sensor can supply this ancestry. Record the parent, the executable path, the command line and any listening ports.

Control comes from managed policy at the client, and each client offers a different lever

Whichever route you choose, write the rule down as a list of approved servers by name and version, not as a general instruction to be careful.

  • Claude Code: deploy a managed-mcp.json to /Library/Application Support/ClaudeCode on macOS, /etc/claude-code on Linux and WSL, or C:\Program Files\ClaudeCode on Windows. Anthropic describes this as exclusive control: users get the fixed set you ship. Allow and deny lists (allowedMcpServers and deniedMcpServers) are available when you want users to keep their own servers inside limits. Deploy through MDM, Group Policy or Intune (Anthropic, Claude Code managed MCP page, read 12 Nov 2026).
  • VS Code: the ChatMCP policy controls access to installed MCP servers. ChatAllowedMcpServers is an allowlist, and when set, only matching servers may be installed or run. A deny list takes precedence over an allow list. McpGalleryServiceUrl sets which gallery the editor uses (Microsoft, VS Code enterprise policies page, read 12 Nov 2026).
  • Cursor and Claude Desktop: the documentation pages read for this guide describe config files and fields. None found on 12 Nov 2026 for an equivalent allowlist policy on those pages. If you need to restrict them, ask the vendor, and fall back to file-integrity monitoring on the config paths and to blocking the launch commands at the endpoint.

A short checklist for a laptop fleet

Run these steps in order. Each is a task, not a product feature.

  • Find every config file for the four clients on a sample of 20 machines and count servers per machine. The number sets the size of the problem.
  • Group servers by launch method: package runner, container, local binary, remote URL. Package runners and local binaries deserve first review.
  • Choose an approved list. Start from the servers your developers already use and that you can name an owner for.
  • Deploy managed policy where the client supports it, and set a monitored baseline where it does not.
  • Alert on a new or changed server definition, and on a process whose parent is an AI client and whose executable lives under a user-writable directory.
  • Review how each client displays the startup command at approval time, and train people to read it.
  • Reduce server privileges where you can: restrict the folders a filesystem server may read, and keep tokens out of env entries where a secret store is available.

What vendors can add, and what to ask them

A product that covers MCP on the endpoint should be able to show you, per device, the servers defined and the servers running, with the command that started each. It should show tool calls made through the server where it can read them, and it should be able to block a server from starting or a tool call from completing. Whether it can do the last of these before the action happens is the question that separates monitoring from control.

Ask for three things in a trial: the config paths it reads, the process it watches for a stdio server's launch, and a demonstration of a blocked server on one of the four clients above. Treat what the vendor says as the vendor's claim until you have seen the block happen on your own machine. On this site's scorecard, an unconfirmed vendor claim is capped at 7 of 10.

Where this sits in the index

Sources

  1. modelcontextprotocol.io: security best practices, read 12 Nov 2026
  2. modelcontextprotocol.io: transports specification 2025-11-25, read 12 Nov 2026
  3. modelcontextprotocol.io: connect to local servers, read 12 Nov 2026
  4. Cursor: MCP docs, read 12 Nov 2026
  5. Microsoft: VS Code MCP servers, read 12 Nov 2026
  6. Microsoft: VS Code enterprise policies, read 12 Nov 2026
  7. Anthropic: Claude Code MCP, read 12 Nov 2026
  8. Anthropic: Claude Code managed MCP, read 12 Nov 2026

Last reviewed 12 Nov 2026.