← Back to guides
Claude Desktop MCP examples

Claude Desktop MCP Config Examples

Copy practical Claude Desktop MCP config examples for filesystem, GitHub, search, and multiple servers with safe placeholders and troubleshooting notes.

Updated 2026-06-0610 min readKeyword: Claude Desktop MCP config examples

Use these Claude Desktop MCP config examples as starting points for common local setups: filesystem access, GitHub tools, browser or search access, and multiple MCP servers in one config file.

Replace placeholder paths and environment variables with your own local values, then restart Claude Desktop after saving the file. These examples are independent reference snippets for practical setup work and are not official Anthropic or Claude documentation.

For a safer first draft, generate a placeholder-based config in the Claude Desktop MCP Config Generator, then compare it with the examples below before copying anything into your local file.

Key takeaways

  • Start with one MCP server example, confirm it works, then add additional servers.
  • Keep public examples safe by using placeholders such as ${GITHUB_TOKEN} and ${BRAVE_API_KEY}.
  • Limit filesystem paths and token scopes instead of giving Claude Desktop broad access on the first setup.

Before you copy a config example

Claude Desktop reads MCP server definitions from a local JSON config file. The important top-level key is mcpServers. Each server gets a unique name, a command, optional arguments, and optional environment variables.

Keep the JSON valid, avoid trailing commas, and never paste real API keys into public code or screenshots. Use placeholders such as ${GITHUB_TOKEN} in examples, then handle real values only in your private local setup.

  • Use one top-level mcpServers object
  • Give each server a clear local name
  • Keep args as an array
  • Use placeholders in public examples
  • Restart Claude Desktop after changes

Filesystem MCP config example

Use a filesystem server when you want Claude Desktop to read or work with files in specific local folders. Limit access to only the directories you actually need.

Do not point a filesystem server at your entire home folder unless you understand the privacy and security tradeoffs. A narrow Documents or project path is safer for an initial test.

  • Best for local documents and projects
  • Use explicit folder paths
  • Avoid broad home-directory access
  • Test with a harmless folder first
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/your-name/Documents",
        "/Users/your-name/Projects"
      ]
    }
  }
}

GitHub MCP config example

Use a GitHub server when you want Claude Desktop to inspect repositories, issues, pull requests, or other GitHub data through MCP tools.

Create a token with the minimum scopes needed for your workflow. Do not hard-code a real token in shared examples, commits, screenshots, support tickets, or client-side pages.

  • Use a narrow token scope
  • Prefer read-only access for first tests
  • Use ${GITHUB_TOKEN} in examples
  • Review write actions before enabling them
{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-github"
      ],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}"
      }
    }
  }
}

Browser or search MCP config example

Use a search server when you want Claude Desktop to look up web results through a supported MCP server. This example uses a placeholder search API key.

Keep API keys outside static site code and only show placeholder values in browser-rendered documentation. Search results and web pages can contain untrusted instructions, so pair browser or search servers with a security checklist.

  • Use placeholder API keys in examples
  • Treat web content as untrusted
  • Avoid sending private prompts to unknown services
  • Document which search provider the server calls
{
  "mcpServers": {
    "brave-search": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-brave-search"
      ],
      "env": {
        "BRAVE_API_KEY": "${BRAVE_API_KEY}"
      }
    }
  }
}

Multiple MCP servers in one Claude Desktop config

Claude Desktop can load more than one MCP server from the same config file. Give each server a clear, unique key under mcpServers.

Start with one server, confirm it works, then add the next server. This makes troubleshooting easier when a command, path, package, or token is wrong.

  • Keep server names unique
  • Add one server at a time
  • Separate filesystem, GitHub, and search capabilities
  • Remove unused servers instead of leaving stale entries enabled
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/your-name/Documents",
        "/Users/your-name/Projects"
      ]
    },
    "github": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-github"
      ],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}"
      }
    },
    "brave-search": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-brave-search"
      ],
      "env": {
        "BRAVE_API_KEY": "${BRAVE_API_KEY}"
      }
    }
  }
}

Common Claude Desktop MCP config mistakes

Most config issues come from invalid JSON, wrong file location, missing Node.js or npx, unavailable server packages, incorrect local paths, or environment variables that are not set.

If Claude Desktop does not show the expected tools, validate the JSON first, confirm the command runs in your terminal, then restart Claude Desktop. Add servers one at a time instead of pasting a large config all at once.

  • Trailing commas
  • Wrong config folder
  • Missing Node.js or npx
  • Bad local folder path
  • Missing environment variable
  • Token scope too broad or too narrow

Use examples with a browser-only generator

For a static, browser-only site, keep examples as copyable documentation snippets. Do not collect, store, or render real user secrets.

A config generator should generate placeholder-based JSON in the browser and let users copy it locally. Avoid sending tokens, local paths, private repository names, or config contents to a backend service.

  • Generate placeholders, not real secrets
  • Copy locally
  • Review before saving
  • Pair config examples with a security checklist

Implementation checklist

  • Choose the MCP server you want to configure first
  • Confirm Node.js and npx are installed locally
  • Copy only one server example into Claude Desktop config at first
  • Replace example folder paths with real local paths you want to allow
  • Use placeholder environment variables in public examples
  • Validate the JSON before saving
  • Restart Claude Desktop after editing the config file
  • Check whether the new MCP tools appear in Claude Desktop
  • If something fails, remove other servers and test the failing server by itself
  • Never publish real tokens, private paths, or private repository names in shared configs

FAQ

Can I use more than one MCP server in Claude Desktop?

Yes. Add each server as a separate entry under the same mcpServers object. Use clear names such as filesystem, github, and brave-search.

Why is my Claude Desktop MCP config not working?

Common causes include invalid JSON, a missing comma, a trailing comma, the wrong config file location, a missing command such as npx, a bad local folder path, or a missing API token. Validate the JSON and test one server at a time.

Should I put real API keys in the config file?

Only use real secrets in your private local setup. Do not publish them in documentation, static pages, GitHub commits, screenshots, or support requests. Public examples should use placeholders like ${GITHUB_TOKEN}.

Can a static website safely generate Claude Desktop MCP config JSON?

Yes, if generation happens entirely in the browser and no secrets are sent to a backend. A static generator should output copyable JSON with placeholders and let users edit sensitive values locally.

Do I need to restart Claude Desktop after changing the config?

Yes. After editing the config file, restart Claude Desktop so it can reload the MCP server definitions.