Deployments
Smithery Deployments allow you to host your STDIO MCP server as a server-side event (SSE) server on Smithery.
Benefits of hosting:
- Smithery will show an MCP playground on your server page, allowing users to try your tool calls before installing.
- Clients can use your server without needing to install dependencies.
- Smithery will rank hosted servers higher in our search results.
Overview
Deploying on Smithery is straightforward:
- Add your server to Smithery (or claim it if it's already listed)
- Connect the server with your Github repository
- Commit a Dockerfile and
smithery.yaml
to your connected repository - Click Deploy on Smithery Deployments on your server page
That's it! Your MCP server will be built and deployed according to your configuration.
Required Files
There are two files required in your repository in order to deploy:
Dockerfile
Create a Dockerfile
in your repository root that defines how to build your MCP server. Your Dockerfile should be created such that running your Docker image will start your STDIO server.
Here's an example Dockerfile that builds a Node-based MCP server:
We only support Linux Docker images on major distros (Alpine/Debian-based) and expect sh
to run in your container. Other distros are untested and may not deploy.
You can find more examples of Dockerfiles in MCP's official reference implementations.
smithery.yaml
Create a smithery.yaml
file in your repository root. This file defines how your MCP server should be started.
Here's a minimal example of a server with no configuration options:
The startCommand
object consists of:
type: stdio
: Specifies that your repository is a standard I/O based MCP serverconfigSchema
: Defines the JSON Schema for your server's configuration options. Users will configure this your server using this schema. We will reject invalid configurations.commandFunction
: A JavaScript function that returns the command and arguments to start your server. This function is run within your server's sandbox during runtime to parse the config specified by clients. You can trust thatconfig
input argument conforms to yourconfigSchema
.
Subdirectories
If your package is not in the root directory of your repository (in the case of a monorepo), you should place your Dockerfile and smithery.yaml
in the subdirectory that contains your package. You will need to specify the base directory in your server settings on Smithery.
For example, if your MCP server is in the packages/mcp-server
directory, you would:
- Place your
Dockerfile
andsmithery.yaml
in thepackages/mcp-server
directory - Set the base directory to
packages/mcp-server
in your server settings under Github integration
Best Practices
- Testing: Test your MCP server locally before deploying using MCP Inspector.
- Configuration: Use the
configSchema
to properly define and validate your server's configuration options - Docker Optimization: Keep your Docker image size minimal by using appropriate base images and multi-stage builds