Project Configuration Overview
This guide explains how to set up your project for MCP server deployment. Configuration files should be stored in the root directory of your repository (or in a subdirectory, for monorepos) and define how to build and run your server.Key Concepts
Required Configuration Files
- Dockerfile: Defines the process for building your server’s container image.
- Configuration YAML (e.g.,
cogni.yaml): Specifies how to start and run your server, including the startup command and exposed port.
Automatic Setup
Deployment systems may attempt to auto-generate these files, but manual setup could be necessary if automation fails.File Details
Dockerfile Example Basic Python server container setup:Project Structure Considerations
If using a monorepo or a nested project structure, place the configuration files within the subdirectory containing your server. Be sure to indicate this subdirectory in your server settings during deployment configuration.Best Practices
- Local Testing: Verify the server builds and runs locally before deployment. Tools like MCP Inspector can assist.
- Validation: Use a schema to define and validate server configuration options.
- Efficiency: Optimize Docker images by using minimal base images and multi-stage builds.