Personal MCP Remote Agent

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.

Category
Visit Server

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 endpoint
  • apps/desktop-agent: CLI agent ที่เชื่อม Gateway และ execute tools
  • packages/shared: path safety, permission, command wrapper, audit log
  • packages/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_devices
  • get_projects
  • list_files
  • read_file
  • git_status
  • git_diff
  • npm_build
  • npm_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.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured