How to Connect an AI Agent Like Claude or ChatGPT to Val Town

Updated

Val Town provides an MCP (Model Context Protocol) server and Skills so you can connect AI agents — including Claude, ChatGPT, Claude Code, Codex, and Cursor — and let them write, run, and deploy vals to live URLs. The connection works through a setup guide for each agent, and once connected, your agent can create and manage vals on your behalf. This is the right approach if you want to ship websites, automations, or tools faster by having an AI agent do the building inside Val Town rather than switching between tools.

What you need before connecting

  • A Val Town account (the site offers Sign Up and Log in).
  • An AI agent that supports MCP or Skills: the listed options are Claude, ChatGPT, Claude Code, Codex, and Cursor.
  • Access to the agent's own configuration for adding an MCP server or skill — Val Town points you to "Setup guides and other agents" for the specifics.

Val Town's own description of the flow is "Code with AI or connect to the MCP server," so you have two paths: let the agent code directly, or wire it in through MCP.

Step-by-step: connecting an agent

  1. Sign up or log in to Val Town. You need an account before an agent can deploy anything to your workspace.
  2. Open the setup guides. Val Town links "Setup guides and other agents" alongside the agent logos (Claude, ChatGPT, Claude Code, Codex, Cursor). Use the guide matching your agent rather than guessing at configuration.
  3. Add the Val Town MCP server (or Skill) to your agent. Follow the guide for your specific agent, since each one configures MCP or Skills differently.
  4. Authorize the connection so the agent can act on your Val Town account.
  5. Test with a small task. Ask the agent to create a simple val — for example, one that returns a response at a live URL — and confirm it deploys.

Expected result: your agent can now write code, run it, and deploy vals to live URLs inside Val Town, using the same environment that supports scheduled crons, incoming emails, SQLite, and S3 blob storage.

What the agent can do once connected

Capability What it means for you
Write and deploy vals Agent ships code to a live URL (Val Town advertises deployment in 100ms)
Run code and schedule crons Agent can set up recurring jobs, not just one-off scripts
Receive emails Agent-built vals can handle inbound email
Use SQLite and S3 storage Agent can persist data without external services
TypeScript editor with code intelligence Code is written in a TypeScript environment with intelligence support

Val Town also lists a CLI, version control, and code intelligence as features, so agents and humans can work in the same project.

Common tasks people hand to a connected agent

The homepage shows the kinds of things users build, which are good first tests for a connected agent:

  • Alert a Slack channel when a big deal closes in HubSpot.
  • Email a daily digest of new enterprise trials.
  • Build an admin dashboard for a support queue.
  • Enrich new signups and route them to the right rep.

Each of these maps to a val that runs on a schedule, responds to a webhook, or serves a page — all things the agent can create after connecting.

Why people connect agents this way

Val Town's page quotes practitioners on the speed and fit:

  • Paul Carleton (MCP Core Maintainer, Anthropic): "It's so easy to put up a quick MCP or API with Val Town. I've tried other platforms and CDNs, but it's so much faster and smoother to go with Val Town."
  • Justin Uberti (Head of Realtime, OpenAI): "Val Town is amazing for working with webhooks, just hit save and your code is running in production in literally 2 seconds!"
  • Paul Kinlan (Chrome DevRel Lead, Google): "I love Val Town for building little experiments and getting them hosted quickly. The fact that you can instantly have a URL to run code is incredible."
  • Simon Willison (AI Researcher): "Val Town solves one of my favourite technical problems: how to run untrusted code in a safe sandbox."

These observations point to the same conclusion: the value of connecting an agent is fast iteration — the agent writes, you save, and it runs at a URL almost immediately.

Where to get help and details

  • Docs and Setup guides for agent-specific configuration.
  • MCP & Skills page for the integration surface.
  • Discord community, GitHub discussions, X (Twitter), Bluesky, and a YouTube channel for questions and examples.
  • Templates, Showcase, and API examples for starting points.
  • Pricing and Limits pages for plan and usage details (check these directly, since the homepage does not state pricing terms).

Key things to watch for

  • Agent support varies. Not every agent configures MCP the same way; use the guide for your specific agent instead of a generic MCP tutorial.
  • Authorization matters. The agent acts on your account, so connect it deliberately and review what it deploys.
  • Start small. A single val that returns a response is a faster way to confirm the connection works than a multi-step automation.
  • Check Limits. If you plan to run crons or handle email at volume, review the Limits page before scaling up.