Skip to main content

Connect to local MCP servers

Learn how to extend Claude Desktop (and similar hosts) with local MCP servers for filesystem access and other integrations.

Adapted from Connect to local MCP servers. Concepts apply to Cursor, VS Code and other MCP-compatible clients with different config paths.

Claude Desktop filesystem connector — Source: MCP docs

Filesystem server connected in a desktop host. Source: modelcontextprotocol/docs.

Quickstart menu — Source: MCP docs

Source: modelcontextprotocol/docs (quickstart-menu.png).

Screenshot of MCP tools in the host — Source: MCP docs

Source: modelcontextprotocol/docs (quickstart-screenshot.png).

Prerequisites

  • An MCP host (for example Claude Desktop)
  • Node.js LTS (for many npm-based servers) and/or uv for Python servers
  • Absolute paths to directories the server may access

Example: filesystem server (Claude Desktop)

Config locations:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/Users/username/Desktop",
"/Users/username/Downloads"
]
}
}
}

Replace username and directory paths. On Windows use escaped Windows paths under C:\\Users\\....

Restart the host completely after saving.

What the filesystem server can do

  • Read file contents and directory structures
  • Create, move and rename files (with approval)
  • Search by name or content

Plug icon for connectors — Source: MCP docs

Connector affordance. Source: modelcontextprotocol/docs.

Using tools safely

Before each file operation, the host should request approval. Review carefully; deny when unsure.

Try prompts such as:

  • “Write a poem and save it to my desktop”
  • “What work-related files are in Downloads?”
  • “Organise desktop images into an Images folder”

Troubleshooting

SymptomChecks
Server does not appearRestart host; validate JSON syntax; use absolute paths
Connection failsRun the command manually in a terminal; inspect host MCP logs
Tools fail at runtimeRebuild/reinstall package; check mcp-server-*.log stderr files
${APPDATA} path errors on WindowsExpand and set env.APPDATA explicitly in config

Logs (Claude Desktop):

  • macOS: ~/Library/Logs/Claude (mcp.log, mcp-server-*.log)
  • Windows: %APPDATA%\Claude\logs
tail -n 20 -f ~/Library/Logs/Claude/mcp*.log

For deeper techniques see Debugging.

Negative cases

  • Relative paths in config → often fail; use absolute paths.
  • Granting $HOME wholesale → excessive blast radius.
  • Assuming approval is optional → insecure; keep human confirmation for writes.
  • Mixing secrets into args → prefer env blocks.

Tools list after connect — Source: MCP docs

Verify tools appear after reconnect. Source: modelcontextprotocol/docs.

Discussion

Comments

Share feedback or questions about this page. No account required.

Loading comments…