Skip to main content
Glama

GreptimeDB MCP Server

Official
by GreptimeTeam

greptimedb-mcp-服务器

构建工作流程

GreptimeDB的模型上下文协议 (MCP) 服务器实现。

该服务器为AI助手提供了一种安全且结构化的方式来探索和分析数据库。它使AI助手能够通过受控的界面列出表格、读取数据并执行SQL查询,从而确保负责任的数据库访问。

项目状态

这是一个仍在开发中的实验项目,数据安全和隐私问题尚未得到专门解决,请谨慎使用。

功能

  • list_resources列出表
  • read_resource读取表数据
  • list_tools列出工具
  • call_tool执行 SQL
  • list_prompts列出提示
  • get_prompt通过名称获取提示

安装

pip install greptimedb-mcp-server

配置

设置以下环境变量:

GREPTIMEDB_HOST=localhost # Database host GREPTIMEDB_PORT=4002 # Optional: Database MySQL port (defaults to 4002 if not specified) GREPTIMEDB_USER=root GREPTIMEDB_PASSWORD= GREPTIMEDB_DATABASE=public

或者通过命令行参数:

  • --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

{ "mcpServers": { "greptimedb": { "command": "uv", "args": [ "--directory", "/path/to/greptimedb-mcp-server", "run", "-m", "greptimedb_mcp_server.server" ], "env": { "GREPTIMEDB_HOST": "localhost", "GREPTIMEDB_PORT": "4002", "GREPTIMEDB_USER": "root", "GREPTIMEDB_PASSWORD": "", "GREPTIMEDB_DATABASE": "public" } } } }

执照

MIT 许可证 - 有关详细信息,请参阅 LICENSE.md 文件。

贡献

先决条件

  • Python 与uv包管理器
  • GreptimeDB 安装
  • MCP 服务器依赖项

发展

# Clone the repository git clone https://github.com/GreptimeTeam/greptimedb-mcp-server.git cd greptimedb-mcp-server # Create virtual environment uv venv source venv/bin/activate # or `venv\Scripts\activate` on Windows # Install development dependencies uv sync # Run tests pytest

使用MCP Inspector进行调试:

npx @modelcontextprotocol/inspector uv \ --directory \ /path/to/greptimedb-mcp-server \ run \ -m \ greptimedb_mcp_server.server

致谢

本库的实现受到了以下两个仓库的启发并整合了它们的代码,对此我们表示感谢:

谢谢!

Install Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

模型上下文协议服务器实现,使 AI 助手能够安全地与 GreptimeDB 交互,允许他们通过受控界面探索数据库模式、读取数据和执行 SQL 查询。

  1. 项目状态
    1. 功能
      1. 安装
        1. 配置
          1. 用法
            1. Claude 桌面集成
          2. 执照
            1. 贡献
              1. 先决条件
              2. 发展
            2. 致谢

              Related MCP Servers

              • A
                security
                A
                license
                A
                quality
                A 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 -
                1
                108
                Python
                MIT License
                • Linux
                • Apple
              • -
                security
                A
                license
                -
                quality
                A Model Context Protocol (MCP) server that enables AI assistants to interact with MySQL databases by executing SQL queries and checking database connectivity.
                Last updated -
                TypeScript
                MIT License
                • Apple
                • Linux
              • -
                security
                A
                license
                -
                quality
                A Model Context Protocol server implementation that enables AI assistants to execute SQL queries and interact with SQLite databases through a structured interface.
                Last updated -
                6
                TypeScript
                MIT License
              • -
                security
                F
                license
                -
                quality
                A 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 -
                16
                TypeScript

              View all related MCP servers

              MCP directory API

              We provide all the information about MCP servers via our MCP API.

              curl -X GET 'https://glama.ai/api/mcp/v1/servers/GreptimeTeam/greptimedb-mcp-server'

              If you have feedback or need assistance with the MCP directory API, please join our Discord server