Personal MCP Remote Agent
Safe MCP gateway that lets ChatGPT securely control a Windows Desktop Agent, enabling project file reads, git status/diff, and npm build/test within a designated workspace.
README
Personal MCP Remote Agent
Personal MCP Remote Agent คือ MVP สำหรับให้ ChatGPT เชื่อมผ่าน MCP ไปยัง Gateway แล้วส่งคำสั่งแบบปลอดภัยไปยัง Desktop Agent บน Windows เครื่องนี้ โดยรอบแรกเปิดเฉพาะโหมด SAFE: อ่านโปรเจกต์, อ่านไฟล์ text, ดู git status/diff, และรัน npm run build / npm test จากโปรเจกต์ที่อยู่ใน WORKSPACE_ROOT เท่านั้น
Architecture
ChatGPT -> MCP over HTTPS -> Gateway -> Secure WebSocket -> Desktop Agent -> WORKSPACE_ROOT
apps/gateway: HTTP server, WebSocket server, MCP endpointapps/desktop-agent: CLI agent ที่เชื่อม Gateway และ execute toolspackages/shared: path safety, permission, command wrapper, audit logpackages/protocol: Zod schemas สำหรับ message และ tool args
Requirements
- Node.js 22+
- npm 10+
- Git ใน PATH
Setup บน Windows
cd personal-mcp-agent
npm install
Copy-Item .env.example .env
แก้ .env:
GATEWAY_PORT=8787
GATEWAY_HOST=127.0.0.1
GATEWAY_URL=ws://127.0.0.1:8787/agent
AGENT_TOKEN=replace-with-a-long-random-token
WORKSPACE_ROOT=D:\AI-Workspace
DEVICE_ID=personal-windows-agent
DEVICE_NAME=Windows Desktop Agent
PERMISSION_MODE=SAFE
สร้าง WORKSPACE_ROOT และวางโปรเจกต์ที่ต้องการให้ Agent อ่านไว้ใต้ folder นี้ ห้ามใช้ token จริงใน source code
Run
เปิด Gateway:
npm run dev:gateway
ตรวจ health:
curl http://127.0.0.1:8787/health
เปิด Desktop Agent อีก terminal:
npm run dev:agent
ดู Agent ที่เชื่อมแล้ว:
curl http://127.0.0.1:8787/api/devices
MCP endpoint อยู่ที่:
POST http://127.0.0.1:8787/mcp
MCP Tools
get_devicesget_projectslist_filesread_filegit_statusgit_diffnpm_buildnpm_test
ถ้ามี Agent มากกว่า 1 เครื่อง ให้ส่ง deviceId มากับ tool arguments
Security Limitations
- Agent อ่านหรือรันคำสั่งได้เฉพาะ path ใต้
WORKSPACE_ROOT - ป้องกัน
../, absolute path, UNC path, network path และ symlink escape เท่าที่ตรวจได้ใน MVP - ไม่มี
write_file,delete_file, arbitrary shell, git commit, git push, remote mouse/keyboard/screen control WORKและDANGEROUSมีไว้เป็น architecture placeholder แต่ยังไม่เปิดใช้งาน
Verify
npm run typecheck
npm test
npm run build
npm run smoke
ทดลองใช้งานจริง
ดูขั้นตอนแบบจับมือทำที่ docs/USAGE.md
เชื่อมกับ ChatGPT
ดูขั้นตอนเชื่อม ChatGPT Developer mode / MCP ที่ docs/CHATGPT.md
เปิด Gateway + Agent + ngrok ในหน้าต่างเดียว:
cd D:\personal-mcp-agent
npm run start:gui
หรือดับเบิลคลิก Personal MCP Agent.cmd
ถ้าต้องการใช้ launcher แบบ terminal เดิม:
npm run start:chatgpt
Windows App-like Installer
ติดตั้งจาก GitHub แบบคำสั่งเดียว:
irm https://raw.githubusercontent.com/disomanceo/personal-mcp-agent/master/install.ps1 | iex
หลังติดตั้งจะมี shortcut ชื่อ Personal MCP Agent บน Desktop ให้ดับเบิลคลิกเปิดใช้งานได้ทันที
รายละเอียดเพิ่มเติม: docs/INSTALLER.md
คู่มือใช้งานแบบง่ายภาษาไทยหลังติดตั้ง: docs/QUICKSTART-TH.md
สำหรับผู้ใช้ทั่วไป สามารถดาวน์โหลดตัวติดตั้ง setup.exe ได้จาก GitHub Releases
GUI รองรับการเพิ่มโปรเจกต์จาก URL:
- GitHub repository URL: clone เข้า
D:\AI-Workspace - Vercel project URL: สร้าง linked project พร้อม metadata
- Google Apps Script URL: สร้าง linked project พร้อม Script ID และคำแนะนำ
clasp
Phase 1 Status
Phase 1 is complete when typecheck, test, build, lint, and smoke all pass. The first commit and any push should happen only after user approval.
Vercel Project
This repository is linked to a new Vercel project:
Vercel Project: disomanceo/personal-mcp-agent
GitHub Repo: https://github.com/disomanceo/personal-mcp-agent
Production URL: https://personal-mcp-agent.vercel.app
Important: the Phase 1 Gateway uses a long-lived WebSocket connection to the Desktop Agent. Vercel Functions are not the right runtime for that WebSocket relay by themselves. For full cloud operation, run the Gateway on a persistent WebSocket-capable host, or use Vercel for HTTP/MCP-facing pieces and a separate relay service for Desktop Agent WebSockets.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。