Poke Gate

Poke Gate

An MCP server that lets your Poke AI assistant access your macOS machine, enabling shell commands, file operations, and screenshots through natural language.

Category
访问服务器

README

<p align="center"> <img src="assets/logo.png" width="128" height="128" alt="Poke Gate icon"> </p>

<h1 align="center">Poke Gate</h1>

<p align="center"> Let your <a href="https://poke.com">Poke</a> AI assistant access your machine.<br> <sub>A community project — not affiliated with Poke or The Interaction Company.</sub> </p>

<p align="center"> <a href="https://github.com/f/poke-gate/releases/latest"><img src="https://img.shields.io/github/v/release/f/poke-gate?style=flat-square" alt="Latest Release"></a> <a href="https://www.npmjs.com/package/poke-gate"><img src="https://img.shields.io/npm/v/poke-gate?style=flat-square" alt="npm"></a> <a href="https://github.com/f/poke-gate/blob/main/LICENSE"><img src="https://img.shields.io/github/license/f/poke-gate?style=flat-square" alt="License"></a> <img src="https://img.shields.io/badge/platform-macOS%2015%2B-blue?style=flat-square" alt="Platform"> </p>


Run Poke Gate on your Mac, then message Poke from iMessage, Telegram, or SMS to run commands, read files, take screenshots, and more — all on your machine.

Install

Homebrew (recommended)

brew install f/tap/poke-gate

Install via npx

If you have Node.js installed, you can download and install the macOS app with a single command:

npx poke-gate download-macos

This downloads the latest DMG from GitHub Releases, installs the app to /Applications, and clears the quarantine flag automatically.

Don't have Node.js? Install it first:

# Option 1: Homebrew
brew install node

# Option 2: Download from https://nodejs.org

Manual download

Download the latest Poke.macOS.Gate.dmg from Releases, open it, and drag to Applications. Since the app is not notarized, you may need to run:

xattr -cr /Applications/Poke\ macOS\ Gate.app

CLI only (no macOS app needed)

If you just want to run poke-gate from the terminal without the menu bar app:

npx poke-gate

Setup

  1. Open Poke Gate from your menu bar
  2. The Setup View guides you through choosing an access mode and granting Accessibility permission
  3. Sign in with Poke OAuth when prompted — a browser window opens automatically

The app connects automatically and shows a green dot when ready.

How it works

flowchart TD
    A["You message Poke\nfrom iMessage / Telegram / SMS"] --> B["Poke Agent"]
    B --> C["Agent calls MCP tool"]
    C --> D["MCP Tunnel (WebSocket)"]
    D --> E["Poke Gate on your Mac"]
    E --> F["Runs command / reads file / takes screenshot"]
    F --> D
    D --> B
    B --> A

Poke Gate runs a local MCP server and tunnels it to Poke's cloud. When you ask Poke something that needs your machine, the agent calls the tools, Poke Gate executes them locally, and the result flows back to your chat.

Tools

Tool What it does
run_command Execute any shell command (ls, git, brew, python, curl…)
read_file Read a text file
read_image Read an image file and return it as base64
write_file Write content to a file
list_directory List files and directories
system_info OS, hostname, architecture, uptime, memory
take_screenshot Capture the screen (requires Screen Recording permission)

Examples

From iMessage or Telegram, ask Poke:

  • "What's running on port 3000?"
  • "Show me the last 5 git commits in my project"
  • "How much disk space do I have left?"
  • "Read my ~/.zshrc and suggest improvements"
  • "Take a screenshot of my screen"
  • "Create a file called notes.txt on my Desktop"

macOS App

The native SwiftUI menu bar app manages everything:

  • First-run setup — guided onboarding to choose an access mode and grant Accessibility permission
  • Status — green dot when connected, yellow when connecting, red on error
  • Personalized — shows "Connected to your Poke, [name]"
  • Access mode — switch between Full, Limited, and Sandbox from Settings or the popover
  • Accessibility-first — prompts for Accessibility permission (needed for automation) with live status updates
  • Auto-start — connects on launch if signed in via OAuth
  • Auto-restart — reconnects automatically if the connection drops
  • Logs — view real-time tool calls with sandbox status
  • About — version pulled dynamically from the app bundle

