---
title: "Petstore MCP Server (TypeScript) | Cosmonic"
description: "Build a sandboxed MCP server in TypeScript, compiled to a WebAssembly component. Deploy to Cosmonic Control with Helm for secure, isolated AI agent tool access."
canonical: "https://cosmonic.com/docs/template-catalog/mcp-server-ts/"
---

# Petstore MCP Server (TypeScript)

A template for creating a [Model-Context-Protocol (MCP)](https://github.com/modelcontextprotocol) Server as a sandboxed WebAssembly component, using TypeScript.

## Deploy with Helm

```shell
helm install petstore-mcp --version 0.2.0 oci://ghcr.io/cosmonic-labs/charts/http-trigger -f https://raw.githubusercontent.com/cosmonic-labs/control-demos/refs/heads/main/petstore-mcp/values.http-trigger.yaml
```

**Repository**: [`cosmonic-labs/mcp-server-template-ts`](https://github.com/cosmonic-labs/mcp-server-template-ts) **Languages**: TypeScript **Interfaces**: `wasi/http`

## Running on Kubernetes

You will need a local Kubernetes environment with Cosmonic Control installed according to the [Get Started](https://cosmonic.com/docs/install-cosmonic-control/) guide.

The MCP server will serve at [http://petstore-mcp.localhost.cosmonic.sh/v1/mcp](http://petstore-mcp.localhost.cosmonic.sh/v1/mcp)

If you'd like to debug your MCP server, you can start [the official MCP model inspector](https://github.com/modelcontextprotocol/inspector) via the following command:

```shell
npx @modelcontextprotocol/inspector
```

Configure the MCP model inspector's connection:

- Transport Type: **Streamable HTTP**
- URL: `http://petstore-mcp.localhost.cosmonic.sh/v1/mcp`
- Connection Type: **Via Proxy**

## Development

See development guide on the [Sandbox AI](https://cosmonic.com/docs/securely-deploy-mcp-on-kubernetes/) page.

## Learn More

- See the wasmCloud Developer Guide for instructions on [pushing your Wasm component to an OCI registry](https://wasmcloud.com/docs/wash/developer-guide/).
- To learn how to extend this example with additional capabilities, see the [Adding Capabilities](https://wasmcloud.com/docs/tour/adding-capabilities?lang=rust) section of the wasmCloud documentation.

Last updated on **Nov 10, 2026** by **Liam Randall**
