Open-source React UI plus a local relay/MCP bridge that turns Poke into a multi-session study chatbot with LaTeX rendering, image attachments, and reply polling.
- Node.js
20+ - A Poke API key
npx pokefor tunneling the MCP endpoint- Optional:
localtunnelif the browser cannot reach your relay directly
Browser (React UI)
│
├─ POST /send ──► Relay (Express :4242) ──► Poke webhook
│ │
│ Poke processes message
│ and calls store_reply
│ │
└─ GET /replies ◄── Relay ◄── MCP Server (:3000) ◄─┘
- The React frontend in
poke-study.jsxsends outbound messages to the relay. - The relay in
poke-relay/forwards them to the Poke inbound webhook. - Poke calls the MCP
store_replytool exposed by the relay package. - The frontend polls
/repliesand renders new assistant messages per study session.
npm install
cd poke-relay && npm installnpm run relay:build
npm run relay:startThis starts:
- MCP server on
http://localhost:3000/mcp - Relay server on
http://localhost:4242
npx poke tunnel -n "Poke Chatbot" http://localhost:3000/mcpIf your browser is not on the same machine as the relay, expose port 4242 too:
npx localtunnel --port 4242npm run devOpen http://localhost:5173, click Settings, and enter:
- your Poke API key
- the relay URL
- use
http://localhost:4242if the browser can reach the relay directly - use your
https://*.loca.ltURL if you tunneled the relay
- use
| Variable | Default | Description |
|---|---|---|
MCP_PORT |
3000 |
Port for the MCP server |
RELAY_PORT |
4242 |
Port for the Express relay |
The Poke API key and relay URL are configured in the browser UI and stored in localStorage on that browser only.
- Multi-session chat with isolated message histories
- KaTeX rendering for inline and block math
- Image paste/upload with client-side resizing
- Relay health indicator and reply polling
- Local relay that keeps the browser off the Poke webhook directly
.
├── index.html
├── package.json
├── poke-study.jsx
├── src/
│ ├── main.jsx
│ └── reset.css
├── vite.config.js
└── poke-relay/
├── package.json
├── README.md
├── src/index.ts
└── tsconfig.json
See CONTRIBUTING.md.