pc-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
🤖 AIエージェントへ
このリポジトリの導入・設定を任されたAIは、まず FOR_AI.md を読んでください。 FOR_AI.md には、AI向けの手順書(デプロイ手順・クライアント登録の注意点・やってはいけないこと)が書いてあります。このREADMEは人間向けの概要です。
pc-mcp
自分の PC を、AI から安全に操作するための OAuth 2.1 認証つき MCP サーバ。 シェル実行・ファイル操作・スクリーンショット・キー/マウス入力の10ツールを、パスワードで守られた OAuth フローの先に公開します。

認可フローはオーナーのパスワードログインでゲートされます(argon2 ハッシュで検証)
Related MCP server: AKIMCP
これは何か
FastMCP ベースの単一ファイル MCP サーバ(
server.py)認証は OAuth 2.1(認可コード + PKCE、動的クライアント登録 DCR 対応)
/authorizeの手前にパスワードログインがあり、知らない人はクライアント登録まで進めません公開は Tailscale Funnel 経由を想定(サーバ自体は
127.0.0.1にだけ bind)systemd のユーザサービスとして常駐
作者の環境では、3台の PC(デスクトップ×2、ノート×1)に同じものを入れて、Gemini のカスタムコネクタから各 PC を操作しています。
クイックスタート
対象ホスト(Linux、systemd ユーザサービスが使えること)で:
git clone https://github.com/kuraneko1/pc-mcp.git ~/pc-mcp
cd ~/pc-mcp
PCMCP_BASE_URL=https://<あなたの公開URL> ./deploy-on-host.shdeploy-on-host.sh がやること:
~/pc-mcp/.venvを作り、fastmcpとargon2-cffiをインストールsecret.key(セッション署名用)と、ランダム生成したログインパスワードのlogin.hash/login-password.txtを生成(既にあれば再生成しない)systemd ユーザサービス
pc-mcpを登録して起動
そのあと:
# ログインパスワードの確認(ホスト上でのみ見ること。チャットやGitに貼らない)
cat ~/pc-mcp/login-password.txt
# Tailscale Funnel でポート root に公開する例(18766 はサーバのローカルポート)
tailscale funnel --bg 18766MCP クライアントには https://<あなたの公開URL>/mcp を登録します。初回接続時にブラウザで認可フローが開くので、オーナーがパスワードを入力して承認します。
クライアント登録の最重要注意:Gemini のような RFC 9728 準拠クライアントは、認証情報を ポートの root から探索します。
https://host:8443/pc-mcpのようなサブパス公開だと、root にいる別サーバを誤って登録します。必ずポート root(またはゲートウェイの root パス)に置いてください。詳細は ARCHITECTURE.md と FOR_AI.md。
できること(ツール一覧)
ツール | 内容 |
| シェルコマンドを実行( |
| テキストファイルを読む(既定 60KB まで) |
| テキストファイルを書く(親ディレクトリは自動作成) |
| ディレクトリ一覧を JSON で返す(名前・種別・サイズ) |
| プロセス一覧( |
| ホスト名・カーネル・稼働時間・ディスク・メモリ概要 |
| デスクトップのスクリーンショットを PNG で返す(gnome-screenshot → grim → scrot の順に試行) |
| フォーカス中の場所に文字入力(ydotool → xdotool) |
| キー入力(xdotool 記法。例: |
| 座標を指定してマウスクリック(xdotool) |
注意:screenshot の画像結果は、クライアント側が画像タイプのツール結果に対応していないと表示されません(例:Gemini のコネクタは画像結果を落とします)。テキスト系ツールは問題なく使えます。
動作確認
OAuth フロー全体(探索 → クライアント登録 → ログイン → 認可コード交換 → MCP 呼び出し)を自動で通すテストスクリプト付き:
pip install httpx
python flow_test.py https://<あなたの公開URL> ~/pc-mcp/login-password.txt
# => FLOW TEST PASSセキュリティについての注意
このサーバは フルシェル実行 を含みます。実質「PC の操作権限そのもの」です。公開範囲とパスワード管理には十分注意してください
パスワードの平文はホスト上の
login-password.txt(chmod 600)にだけあります。Git にコミットしないでください(.gitignore済み)。チャットや issue にも貼らないこと認可済みクライアントとトークンはメモリ内保持です。サーバを再起動すると再認可が必要になります
想定する公開方法は Tailscale Funnel か、認証つきリバースプロキシ越しです。生のポートを直接インターネットに晒さないでください
ドキュメント
FOR_AI.md — AIエージェント向け手順書(導入を AI に任せる場合はこちら)
ARCHITECTURE.md — 構成・認証フロー・設計上の注意
ファイル構成
ファイル | 内容 |
| サーバ本体(単一ファイル) |
| ホストへのセットアップ一式(venv・秘密生成・systemd 登録) |
| OAuth + MCP の疎通テスト |
| 依存パッケージ |
ライセンス
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Remote MCP access to user-authorized Linux, Windows and Intel Mac devices for AI assistants.
Remote MCP server to control your Android phone from AI assistants with per-app permissions.
MCP server connecting AI agents to 100+ apps (Gmail, Slack, Notion, GitHub) via one-click OAuth.
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
Related MCP Servers
- AlicenseAqualityCmaintenanceMCP server that lets a private ChatGPT app remotely control a paired Windows PC, including files, PowerShell, programs, screenshots, mouse/keyboard, clipboard, and Chrome.214MIT
- AlicenseNot gradedqualityAmaintenanceEnables web-based AI clients like Claude, ChatGPT, and Grok to securely operate a local machine through OAuth-gated MCP tools covering files, shell, Git, databases, browser automation, and background tasks.MIT
- AlicenseNot gradedqualityBmaintenanceSelf-hosted server that lets ChatGPT, Grok, and stdio MCP clients read and write files, run PowerShell/CMD and interactive processes, and drive the Windows desktop through screenshots, window info, clicks, drags, and keyboard input. It connects via OpenAI Secure MCP Tunnels, an OAuth authorization-code + S256 PKCE HTTPS endpoint, or local stdio, exposing 38 tools under the user's own Windows account.MIT
- AlicenseNot gradedqualityBmaintenanceEnables remote control of a Windows, Linux, or macOS computer directly from an AI chat client over a self-hosted MCP endpoint, providing file management, terminal command execution, and system status monitoring through a relay-and-agent architecture secured by OAuth and device pairing.MIT