A lightweight chat UI for talking to OpenAI models with MCP tool use. Point it at any MCP server URL, ask a question, and the model discovers and calls tools on its own via the Responses API.
Built on Val Town with Hono. No build step, no framework — just server-rendered HTML and vanilla JS.
OPENAI_API_KEY in your val's environment variablesindex.tsx Hono HTTP entrypoint — serves HTML + routes
api/
chat.ts POST /api/chat — sends messages + MCP tools to OpenAI
ui/
Layout.tsx HTML shell
Sidebar.tsx Thread list, MCP server manager, model picker
ChatArea.tsx Message area + input bar
client.ts Client-side JS (threads, MCP config, send loop)
styles.ts CSS
| Key | Required | Description |
|---|---|---|
OPENAI_API_KEY | ✅ | Your OpenAI API key. Server-side only — never sent to the browser. |