mcp -template-ts
Template repository for create a Wasm MCP Server
claude mcp add --transport stdio cosmonic-labs-mcp-server-template-ts node server.js \ --env PORT="3000" \ --env NODE_ENV="development"
How to use
This MCP server template provides a starting point for building a WebAssembly component server that adheres to the Model Context Protocol (MCP) and integrates with wasmCloud. The repository uses npm scripts to manage development, debugging, and tool generation. Core capabilities include developing and running the MCP server locally, inspecting and manipulating MCP resources with the model inspector, and generating MCP tools from an OpenAPI specification. Use npm run dev to build and run the component locally, and npm run inspector to launch the MCP model inspector for testing, debugging, and exploring the server’s capabilities through HTTP interactions. If you have an OpenAPI spec, you can generate MCP tools from it with npm run openapi2mcp, which creates MCP-compliant tooling based on your spec. Finally, there are deployment options via Helm for Cosmonic Control, enabling you to deploy the server in a Kubernetes environment and connect it to a Cosmonic cluster.
How to install
Prerequisites
- Node.js and npm (or pnpm/yarn if you prefer, but use npm as shown in the docs)
- git
- wash (optional for Wasm component workflows as suggested by the repo)
installation steps
-
Clone the repository: git clone https://github.com/cosmonic-labs/mcp-server-template-ts.git cd mcp-server-template-ts
-
Install dependencies: npm install
-
Run the development build and server: npm run dev
-
(Optional) Start the MCP model inspector to explore and test resources: npm run inspector
-
(Optional) Generate MCP tools from an OpenAPI spec placed in your repo: npm run openapi2mcp path/to/openapi/spec.json
-
When ready for production/deployment, follow the Cosmonic Control deployment steps described in the repository docs (e.g., using Helm to deploy Cosmonic Control, HostGroup, and then your MCP server via a Helm release).
Additional notes
Notes and tips:
- Ensure you have a Kubernetes cluster and Cosmonic Control if you plan to deploy in production (cluster access and license may be required).
- The repository recommends using Kind for local Kubernetes development and provides a sample kind-config.yaml for a simple local ingress setup.
- If you modify the OpenAPI spec for tool generation, keep the spec file within the repository path expected by the openapi2mcp script.
- When testing locally with the model inspector, you can connect to the MCP server over HTTP to inspect resources, run tools, and verify behavior.
- Environment variables shown in the mcp_config example (like PORT) can be adjusted as needed for your local or deployment environment.
- If you encounter issues with licensing or Cosmonic Control, refer to the Cosmonic trial/license docs mentioned in the repository READMEs.
Related MCP Servers
iterm
A Model Context Protocol server that executes commands in the current iTerm session - useful for REPL and CLI assistance
mcp
Octopus Deploy Official MCP Server
furi
CLI & API for MCP management
editor
MCP Server for Phaser Editor
DoorDash
MCP server from JordanDalton/DoorDash-MCP-Server
mcp
MCP сервер для автоматического создания и развертывания приложений в Timeweb Cloud