MCP
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.
Viewing readonly version of main branch: v28View latest version
This directory contains the MCP (Model Context Protocol) server implementation that exposes Val Town's native capabilities.
index.ts- Main HTTP server entry pointmcp/- MCP protocol implementationserver.ts- Core MCP request/response handlingtools.ts- Tool definitions and execution handlersresources.ts- Resource discovery and readingtypes.ts- TypeScript type definitions for MCP protocol
initialize- Initialize the MCP sessionping- Health check
tools/list- List available toolstools/call- Execute a tool
resources/list- List available resourcesresources/read- Read a resource
-
Blob Storage
blob_get- Retrieve blob datablob_set- Store blob datablob_list- List blob keysblob_delete- Delete blob
-
SQLite Database
sqlite_execute- Execute SQL queries
-
Email
email_send- Send emails
-
OpenAI
openai_chat- Generate text with OpenAI
-
File Operations
file_read- Read project filesfile_list- List project files
-
Environment
env_get- Get environment variables (names only for security)
blob://[key]- Blob storage itemsfile://[path]- Project filessqlite://schema- Database schemaenv://info- Environment variable info