FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
dinavinter
dinavintermcp
Unlisted
Like
mcp
Home
Code
3
clients
3
servers
1
README.md
Branches
1
Pull requests
Remixes
History
Environment variables
18
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.
Sign up now
Code
/
README.md
Code
/
README.md
Search
5/17/2025
Viewing readonly version of main branch: v456
View latest version
README.md

MCP Server Manager

This is an HTTP handler that serves as an MCP (Model Control Protocol) server with tools to create and manage structured MCP server projects.

Features

  • 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

Project Structure

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

Tools

1. create_mcp_project

Creates a new MCP server project with a structured file organization.

Parameters:

  • name: Name of the project to create
  • description: Description of the project

2. add_tool_to_project

Adds a new tool to an existing MCP server project.

Parameters:

  • projectId: ID of the project to update
  • toolName: Name of the tool to add
  • toolDescription: Description of the tool
  • inputSchema: Input schema for the tool (e.g., {"message": "z.string().describe(\"Message to process\")"}

3. update_project_file

Updates a file in an MCP server project.

Parameters:

  • projectId: ID of the project
  • filePath: Path of the file to update
  • content: New content for the file

4. get_mcp_templates

Gets the MCP server template code for various files.

Parameters:

  • templateType: Type of template to get (main or tool)

Setup Requirements

This val requires the following environment variables:

  • VAL_TOWN_API_KEY: Your Val Town API key for creating and updating projects
  • REDIS_URL: Redis URL for the MCP server (used by @vercel/mcp-adapter)

Usage

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.

File Templates

main.tsx

The main entry point for the MCP server that imports and registers all tools.

tools/[toolName].ts

Each tool is defined in its own file with a consistent structure including:

  • Name
  • Description
  • Input schema
  • Handler function
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.