Get the FREE Ultimate OpenClaw Setup Guide →

BaseMcpServer

A minimal containerized base for MCP servers using the MCP Python SDK

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio dawsonlp-basemcpserver docker run -i dawsonlp-basemcpserver \
  --env PORT="7501"

How to use

BaseMcpServer is a minimal, containerized foundation for MCP servers built with the MCP Python SDK. It provides the common runtime and configuration needed for HTTP+SSE and stdio transports, allowing derived servers to focus on implementing their specific tools and resources. In practice, you run your server inside a Docker container using the base image, expose port 7501, and connect clients (like Claude/Cline) via the SSE endpoint at /sse or via stdio when using local tooling. For local development, you can use the included mcp-manager utility to install, configure, and run additional MCP servers that build on this base, ensuring consistent environments and transport configurations across projects.

To interact with the server, rely on the supported transports: HTTP+SSE for Claude/Cline integrations and stdio for direct stdin/stdout communication. When using SSE, clients connect to http://localhost:7501/sse; for stdio, the server typically runs in the background and communicates through the container's stdio streams. The mcp-manager tool can help install and manage derived servers from local directories or Git repositories, configure VS Code integration, and run servers as needed. Remember to align ports and transport types across your tooling and the server’s configuration to avoid connectivity issues.

How to install

Prerequisites:

  • Docker installed and running
  • Access to the base image named dawsonlp-basemcpserver (or a build pipeline to build it locally)

Installation steps:

  1. Pull or build the base image (if not available locally):
docker pull dawsonlp-basemcpserver
  1. Run the base MCP server container (exposes port 7501 by default):
docker run -p 7501:7501 -e PORT=7501 dawsonlp-basemcpserver
  1. Verify the server is up by checking logs or hitting the SSE endpoint (when available):
# If the container prints a ready message to logs, or you can curl the SSE endpoint
curl -s http://localhost:7501/sse > /dev/null
  1. If you need to customize, create a derived server image or mount configuration as needed, ensuring PORT remains 7501 inside the container unless you adjust the env accordingly:
docker run -p 7777:7501 -e PORT=7501 dawsonlp-basemcpserver
  1. For development workflows, you can leverage the MCP Manager (mcp-manager) to install and run derived servers that build on this base.

Additional notes

Notes and tips:

  • The base image exposes port 7501. Keep port mappings consistent across Docker runs and client configurations (e.g., Claude/Cline settings).
  • When connecting via Claude/Cline, use the /sse endpoint for HTTP+SSE servers. For stdio-based workflows, rely on the command or script generated by your server manager.
  • Environment variables: PORT should be set to the external-facing port mapped to 7501 in Docker. Use --env-file or explicit -e PORT when running containers.
  • If you encounter connection issues, check for port conflicts with lsof -i :PORT and verify that the host port maps to 7501 inside the container.
  • When using mcp-manager, VS Code integration can auto-start servers as needed; ensure you restart VS Code after installing or updating servers.
  • This base is intended as a foundation. For custom MCP servers, you typically implement your tools/resources in your own repository and deploy them atop this container.

Related MCP Servers

Sponsor this space

Reach thousands of developers