Smart Hydroponic MCP Server

Smart Hydroponic MCP Server

MCP server for querying hydroponic sensor data stored in PostgreSQL/TimescaleDB. Provides tools to list tables, describe schemas, read recent sensor readings, fetch latest data, and perform time-series aggregations via natural language.

Category
Visit Server

README

Smart Hydroponic MCP Server

Proyek ini adalah sebuah Model Context Protocol (MCP) Server yang dikhususkan untuk berinteraksi dengan database sensor hidroponik (menggunakan PostgreSQL + TimescaleDB).

Apa itu MCP?
Model Context Protocol (MCP) adalah standar terbuka (open standard) yang memungkinkan asisten AI (seperti Claude) untuk terhubung secara aman dengan sumber data, tools, dan prompt eksternal. Melalui MCP, LLM dapat berinteraksi dengan sistem dan data lokal Anda menggunakan arsitektur client-server yang seragam.

Server ini mengekspos tools yang bisa digunakan oleh LLM (seperti Claude Desktop) untuk membaca data sensor terbaru dan melakukan agregasi secara dinamis.

Prasyarat

  • Python >= 3.14
  • uv Package Manager
  • PostgreSQL dengan ekstensi TimescaleDB (termasuk dukungan untuk fitur native UUIDv7 pada fungsi time_bucket).

Environment Variables

Salin file (atau buat) .env di root directory dan pastikan variabel-variabel berikut telah disetel:

HYDROPONIC_DB_HOST=127.0.0.1
HYDROPONIC_DB_PORT=5432
HYDROPONIC_DB_USER=your_db_user
HYDROPONIC_DB_PASSWORD=your_db_password
HYDROPONIC_DB_NAME=your_db_name
HYDROPONIC_DB_SCHEMA=public
HYDROPONIC_TABLE_NAME=hydroponic_data

Instalasi & Menjalankan Server

Proyek ini sepenuhnya mengelola dependencies melalui uv. Anda tidak perlu menggunakan pip install secara manual.

Untuk menjalankan server HTTP / FastMCP secara lokal, cukup gunakan:

uv run main.py

Perintah di atas akan secara otomatis memvalidasi environment (memastikan uv.lock sinkron), membuat .venv, dan menyalakan server uvicorn pada http://0.0.0.0:8000.

Integrasi dengan LLM Client (Contoh: Claude Desktop)

Untuk menyambungkan server ini ke aplikasi yang mendukung Model Context Protocol (seperti Claude Desktop), tambahkan konfigurasi berikut pada file pengaturan klien (contohnya claude_desktop_config.json):

Via UV Stdio (Disarankan untuk environment lokal yang aman):

{
  "mcpServers": {
    "smart-hydroponic": {
      "command": "uv",
      "args": [
        "run",
        "c:/path/to/your/project/smart-hydroponic-mcp/main.py"
      ],
      "env": {
        "HYDROPONIC_DB_USER": "your_db_user",
        "HYDROPONIC_DB_PASSWORD": "your_db_password",
        "HYDROPONIC_DB_NAME": "your_db_name",
        "HYDROPONIC_DB_HOST": "127.0.0.1",
        "HYDROPONIC_DB_PORT": "5432"
      }
    }
  }
}

Catatan: Pastikan Anda menyesuaikan path dan kredensial dengan environment mesin Anda.

Fitur (MCP Tools)

  • list_database_tables(): Menampilkan semua tabel yang ada dalam skema database.
  • describe_database_table(table_name): Mendeskripsikan tipe data dan struktur dari sebuah tabel.
  • read_hydroponic_table(limit): Membaca baris-baris data hidroponik terbaru (bisa diatur batas limitnya).
  • get_latest_sensor_data(): Mengambil 1 entri sensor paling terakhir secara spesifik (cocok untuk dashboard real-time).
  • get_sensor_data_summary(num_buckets, bucket_width): Agregasi time-series cerdas. LLM dapat menanyakan "Bagaimana rata-rata pH 7 hari terakhir?", dan tool ini akan memanfaatkan fitur time_bucket dari TimescaleDB untuk langsung memberikan jawabannya secara efisien.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured