---
title: "config MCP ของ Claude Desktop: path ไฟล์, key และตัวอย่าง · DotsAgent"
description: "เพิ่มเซิร์ฟเวอร์ MCP ของ Anthropic ใน Claude Desktop: ตำแหน่งไฟล์ config, key และรูปแบบระดับบนสุด, การรองรับ OAuth สำหรับเซิร์ฟเวอร์ remote และตัวอย่าง config"
url: https://dotsagent.io/th/mcp/clients/claude-desktop
---

Anthropic

# เพิ่มเซิร์ฟเวอร์ MCP ใน Claude Desktop

Claude Desktop อ่านเซิร์ฟเวอร์ในเครื่องจาก claude_desktop_config.json ส่วนเซิร์ฟเวอร์ระยะไกลให้เพิ่มเป็น custom connector ในแอป

- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
- **Key ระดับบนสุด**: `mcpServers`
- **รูปแบบ**: json
- **OAuth สำหรับเซิร์ฟเวอร์ remote**: 

## ตัวอย่าง config

ตัวอย่างนี้เพิ่มเซิร์ฟเวอร์ที่ GitHub โฮสต์ไว้และ Playwright เป็นเซิร์ฟเวอร์ local โดยใช้รูปแบบที่ไคลเอนต์นี้รองรับ

`~/Library/Application Support/Claude/claude_desktop_config.json`

```
{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": [
        "@playwright/mcp@latest"
      ]
    }
  }
}
```

ไม่สามารถเพิ่มเซิร์ฟเวอร์ระยะไกลในไฟล์ได้ ให้ไปที่ Settings > Connectors > Add custom connector วาง URL แล้วเข้าสู่ระบบ

## หมายเหตุและข้อควรระวัง

- ปิดแล้วเปิดแอปอีกครั้งหลังแก้ไขไฟล์
- ไฟล์ log อยู่ที่ ~/Library/Logs/Claude บน macOS และ %APPDATA%\Claude\logs บน Windows
- บน Windows ให้เรียก npx ผ่าน cmd โดยใช้ command cmd และส่ง /c, npx และชื่อ package เป็น argument ตัวสร้างจะตั้งค่านี้ให้
- ไม่มี build สำหรับ Linux อย่างเป็นทางการ

[สร้าง config สำหรับ Claude Desktop →](https://dotsagent.io/th/mcp/config#client=claude-desktop)

## ไคลเอนต์อื่น

[Claude Code](https://dotsagent.io/th/mcp/clients/claude-code)

[Cursor](https://dotsagent.io/th/mcp/clients/cursor)

[VS Code (GitHub Copilot)](https://dotsagent.io/th/mcp/clients/vscode-copilot)

[Windsurf / Devin Desktop](https://dotsagent.io/th/mcp/clients/windsurf)

[Zed](https://dotsagent.io/th/mcp/clients/zed)

[OpenAI Codex CLI](https://dotsagent.io/th/mcp/clients/codex-cli)

[Gemini CLI](https://dotsagent.io/th/mcp/clients/gemini-cli)

[ChatGPT](https://dotsagent.io/th/mcp/clients/chatgpt)

[OpenClaw](https://dotsagent.io/th/mcp/clients/openclaw)

[Cline](https://dotsagent.io/th/mcp/clients/cline)

[Continue](https://dotsagent.io/th/mcp/clients/continue)

[JetBrains AI Assistant](https://dotsagent.io/th/mcp/clients/jetbrains-ai)

## แหล่งที่มา

1. [modelcontextprotocol.io](https://modelcontextprotocol.io/docs/develop/connect-local-servers)/docs/develop/connect-local-servers
2. [modelcontextprotocol.io](https://modelcontextprotocol.io/docs/develop/connect-remote-servers)/docs/develop/connect-remote-servers
3. [github.com](https://github.com/modelcontextprotocol/servers)/modelcontextprotocol/servers

แหล่งอ้างอิงอิสระสำหรับผู้สร้าง AI agent ไม่มีส่วนเกี่ยวข้องกับผู้ให้บริการที่กล่าวถึง

© 2026 DotsAgent · ตรวจสอบข้อมูลเมื่อ 1 ตุลาคม 2569
