Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

alg-mcp

MCP.Pizza Chef: chenlinyang

alg-mcp is an MCP server implementing a RAG+MCP dual-engine architecture for intelligent querying. It integrates database data fusion and semantic indexing to convert natural language into precise structured queries, supporting complex data retrieval and analysis workflows. Designed for enterprise and team use, it facilitates technical research and product design by providing a complete technical chain closed-loop with advanced syntax parsing and query mapping.

Use This MCP server To

Convert natural language queries into structured database queries Perform semantic indexing and data fusion for large datasets Enable intelligent data retrieval from billion-scale data facts Support technical research and product design with query automation Integrate external APIs for enriched query responses Execute complex SQL operations like grouping, ranking, and sampling Provide a chat interface for interactive data querying Extendable for large-scale data retrieval and analysis optimization

README

Getting Started

Algorithmic Learning Graybeard - 星星点灯,基于RAG+MCP双引擎架构实现智能查询。

在大语言模型(LLM)的基石上,依托MCP Server对数据库的数据融合与语义索引能力,构建RAG与MCP协同的双引擎架构,通过智能语法解析与查询映射,实现自然语言到结构化查询的精准转换,形成完整的技术链路闭环。可用于辅助企业/团队进行技术研发、产品设计等支撑工作。

🌟该项目如对您有帮助,欢迎点赞🌟

系统组成及文档

中文文档 | English

👉代码地址:githubgitee

如果您有上千数据目录、亿级数据事实,要做数据检索或数据分析,可以在该项目上进行扩展优化。

架构参考:

总体架构

  • 生命周期

生命周期

  • 操作步骤

实现步骤

功能点

  • 天气查询

外部接口自由对接

本地路径

  • 数据库操作

一句话精准完成分组、排名、取样等SQL操作

本地路径

接入的模型

  • Zhipu-AI

  • 也可以根据个人喜好接入其他模型:
    支持DeepSeek、ChatGPT 3.5、通义千问、文心一言、Ollama等

技术栈

该仓库为后端服务

技术栈:

  • jdk 17
  • springboot 3.4.4
  • langchain4j 1.0.0-beta3
  • mcp-server 利用自定义注解,实现MCP协议。已完成的接口有:
    initialize、tools/call、tools/list、notifications/initialized、prompts/list、prompts/get等
  • mcp-client 使用RAG自定义QueryTransformer,读取MCP server prompt实现NPL2SQL功能

如何运行

mcp-server配置

a. 配置数据库连接

  • 数据库(MySQL)
spring:
  datasource:
    type: com.zaxxer.hikari.HikariDataSource
    url: jdbc:mysql://<ip>:<port>/<database_name>?characterEncoding=utf8&serverTimezone=GMT%2B8&useSSL=false
    driver-class-name: com.mysql.cj.jdbc.Driver
    username: <username>
    password: <password>

b. 配置第三方天气API

weather:
  api:
    host: <api-host>
    api-key: <api-key>

mcp-client配置

a. 配置mcp-server连接

  • SSE Endpoint
mcp:
  server:
    sse-url: http://localhost:3002/sse

b. 配置大模型

  • 大模型api-key和model配置
zhipu-ai:
  api-key: <api-key>
  model: <model>

alg-mcp FAQ

How does alg-mcp handle natural language queries?
alg-mcp uses a dual-engine RAG+MCP architecture to parse natural language into precise structured queries for databases.
Can alg-mcp integrate with external APIs?
Yes, alg-mcp supports free integration with external interfaces to enrich query results.
What scale of data can alg-mcp handle?
It is designed to handle thousands of data directories and billions of data facts for retrieval and analysis.
Is there a user interface for interacting with alg-mcp?
Yes, a chat demo interface is available for interactive querying at http://localhost:4000/.
What kind of SQL operations can alg-mcp perform?
It can perform grouping, ranking, sampling, and other complex SQL operations via natural language commands.
How does alg-mcp support enterprise technical workflows?
By enabling precise natural language to structured query conversion, it supports technical research and product design tasks.
What documentation is available for alg-mcp?
Comprehensive documentation is available in both Chinese and English on GitHub and Gitee repositories.
Which LLM providers are compatible with alg-mcp?
alg-mcp is compatible with multiple LLM providers including OpenAI, Claude, and Gemini.