Overview
What is BaseMcpServer?
BaseMcpServer is a minimal containerized base for Model Context Protocol (MCP) servers, utilizing the MCP Python SDK to provide a standardized Docker base image for building MCP servers.
How to use BaseMcpServer?
To use BaseMcpServer, build the base image using the provided build script and then use it in your derived projects by referencing it in your Dockerfile.
Key features of BaseMcpServer?
- Pre-installed Python 3.13 environment with all MCP SDK dependencies.
- Multi-stage Docker build for optimized image size.
- Non-root user for improved security.
- Supports HTTP+SSE protocol via Starlette and Uvicorn.
- Configurable through environment variables using pydantic-settings.
Use cases of BaseMcpServer?
- Building custom MCP servers for web-based applications.
- Integrating with existing web services using HTTP+SSE.
- Deploying containerized applications in cloud environments.
FAQ from BaseMcpServer?
- What protocols does BaseMcpServer support?
BaseMcpServer only supports the HTTP+SSE protocol for communication.
- Is BaseMcpServer secure for production use?
Yes, it runs as a non-root user and supports HTTPS for secure communication.
- Can I customize the base image?
Yes, you can extend the base image in your Dockerfile and add your application code.