MCP cover image
See in Github
2025-04-14

0

Github Watches

0

Github Forks

0

Github Stars

WildBerries Data MCP Server

MCP (Model Context Protocol) server for WildBerries data that allows an AI to directly query the database using natural language. The server provides a secure interface for AI to query the database while ensuring query safety through the QueryGuard package.

Features

  • Provides an MCP-compliant API for AI-driven database queries
  • Connects to both ClickHouse and PostgreSQL databases
  • Ensures query security through QueryGuard validation
  • Returns results in JSON format for easy consumption by AI

Prerequisites

  • Go 1.18+
  • ClickHouse database
  • PostgreSQL database
  • Redis (for caching)

Environment Variables

Configure the application using the following environment variables:

# Server configuration
WB_DATA_MCP_IP=0.0.0.0
WB_DATA_MCP_PORT=8081

# Clickhouse configuration
CH_USERNAME=default
CLICKHOUSE_PASSWORD=your_password
CLICKHOUSE_DATABASE=your_database
CH_HOST=localhost
CH_PORT=9000

# PostgreSQL configuration
PSQL_USERNAME=postgres
PG_HOST=localhost
PG_PORT=5432

# Redis configuration
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=
REDIS_DB=0

# Telegram logging
TELEGRAM_CHAT_ID=your_chat_id
TELEGRAM_BOT_TOKEN=your_bot_token

Usage

  1. Clone the repository:
git clone https://github.com/marketconnect/wb_data_mcp.git
  1. Set environment variables (see above)

  2. Build the application:

go build -o wb_data_mcp
  1. Run the server:
./wb_data_mcp

Query Example

The server provides a query_data tool that AI can use to query the database. Here's an example request:

{
  "table_name": "stocks",
  "fields": ["product_id", "warehouse_id", "quantity", "basic_price"],
  "filters": [
    {"field": "product_id", "operator": "=", "value": "123456"}
  ],
  "limit": 10
}

Allowed Tables

The server supports querying the following tables:

  • stocks: Product stock information
  • orders: Order history
  • orders30d: 30-day order aggregation
  • subjects: Subject categories
  • Various other PostgreSQL tables defined in the system

Security

QueryGuard ensures that only safe, read-only queries can be executed, protecting your database from potentially harmful operations. The system enforces:

  • Only SELECT statements are allowed
  • Only pre-approved tables and columns can be queried
  • No modifications (INSERT, UPDATE, DELETE) are permitted
  • No dangerous SQL constructs (subqueries, CTEs, etc.)

License

This project is licensed under the MIT License

相关推荐

  • WangRongsheng
  • 🧑‍🚀 全世界最好的 llM 资料总结(数据处理、模型训练、模型部署、 O1 模型、 MCP 、小语言模型、视觉语言模型) | Resumen de los mejores recursos del mundo.

  • av
  • Ejecute sin esfuerzo LLM Backends, API, frontends y servicios con un solo comando.

  • langgenius
  • 1Panel-dev
  • 🔥 1Panel proporciona una interfaz web intuitiva y un servidor MCP para administrar sitios web, archivos, contenedores, bases de datos y LLM en un servidor de Linux.

  • alibaba
  • rulego
  • ⛓️Rulego es un marco de motor de regla de orquestación de componentes de alta generación de alto rendimiento, de alto rendimiento y de alto rendimiento para GO.

  • hkr04
  • SDK liviano C ++ MCP (Protocolo de contexto del modelo)

  • nbonamy
  • WITSY: Asistente de escritorio AI

  • evilsocket
  • El kit de desarrollo de agentes simples.

  • sigoden
  • Cree fácilmente herramientas y agentes de LLM utilizando funciones Plain Bash/JavaScript/Python.

    Reviews

    2.7 (7)
    Avatar
    user_reRMzYNP
    2025-04-24

    As a dedicated user of wb_data_mcp by MarketConnect, I can confidently say this product is a game-changer! Its seamless integration and user-friendly interface have truly enhanced my data management experience. The support and resources provided are top-notch, ensuring that even complex tasks are handled with ease. Highly recommend for any data enthusiast!

    Avatar
    user_dvJx6RS9
    2025-04-24

    As a dedicated user of wb_data_mcp, I must say it has exceeded my expectations in many ways. Marketconnect has done an excellent job creating a tool that's efficient and user-friendly. It seamlessly integrates with my workflow, providing real-time data and analytics that are crucial for my projects. Highly recommended for anyone looking for a reliable data management solution!

    Avatar
    user_VuB1fx2S
    2025-04-24

    I've been using wb_data_mcp by marketconnect, and it has significantly streamlined my workflow. The ease of access and comprehensive features make data management a breeze. The intuitive interface and fast processing are impressive. Highly recommend this to any professional looking for efficiency and reliability!

    Avatar
    user_7iM7himi
    2025-04-24

    As a dedicated user of the wb_data_mcp application by marketconnect, I am thoroughly impressed with its seamless functionality and user-friendly interface. This tool has significantly enhanced my productivity by providing precise and efficient data management solutions. Whether for personal use or professional tasks, wb_data_mcp has become an indispensable part of my daily workflow. Highly recommended!

    Avatar
    user_MrXKmJNq
    2025-04-24

    As a dedicated user of wb_data_mcp, I must say that this application has significantly streamlined my data management processes. Marketconnect has done an excellent job in creating a tool that's both intuitive and powerful. The seamless integration and ease of use make it a standout product. Highly recommend it to anyone looking to enhance their workflow.

    Avatar
    user_ZejZ0bDj
    2025-04-24

    As a dedicated user of wb_data_mcp by MarketConnect, I've found it invaluable for my data management needs. The seamless integration and user-friendly interface make my daily tasks much easier. Highly recommended for anyone looking to streamline their data processes!

    Avatar
    user_WepHYUCF
    2025-04-24

    wb_data_mcp by MarketConnect has truly transformed my data management tasks. Its intuitive interface and robust functionality provide seamless integration and efficient data handling. Highly recommended for anyone looking to streamline their workflow and enhance productivity.