• 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: v24
View latest version
README.md

mcp-client

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.

Features

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

Setup

  1. Fork this val
  2. Set OPENAI_API_KEY in your val's environment variables
  3. Open the endpoint URL

Project structure

index.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

Environment variables

KeyRequiredDescription
OPENAI_API_KEY✅Your OpenAI API key. 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.