Skip to main content
Glama

UptimeRobot MCP API

by thichcode

UptimeRobot MCP API

API quản lý UptimeRobot với khả năng xử lý ngôn ngữ tự nhiên thông qua Model Context Protocol (MCP).

Tính năng

  • Quản lý monitors (tạo, cập nhật, xóa, xem)
  • Quản lý maintenance windows
  • Tạo báo cáo (uptime, maintenance, performance)
  • Xử lý ngôn ngữ tự nhiên thông qua MCP
  • Hệ thống phân quyền người dùng
  • Cache management
  • Context management cho MCP
  • Tích hợp với n8n

Yêu cầu

  • Python 3.8+
  • FastAPI
  • UptimeRobot API Key
  • Ollama (cho MCP)
  • n8n (cho workflow automation)

Cài đặt

  1. Clone repository:
git clone https://github.com/thichcode/uptimerobot_mcp.git cd uptimerobot_mcp
  1. Tạo môi trường ảo và cài đặt dependencies:
python -m venv venv source venv/bin/activate # Linux/Mac venv\Scripts\activate # Windows pip install -r requirements.txt
  1. Cấu hình biến môi trường:
cp .env.example .env # Chỉnh sửa .env với các thông tin cần thiết

Sử dụng

  1. Khởi động server:
uvicorn app.main:app --reload
  1. Truy cập API documentation:
http://localhost:8000/docs

Tích hợp với n8n

Cài đặt n8n

  1. Cài đặt n8n:
npm install n8n -g
  1. Khởi động n8n:
n8n start

Tạo Workflow

  1. Truy cập n8n interface tại http://localhost:5678
  2. Tạo workflow mới và thêm các nodes:
    • HTTP Request node để gọi API
    • Function node để xử lý dữ liệu
    • Schedule Trigger node để tự động hóa
    • Email node để gửi thông báo

Ví dụ Workflow

  1. Tự động tạo maintenance window:
{ "nodes": [ { "type": "n8n-nodes-base.scheduleTrigger", "parameters": { "interval": [ { "field": "days", "value": 1 } ] } }, { "type": "n8n-nodes-base.httpRequest", "parameters": { "url": "http://localhost:8000/maintenance", "method": "POST", "body": { "start_time": "{{$now}}", "duration": 3600, "description": "Bảo trì định kỳ", "monitors": [123, 456] } } } ] }
  1. Tự động tạo báo cáo hàng tuần:
{ "nodes": [ { "type": "n8n-nodes-base.scheduleTrigger", "parameters": { "interval": [ { "field": "weeks", "value": 1 } ] } }, { "type": "n8n-nodes-base.httpRequest", "parameters": { "url": "http://localhost:8000/reports", "method": "POST", "body": { "type": "uptime", "start_date": "{{$now.minus(7, 'days')}}", "end_date": "{{$now}}" } } }, { "type": "n8n-nodes-base.emailSend", "parameters": { "to": "admin@example.com", "subject": "Báo cáo uptime hàng tuần", "text": "{{$json}}" } } ] }
  1. Tự động xử lý sự cố:
{ "nodes": [ { "type": "n8n-nodes-base.webhook", "parameters": { "path": "monitor-alert", "responseMode": "lastNode" } }, { "type": "n8n-nodes-base.httpRequest", "parameters": { "url": "http://localhost:8000/mcp/chat", "method": "POST", "body": { "message": "Phân tích sự cố và đề xuất giải pháp", "session_id": "{{$json.session_id}}" } } }, { "type": "n8n-nodes-base.slack", "parameters": { "channel": "#alerts", "text": "{{$json.ai_response.message}}" } } ] }

Các tính năng n8n có thể tích hợp

  1. Tự động hóa:
    • Tạo maintenance window định kỳ
    • Tạo báo cáo tự động
    • Xử lý sự cố tự động
  2. Thông báo:
    • Gửi email báo cáo
    • Gửi thông báo Slack/Discord
    • Gửi SMS cho sự cố nghiêm trọng
  3. Tích hợp với các dịch vụ khác:
    • Jira để tạo ticket
    • Google Calendar để đồng bộ lịch
    • Grafana để hiển thị metrics

API Endpoints

Authentication

  • POST /auth/register - Đăng ký người dùng mới
  • POST /auth/token - Đăng nhập và lấy token

