MCP cover image
See in Github
2025-03-22

Servidor MCP con Docker, Redis y Timescaledb

1

Github Watches

1

Github Forks

1

Github Stars

🚀 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.

📋 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.

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • apappascs
  • Descubra la colección más completa y actualizada de servidores MCP en el mercado. Este repositorio sirve como un centro centralizado, que ofrece un extenso catálogo de servidores MCP de código abierto y propietarios, completos con características, enlaces de documentación y colaboradores.

  • ShrimpingIt
  • Manipulación basada en Micrypthon I2C del expansor GPIO de la serie MCP, derivada de AdaFruit_MCP230xx

  • modelcontextprotocol
  • Servidores de protocolo de contexto modelo

  • huahuayu
  • Una puerta de enlace de API unificada para integrar múltiples API de explorador de blockchain similar a Esterscan con soporte de protocolo de contexto modelo (MCP) para asistentes de IA.

  • Mintplex-Labs
  • La aplicación AI de escritorio todo en uno y Docker con trapo incorporado, agentes de IA, creador de agentes sin código, compatibilidad de MCP y más.

    Reviews

    3 (1)
    Avatar
    user_a0AfyZmS
    2025-04-16

    I've been using mcp-server-docker by chuckwilliams37 for a while now and it has significantly streamlined my server management. The setup is straightforward, and the documentation on GitHub is excellent. Highly recommended for anyone looking to efficiently deploy and manage Docker servers. Check it out!