• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
dcm31

dcm31

mcp-client

Minimal MCP chat client using OpenAI Responses API
Public
Like
mcp-client
Home
Code
4
api
1
ui
5
README.md
H
index.tsx
Connections
Environment variables
1
Branches
1
Pull requests
Remixes
History
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
README.md
Code
/
README.md
Search
…
Viewing readonly version of main branch: v22
View latest version
README.md

mcp-client

A lightweight chat UI for talking to OpenAI models that can use MCP servers as tools. Built on Val Town with Hono.

Point it at any MCP server URL, ask a question, and the model will discover and call tools on its own.

How it works

Rendering mermaid diagram...

Features

  • Plug in any MCP server — add/remove server URLs in the sidebar. Ships with a dice roller as a default.
  • Multiple threads — conversations persist in localStorage.
  • Tool call inspector — click any tool call to expand arguments and output.
  • Model picker — switch between gpt-4.1, gpt-4.1-mini, gpt-4.1-nano, gpt-4o, o3, o4-mini.

Setup

  1. Fork this val
  2. Set the OPENAI_API_KEY environment variable in your val's settings
  3. That's it — open the endpoint URL

Project structure

index.tsx          → Hono HTTP entrypoint, serves HTML + routes
api/
  chat.ts          → POST /api/chat — proxies to OpenAI with MCP tools
ui/
  Layout.tsx       → HTML shell
  Sidebar.tsx      → Thread list, MCP server manager, settings
  ChatArea.tsx     → Message area + input bar
  client.ts        → All client-side JS (threads, MCP, send loop)
  styles.ts        → CSS

Environment variables

KeyRequiredDescription
OPENAI_API_KEY✅Your OpenAI API key. Used server-side only — never sent to the browser.
FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
AboutAlternativesPricingBlogNewsletterCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2026 Val Town, Inc.