Skip to main content
Glama
chuckwilliams37

MCP Server with Docker, Redis, and TimescaleDB

๐Ÿš€ MCP Server with Docker, Redis, and TimescaleDB

This repository sets up a Model Context Protocol (MCP) Server using Docker, integrating Redis and TimescaleDB for efficient data management.

๐Ÿ› ๏ธ Features

  • FastAPI: Serves as the web framework for the MCP server.

  • Redis: Provides caching mechanisms.

  • TimescaleDB: A time-series database built on PostgreSQL.

  • Docker Compose: Orchestrates multi-container Docker applications.

  • Environment Variables: Configurable via .env file.

  • Systemd Service: Ensures the server auto-starts on reboot.

Related MCP server: FastAPI MCP Server

๐Ÿ“‹ Prerequisites

  • Docker and Docker Compose installed on your system.

  • Git for version control.

  • Zsh with Oh-My-Zsh (optional, for enhanced shell experience).

๐Ÿ“‚ Repository Structure

mcp-server-docker/
โ”œโ”€โ”€ app/
โ”‚   โ””โ”€โ”€ app.py
โ”œโ”€โ”€ .env.example
โ”œโ”€โ”€ docker-compose.yml
โ”œโ”€โ”€ Dockerfile
โ”œโ”€โ”€ requirements.txt
โ”œโ”€โ”€ scripts/
โ”‚   โ”œโ”€โ”€ bootstrap-mcp.sh
โ”‚   โ”œโ”€โ”€ full-bootstrap-mcp.sh
โ”‚   โ”œโ”€โ”€ init-repo.sh
โ”‚   โ”œโ”€โ”€ push-repo.sh
โ”‚   โ””โ”€โ”€ setup-mcpserver.sh
โ””โ”€โ”€ README.md

๐Ÿš€ Setup Instructions

  1. Clone the Repository:

    git clone https://github.com/chuckwilliams37/mcp-server-docker.git
    cd mcp-server-docker
  2. Configure Environment Variables:

    cp .env.example .env

    Modify .env as needed.

  3. Build and Start the Containers:

    docker compose build
    docker compose up -d
  4. Access the MCP Server:

    http://localhost:8080

๐Ÿ”„ Auto-Restart on Reboot

Create a systemd service to keep your app alive:

sudo nano /etc/systemd/system/mcp-docker.service

Paste:

[Unit]
Description=MCP Docker Compose App
Requires=docker.service
After=docker.service

[Service]
WorkingDirectory=/home/youruser/mcp-server-docker
ExecStart=/usr/bin/docker compose up -d
ExecStop=/usr/bin/docker compose down
Restart=always
TimeoutStartSec=0

[Install]
WantedBy=multi-user.target

Enable it:

sudo systemctl daemon-reload
sudo systemctl enable mcp-docker
sudo systemctl start mcp-docker

๐Ÿงช Scripts

The scripts/ directory contains utility scripts to automate infrastructure tasks.


๐Ÿ› ๏ธ scripts/full-bootstrap-mcp.sh

๐Ÿ’ก Use this on a fresh Ubuntu VM to fully prepare it for MCP deployment. It:

  • Installs system dependencies (Docker, Git, Zsh, UFW, Fail2Ban, etc.)

  • Sets up oh-my-zsh with the jonathan theme

  • Configures Remote Desktop with XFCE + XRDP

  • Clones the MCP repo

  • Builds and launches the app with docker compose

  • Adds a systemd service to relaunch containers on reboot

chmod +x scripts/full-bootstrap-mcp.sh
./scripts/full-bootstrap-mcp.sh

๐Ÿ“œ scripts/init-repo.sh

Initializes a new local Git repository and commits the current directory:

chmod +x scripts/init-repo.sh
./scripts/init-repo.sh

๐Ÿ“ค scripts/push-repo.sh

Pushes your local repo to a remote (update URL first):

chmod +x scripts/push-repo.sh
./scripts/push-repo.sh

๐Ÿง  scripts/setup-mcpserver.sh

Configures your local SSH environment to access a remote MCP server:

  • Pushes your public key

  • Adds an SSH alias

  • Prints a sample A-record

chmod +x scripts/setup-mcpserver.sh
./scripts/setup-mcpserver.sh

โš ๏ธ Edit placeholder values (e.g., IPs, usernames, repo URLs) before executing.


๐Ÿค Contributions

Feel free to fork this repository, submit issues, or create pull requests.

๐Ÿ“„ License

This project is licensed under the MIT License.

F
license - not found
Not graded
quality - not tested
D
maintenance

Maintenance

โ€“Maintainers
โ€“Response time
โ€“Release cycle
โ€“Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A minimal FastAPI-based MCP server that provides basic utility tools like ping and time functions. Designed for easy deployment with Docker support, authentication, and extensible architecture for future tool additions.
    MIT
  • F
    license
    Not graded
    quality
    Not graded
    maintenance
    A production-ready Model Context Protocol server built with FastAPI, featuring JWT authentication, PostgreSQL database support, Redis caching, and comprehensive health monitoring for building secure async API applications.
  • F
    license
    Not graded
    quality
    D
    maintenance
    A FastAPI-based MCP server that enables LLM agents to interact with Ollama models through standardized MCP tools, with optional MySQL and Redis integration for data persistence and caching.
  • A
    license
    Not graded
    quality
    D
    maintenance
    Federated MCP server that joins relational metadata (MySQL) with timeseries values (InfluxDB) behind a single, LLM-friendly entity layer.
    1
    MIT

View all related MCP servers

Related MCP Connectors

  • MCP server for InsForge BaaS โ€” database, storage, edge functions, and deployments

  • MCP server for managing Prisma Postgres.

  • Multi-tenant FastMCP server for Charles Schwab brokerage data, monetized via DPYC Tollbooth

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/chuckwilliams37/mcp-server-docker'

If you have feedback or need assistance with the MCP directory API, please join our Discord server