Concepts
Configuration Files
There is one primary configuration file that tells Smithery how to build and run your server:- smithery.yaml: Specifies the runtime and environment for your server
Automatic Setup
Smithery will attempt to automatically generate a pull-request with this file when you trigger a deployment. However, in some cases, the setup can fail and you may need to set this up manually.Required Files
smithery.yaml
The smithery.yaml file tells us how to deploy your server. It should be placed in the root of your project or in the subdirectory containing your MCP server.Project Structure
Subdirectories
If your package is not in the root directory of your repository (in the case of a monorepo), you should place yoursmithery.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:
- Place your
smithery.yamlin thepackages/mcp-serverdirectory - Set the base directory to
packages/mcp-serverin your server settings under Github integration
Best Practices
- Testing: Test your MCP server locally before deploying using the Smithery CLI (
npm run dev). - Configuration: Use the
configSchemaexport in your code to properly define and validate your server’s session configuration options.