This is an HTTP handler that serves as an MCP (Model Control Protocol) server with tools to create and manage structured MCP server projects.
- Create new MCP server projects with a structured file organization
- Add new tools to existing MCP server projects
- Update files in MCP server projects
- Get template code for MCP server files
This MCP server manager follows this structure:
project/
├── main.tsx # Main entry point with MCP handler
├── tools/
│ ├── create-mcp-project.ts # Tool to create new MCP projects
│ ├── add-tool-to-project.ts # Tool to add tools to projects
│ ├── update-project-file.ts # Tool to update project files
│ └── get-mcp-templates.ts # Tool to get MCP templates
└── resources/
├── mcp-templates.ts # Templates for MCP server files
└── val-town-api.ts # Val Town API utilities
Each MCP server project created by this tool follows this structure:
project/
├── main.tsx # Main entry point with MCP handler
└── tools/
├── echo.ts # Default echo tool
└── [toolName].ts # Additional tools
Creates a new MCP server project with a structured file organization.
Parameters:
name
: Name of the project to createdescription
: Description of the project
Adds a new tool to an existing MCP server project.
Parameters:
projectId
: ID of the project to updatetoolName
: Name of the tool to addtoolDescription
: Description of the toolinputSchema
: Input schema for the tool (e.g.,{"message": "z.string().describe(\"Message to process\")"}
Updates a file in an MCP server project.
Parameters:
projectId
: ID of the projectfilePath
: Path of the file to updatecontent
: New content for the file
Gets the MCP server template code for various files.
Parameters:
templateType
: Type of template to get (main or tool)
This val requires the following environment variables:
VAL_TOWN_API_KEY
: Your Val Town API key for creating and updating projectsREDIS_URL
: Redis URL for the MCP server (used by @vercel/mcp-adapter)
This val is designed to be used as an MCP server endpoint that can be connected to by AI assistants that support the MCP protocol. The assistant can then use the provided tools to create and manage MCP server projects with a structured approach.
The main entry point for the MCP server that imports and registers all tools.
Each tool is defined in its own file with a consistent structure including:
- Name
- Description
- Input schema
- Handler function