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: v10View latest version
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.
- 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
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
POST /mcp
- Main MCP protocol endpointGET /
- Server information and documentation
The server exposes Val Town capabilities as MCP tools that can be called by compatible AI models and clients.
├── 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