greptimedb-mcp-服务器
GreptimeDB的模型上下文协议 (MCP) 服务器实现。
该服务器为AI助手提供了一种安全且结构化的方式来探索和分析数据库。它使AI助手能够通过受控的界面列出表格、读取数据并执行SQL查询,从而确保负责任的数据库访问。
项目状态
这是一个仍在开发中的实验项目,数据安全和隐私问题尚未得到专门解决,请谨慎使用。
功能
list_resources
列出表read_resource
读取表数据list_tools
列出工具call_tool
执行 SQLlist_prompts
列出提示get_prompt
通过名称获取提示
安装
配置
设置以下环境变量:
或者通过命令行参数:
--host
数据库主机,默认为localhost
,--port
数据库端口,必须是 MySQL 协议端口,默认为4002
,--user
数据库用户名,默认为空,--password
数据库密码,默认为空,--database
数据库名称,默认为public
。
用法
Claude 桌面集成
在Claude Desktop的配置文件中配置MCP服务器:
MacOS
位置: ~/Library/Application Support/Claude/claude_desktop_config.json
视窗
位置: %APPDATA%/Claude/claude_desktop_config.json
执照
MIT 许可证 - 有关详细信息,请参阅 LICENSE.md 文件。
贡献
先决条件
- Python 与
uv
包管理器 - GreptimeDB 安装
- MCP 服务器依赖项
发展
使用MCP Inspector进行调试:
致谢
本库的实现受到了以下两个仓库的启发并整合了它们的代码,对此我们表示感谢:
谢谢!
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Tools
模型上下文协议服务器实现,使 AI 助手能够安全地与 GreptimeDB 交互,允许他们通过受控界面探索数据库模式、读取数据和执行 SQL 查询。
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityA Model Context Protocol server that enables secure interaction with Microsoft SQL Server databases, allowing AI assistants to list tables, read data, and execute SQL queries through a controlled interface.Last updated -1108PythonMIT License
- -securityAlicense-qualityA Model Context Protocol (MCP) server that enables AI assistants to interact with MySQL databases by executing SQL queries and checking database connectivity.Last updated -TypeScriptMIT License
- -securityAlicense-qualityA Model Context Protocol server implementation that enables AI assistants to execute SQL queries and interact with SQLite databases through a structured interface.Last updated -6TypeScriptMIT License
- -securityFlicense-qualityA comprehensive Model Context Protocol server implementation that enables AI assistants to interact with file systems, databases, GitHub repositories, web resources, and system tools while maintaining security and control.Last updated -16TypeScript