Get the FREE Ultimate OpenClaw Setup Guide →

static

want a static file hosted somewhere? static.modelcontextprotocol.io is somewhere!

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio modelcontextprotocol-static npx -y modelcontextprotocol-static \
  --env STATIC_HOME="Directory with static assets to serve (defaults to current working directory)"

How to use

The static MCP server provides a lightweight way to host static files via the Model Context Protocol infrastructure. Given the project slug, it maps to a static hosting service powered by modelcontextprotocol-static. Once running, you can place files (HTML, CSS, JavaScript, images, etc.) in the configured assets directory and they will be served over HTTP with simple URL paths. This is convenient for quickly publishing small websites, docs, or demo assets without managing a full web server. Use the provided tooling to start the server, then upload or place your static assets in the designated directory and access them at the server’s domain, e.g. static.modelcontextprotocol.io or the configured endpoint.

How to install

Prerequisites:

  • Node.js (LTS) installed on your machine
  • npm (comes with Node.js)

Installation steps:

  1. Ensure Node.js and npm are installed node -v npm -v

  2. Run the server using npx (no global install required) npx -y modelcontextprotocol-static

  3. If you want to pin a specific version or customize, install the package globally or locally: npm install -g modelcontextprotocol-static

    or locally in a project

    npm install modelcontextprotocol-static

  4. Configure the assets directory (if supported by the package) by setting an environment variable or a config file as indicated by the package documentation. For example: export STATIC_HOME=/path/to/assets npx -y modelcontextprotocol-static

  5. Start the server and verify accessibility at the configured domain (e.g., static.modelcontextprotocol.io).

Additional notes

Notes:

  • The server serves static files from a designated directory. Ensure your assets adhere to web compatibility (e.g., correct MIME types, proper caching headers as supported).
  • If you encounter 404s for assets, verify the assets directory path and file permissions.
  • You may need to configure DNS or domain routing to point static.modelcontextprotocol.io to the server host.
  • The environment variable STATIC_HOME can be used to customize the assets directory if supported by the deployment.
  • For production deployments, consider serving error pages and enabling basic security headers via a reverse proxy if your hosting environment requires it.

Related MCP Servers

Sponsor this space

Reach thousands of developers