---
title: "Deploy MCP JS"
description: "mcp js gives a snapshottable javascript repl connected to your tools for ai"
category: "AI/ML"
url: https://railway.com/deploy/mcp-js
---

# Deploy MCP JS

mcp js gives a snapshottable javascript repl connected to your tools for ai

**[Deploy MCP JS on Railway](https://railway.com/template/mcp-js)**

- **Creator:** r33drichards's Projects
- **Category:** AI/ML

## Template content

### mcp-js-p1ze

- **Source:** r33drichards/mcp-js

## Documentation

# Deploy and Host MCP JS on Railway

mcp js is a sandboxed code execution runtime for javascript with heap and filesystem snapshotting. connect any javascript tools, or multiplex and compose mcp tool calls together in a node js and browser compatible runtime

## About Hosting MCP JS

Hosting MCP JS means running a single Rust binary that serves the MCP Streamable HTTP endpoint at `/mcp` and a REST sidecar at `/api/exec`. This template builds the server from source with Docker, attaches a volume at `/data` for heap snapshots, the persistent `/work` filesystem, and the session database, and health-checks `/api/version`. Railway injects `PORT` automatically; host-header protection is scoped to the service's Railway domains. The template deploys sandboxed by default: scripts run in a V8 isolate with no network, filesystem, or subprocess access, and a kernel-enforced (Landlock) OS sandbox confines the whole process beneath that. Optional JWT auth is one `JWKS_URL` variable away.


## Common Use Cases

- Give Claude, Cursor, or any MCP client a remote code-execution tool
- Token-efficient data transformation instead of long tool-call chains
- Durable agent state via heap snapshots that survive redeploys
- A REST endpoint for running untrusted JavaScript from your own backend

## Dependencies for MCP JS Hosting

- A volume for persistent heaps, filesystem snapshots, and sessions
- An MCP client (Claude Code, Claude Desktop, Cursor, ...) or any HTTP client
### Implementation Details 

[Include any code snippets or implementation details. This section is optional. Exclude if nothing to add.]

## Why Deploy MCP JS on Railway?


Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying MCP JS on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [stella](https://railway.com/deploy/stella) — Self-host stella with web, API, Postgres, Redis, and object storage.
- [Hermes Agent | OpenClaw Alternative with Dashboard](https://railway.com/deploy/hermes-agent-or-openclaw-alternative-wit) — Self-Hosted Hermes AI Agent for Telegram, Discord & Slack

Open this page in a browser: https://railway.com/deploy/mcp-js