The app runs in the menu bar only (no Dock icon). Quit is the only way to stop it.

Building from source

Requires macOS 15+ and Xcode 26+.

git clone https://github.com/f/poke-gate.git
cd poke-gate/clients/Poke\ macOS\ Gate
open Poke\ macOS\ Gate.xcodeproj

Hit Run in Xcode, or build from the command line:

./build.sh

CLI usage

The CLI requires Node.js 18 or later. If you don't have it, install via brew install node or download from nodejs.org.

Start the gate:

npx poke-gate

On first run, Poke OAuth opens in your browser. Add --verbose to see tool calls in real time:

npx poke-gate --verbose

Set the access mode with --mode:

npx poke-gate --mode limited
npx poke-gate --mode sandbox

Install or update the macOS app:

npx poke-gate download-macos

Config is stored at ~/.config/poke-gate/config.json.

Agents

<p align="center"> <img src="assets/screenshots/agents-editor.png" width="600" alt="Agents Editor"> </p>

Agents are scheduled scripts that run automatically in the background. They live in ~/.config/poke-gate/agents/ and follow a simple naming convention:

<name>.<interval>.js
File Runs
beeper.1h.js Every hour
backup.2h.js Every 2 hours
health.10m.js Every 10 minutes
cleanup.30m.js Every 30 minutes

Intervals: Nm (minutes) or Nh (hours). Minimum is 10 minutes.

Install an agent

Download a community agent from the repository:

npx poke-gate agent get beeper

This downloads beeper.1h.js and .env.beeper to ~/.config/poke-gate/agents/. Edit the env file with your credentials and test it:

nano ~/.config/poke-gate/agents/.env.beeper
npx poke-gate run-agent beeper

Per-agent env files

Each agent can have a .env.<name> file for secrets:

~/.config/poke-gate/agents/.env.beeper
BEEPER_TOKEN=your_token_here

Variables are injected into the agent process automatically.

Agent frontmatter

Each agent file starts with a JSDoc-style frontmatter block:

/**
 * @agent beeper
 * @name Beeper Message Digest
 * @description Fetches messages from the last hour and sends a summary to Poke.
 * @interval 1h
 * @env BEEPER_TOKEN - Beeper Desktop local API token
 * @author f
 */

Creating your own agent

An agent is just a JS file that runs with Node.js. It has access to:

  • process.env — variables from .env.<name>
  • poke package — import { Poke, getToken } from "poke"
  • Any npm package installed globally or via npx
/**
 * @agent my-agent
 * @name My Custom Agent
 * @description Does something useful every 30 minutes.
 * @interval 30m
 */

import { Poke, getToken } from "poke";

const poke = new Poke({ apiKey: getToken() });
await poke.sendMessage("Hello from my agent!");

Save as ~/.config/poke-gate/agents/my-agent.30m.js and it runs automatically when poke-gate is connected.

Agents start running when poke-gate connects and run once immediately on startup.

Access modes

Poke Gate supports three access modes that control what your agent can do:

Mode Description
Full (default) All tools available with no approval required. The agent can run commands, write files, and take screenshots directly.
Limited Read-only tools plus a curated set of safe commands (ls, cat, grep, curl, etc.). write_file and take_screenshot are disabled.
Sandbox Broader command support than Limited, but writes are restricted to ~/Downloads and /tmp via macOS sandbox-exec.

Set the mode via CLI flag, environment variable, or the macOS app Settings:

npx poke-gate --mode sandbox
# or
POKE_GATE_PERMISSION_MODE=limited npx poke-gate

Security

In full mode, Poke Gate grants full shell access to your Poke agent. This means:

  • Any command can be run with your user's permissions
  • Files can be read and written anywhere your user has access
  • Risky tools require approval in chat before execution
  • Only your Poke agent (authenticated via Poke OAuth) can reach the tunnel

Only run Poke Gate on machines and networks you trust. Use limited or sandbox mode if you want tighter restrictions.

Credits

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选