Monitors

  • GET /monitors - Lấy danh sách monitors
  • POST /monitors - Tạo monitor mới
  • PUT /monitors/{monitor_id} - Cập nhật monitor
  • DELETE /monitors/{monitor_id} - Xóa monitor
  • GET /monitors/{monitor_id}/uptime - Lấy thông tin uptime

Maintenance Windows

  • POST /maintenance - Tạo maintenance window
  • GET /maintenance - Lấy danh sách maintenance windows
  • DELETE /maintenance/{window_id} - Xóa maintenance window

Reports

  • POST /reports - Tạo báo cáo mới
  • GET /reports/{report_id} - Lấy thông tin báo cáo

Cache Management

  • GET /cache/stats - Lấy thống kê cache
  • DELETE /cache/{cache_name} - Xóa cache

MCP

  • POST /mcp/chat - Xử lý yêu cầu ngôn ngữ tự nhiên
  • DELETE /mcp/context/{session_id} - Xóa context

Ví dụ sử dụng

Tạo monitor mới

curl -X POST "http://localhost:8000/monitors" \ -H "Authorization: Bearer {token}" \ -H "Content-Type: application/json" \ -d '{ "friendly_name": "Example Website", "url": "https://example.com", "type": "1", "interval": 300 }'

Tạo maintenance window

curl -X POST "http://localhost:8000/maintenance" \ -H "Authorization: Bearer {token}" \ -H "Content-Type: application/json" \ -d '{ "start_time": "2024-03-20T10:00:00Z", "duration": 3600, "description": "Bảo trì hệ thống", "monitors": [123, 456] }'

Sử dụng MCP

curl -X POST "http://localhost:8000/mcp/chat" \ -H "Authorization: Bearer {token}" \ -H "Content-Type: application/json" \ -d '{ "message": "Tạo maintenance window cho tất cả các monitors có tag production vào ngày mai từ 10h đến 11h", "session_id": "abc123" }'

Phân quyền

  • ADMIN: Toàn quyền truy cập
  • MANAGER: Quản lý monitors và maintenance windows
  • VIEWER: Chỉ xem thông tin

Đóng góp

Xem CONTRIBUTING.md để biết thêm chi tiết về cách đóng góp.

License

MIT

-
security - not tested
F
license - not found
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

A management server for UptimeRobot that enables natural language processing through Model Context Protocol, allowing users to manage monitors, maintenance windows, and reports using conversational commands.

  1. Tính năng
    1. Yêu cầu
      1. Cài đặt
        1. Sử dụng
          1. Tích hợp với n8n
            1. Cài đặt n8n
            2. Tạo Workflow
            3. Ví dụ Workflow
            4. Các tính năng n8n có thể tích hợp
          2. API Endpoints
            1. Authentication
            2. Monitors
            3. Maintenance Windows
            4. Reports
            5. Cache Management
            6. MCP
          3. Ví dụ sử dụng
            1. Tạo monitor mới
            2. Tạo maintenance window
            3. Sử dụng MCP
          4. Phân quyền
            1. Đóng góp
              1. License

                Related MCP Servers

                • -
                  security
                  F
                  license
                  -
                  quality
                  A Model Context Protocol server that provides persistent task management capabilities for AI assistants, allowing them to create, update, and track tasks beyond their usual context limitations.
                  Last updated -
                  3
                  TypeScript
                • A
                  security
                  A
                  license
                  A
                  quality
                  A server built on the Model Context Protocol that enables controlling the Unitree Go2 robot using natural language commands, which are translated into ROS2 instructions for the robot to perform corresponding actions.
                  Last updated -
                  12
                  33
                  Python
                  Apache 2.0
                  • Linux
                • A
                  security
                  F
                  license
                  A
                  quality
                  A Model Context Protocol server that enables natural language interactive control of Universal Robots collaborative robots, allowing users to control robot motion, monitor status, and execute programs through direct commands to large language models.
                  Last updated -
                  29
                  3
                  Python
                  • Linux
                  • Apple
                • A
                  security
                  A
                  license
                  A
                  quality
                  A Model Context Protocol server that allows users to create and manage meeting bots capable of joining video calls, speaking, sending chat messages, and retrieving meeting transcripts.
                  Last updated -
                  12
                  11
                  TypeScript
                  MIT License
                  • Apple

                View all related MCP servers

                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/thichcode/uptimerobot_mcp'

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