# Dummy MCP Server (Contabo + Hetzner)
This project is a dummy MCP server built for interview/demo purposes.
It simulates the behavior of an MCP (Model Control Plane) server that connects to service providers like **Contabo** and **Hetzner**, but **without calling real APIs**.
### Why dummy Service providers?
Since, in order to utilize Contabo and Hetzner services, we have to go through payment and billing.
Therefore, to understand the basic working of MCP with service providers, we created fake instances!
## Purpose
The goal of this project is to demonstrate:
- Clean architecture
- Request routing logic
- Provider-based service modules
- Working client-server flow
- Frontend dialog response display
- Interview-ready demo
## Features
✔ Dummy MCP server with clean request routing
✔ Two service providers (Contabo & Hetzner)
✔ Dummy “create_server” & “delete_server” actions
✔ Frontend UI with dialog box to show response
✔ CORS enabled for browser requests
✔ Easy to extend (add real APIs later)
## Architectural Diagram
```
┌─────────────────────┐
│ MCP Client │
│ (Frontend / CLI) │
└─────────┬───────────┘
│ POST /mcp
│
┌──────────▼───────────┐
│ MCP Server │
│ (FastAPI) │
└──────────┬───────────┘
│
┌───────────────┴───────────────┐
│ │
┌───────▼────────┐ ┌────────▼───────┐
│ ContaboService │ │ HetznerService │
│ (Dummy Logic) │ │ (Dummy Logic) │
└────────────────┘ └────────────────┘
```
# Step-by-Step Setup (Commands Used)
### 1. Create project folder
```bash
mkdir mcp-server
cd mcp-server
```
### 2. Initialize Git
```bash
git init
```
### 3. Create Python Virtual Environment
```bash
python3 -m venv venv
source venv/bin/activate
```
### 4. Install dependencies
```bash
pip install fastapi uvicorn
```
### 5. Save dependencies
```bash
pip freeze > requirements.txt
```
### 6. Create folders & files
```bash
mkdir services
touch main.py
touch services/contabo.py
touch services/hetzner.py
touch index.html
touch README.md
```
---
# Running the Server
```bash
uvicorn main:app --reload --port 3000
```
You should see:
```
INFO: Uvicorn running on http://127.0.0.1:3000
```
---
# Testing via Curl (Contabo)
```bash
curl -X POST http://localhost:3000/mcp \
-H "Content-Type: application/json" \
-d '{
"provider": "contabo",
"action": "create_server",
"payload": {"name": "test-server", "ram": "4GB"}
}'
```
---
# Testing via Curl (Hetzner)
```bash
curl -X POST http://localhost:3000/mcp \
-H "Content-Type: application/json" \
-d '{
"provider": "hetzner",
"action": "create_server",
"payload": {"name": "hetzner-server", "ram": "8GB"}
}'
```
---
# Frontend Demo
Open `index.html` in your browser and:
1. Select Provider
2. Select Action
3. Enter Payload
4. Click **Send Request**
5. Response appears in a **dialog box**
---
# Logic Explanation
### 1. MCP Server (`main.py`)
* Receives POST request at `/mcp`
* Checks provider name
* Routes request to respective service module
### 2. Contabo Service (`services/contabo.py`)
* Simulates server creation & deletion
* Returns fake server ID
### 3. Hetzner Service (`services/hetzner.py`)
* Same dummy logic as Contabo
---
# GitHub Push Commands
```bash
git add .
git commit -m "Initial dummy MCP server implementation"
git branch -M main
git remote add origin https://github.com/<your-username>/mcp-server.git
git push -u origin main
```
---