Cover image
Try Now
2025-04-14

3 years

Works with Finder

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

相关推荐

  • av
  • 毫不费力地使用一个命令运行LLM后端,API,前端和服务。

  • 1Panel-dev
  • 🔥1Panel提供了直观的Web接口和MCP服务器,用于在Linux服务器上管理网站,文件,容器,数据库和LLMS。

  • WangRongsheng
  • 🧑‍🚀 llm 资料总结(数据处理、模型训练、模型部署、 o1 模型、mcp 、小语言模型、视觉语言模型)|摘要世界上最好的LLM资源。

  • sigoden
  • 使用普通的bash/javascript/python函数轻松创建LLM工具和代理。

  • rulego
  • ⛓️Rulego是一种轻巧,高性能,嵌入式,下一代组件编排规则引擎框架。

  • hkr04
  • 轻巧的C ++ MCP(模型上下文协议)SDK

  • RockChinQ
  • 😎简单易用、🧩丰富生态 -大模型原生即时通信机器人平台| 适配QQ / 微信(企业微信、个人微信) /飞书 /钉钉 / discord / telegram / slack等平台| 支持chatgpt,deepseek,dify,claude,基于LLM的即时消息机器人平台,支持Discord,Telegram,微信,Lark,Dingtalk,QQ,Slack

  • dmayboroda
  • 带有可配置容器的本地对话抹布

  • paulwing
  • 使用MCP服务创建的测试存储库

    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.