• Townie
    AI
  • Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
laurynas

laurynas

ChatAppSDKStarter

A starter val for building ChatGPT Apps powered by React
Remix of laurynas/tanstackReactHonoExample
Public
Like
1
ChatAppSDKStarter
Home
Code
6
backend
4
frontend
2
shared
3
.vtignore
README.md
deno.json
Branches
1
Pull requests
Remixes
2
History
Environment variables
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
/
Code
/
Search
index.ts
https://laurynas--0199cd92ced671e8a8db90fbd3a88d30.web.val.run
README.md

Val Town ChatGPT App SDK Starter

A starter template for building ChatGPT apps with interactive widgets using MCP (Model Context Protocol) on Val Town.

Tech Stack

  • Backend: Hono + MCP Lite + Drizzle ORM + SQLite
  • Widget: React 19 + TanStack Router + OpenAI App SDK

Quick Start

  1. Visit your deployment URL to get the MCP endpoint

  2. Add to ChatGPT:

    • Open ChatGPT settings → Apps & Connectors -> Create (you will need developer mode enabled)
    • Add MCP server with your endpoint URL
  3. Test in ChatGPT:

    • "List all messages"
    • "Add a message: Hello!"
    • "Show me message #1"

Available Tools

  • list_messages - Shows all messages in an interactive widget
  • add_message - Adds a new message and shows updated list
  • get_message - Shows details for a specific message

How It Works

Tools return discriminated unions that drive widget navigation:

{ kind: "message_list", messages: [...] } // → /list route { kind: "message_detail", id: 1, ... } // → /detail/:id route

The widget automatically navigates based on the kind field.

Where do I go from here?

  1. Add tool in backend/mcp/server.ts
  2. Define output schema in shared/types.ts
  3. Create widget route in frontend/widgets/routes.tsx
  4. Update NavigationSync.tsx to handle new kind
HTTP
  • index.ts
    laurynas--01…30.web.val.run
Code
backendfrontendshared.vtignoreREADME.mddeno.json
FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
ExploreDocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.