FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
c15r
c15rMCP
Public
Like
MCP
Home
Code
4
backend
3
frontend
3
shared
1
README.md
Branches
1
Pull requests
Remixes
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 miliseconds.
Sign up now
Code
/
Code
/
Search
README.md

Val Town MCP Server

A Model Context Protocol (MCP) server that exposes Val Town's native tools and resources, allowing AI models to interact with Val Town's capabilities through a standardized protocol.

Features

  • Blob Storage: Read, write, list, and delete blob data
  • SQLite Database: Execute queries and manage database operations
  • Email: Send emails through Val Town's email service
  • OpenAI Integration: Access OpenAI API through Val Town's service
  • File Operations: Read and list project files
  • Environment Variables: Access environment configuration

MCP Protocol Support

This server implements the Model Context Protocol specification, providing:

  • Tool discovery and execution
  • Resource listing and reading
  • Proper error handling and validation
  • JSON-RPC 2.0 compliant messaging

API Endpoints

  • POST /mcp - Main MCP protocol endpoint
  • GET / - Server information and documentation

Usage

The server exposes Val Town capabilities as MCP tools that can be called by compatible AI models and clients.

Endpoints

  • Main Interface: GET / - Web interface with documentation
  • MCP Protocol: POST /mcp - JSON-RPC 2.0 endpoint for MCP requests
  • Health Check: GET /health - Server health status
  • API Documentation: GET /api/docs - Complete API documentation in JSON format

Example MCP Requests

// Initialize connection { "jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {} } // List available tools { "jsonrpc": "2.0", "id": 2, "method": "tools/list" } // Call a tool { "jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": { "name": "blob_set", "arguments": { "key": "my-data", "value": {"hello": "world"} } } } // List resources { "jsonrpc": "2.0", "id": 4, "method": "resources/list" }

Project Structure

├── backend/
│   ├── index.ts           # Main HTTP server
│   ├── mcp/
│   │   ├── server.ts      # MCP protocol handler
│   │   ├── tools.ts       # Tool definitions and handlers
│   │   ├── resources.ts   # Resource definitions and handlers
│   │   └── types.ts       # MCP type definitions
│   └── README.md
├── shared/
│   └── utils.ts           # Shared utilities
└── README.md
Code
backendfrontendsharedREADME.md
Go to top
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Product
FeaturesPricing
Developers
DocsStatusAPI ExamplesNPM Package Examples
Explore
ShowcaseTemplatesNewest ValsTrending ValsNewsletter
Company
AboutBlogCareersBrandhi@val.town
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.