Greptimedb MCP Server
개요
제작자가 쓴 설명(영어 원문)
Query GreptimeDB metrics, logs and traces with SQL, TQL and RANGE. Manage pipelines and dashboards.
PopNx MCP의 세 기둥
이 세 가지는 절대 하나의 점수로 합치지 않아요. 의견, 측정, 인기는 서로 다른 것이니까요.
- 사용자 의견i아직 리뷰가 없어요리뷰는 다음 단계에서 계정 기능과 함께 열려요
- 우리의 기본 점검i1개 중 1개 통과공개된 정보로 점검했으며, 코드는 아직 스캔하지 않았어요
- 사용 정도i아주 새로움↓ 77/주 · ★ –
할 수 있는 일
이 서버는 아직 쉬운 말로 된 요약을 쓰지 못했어요. 아래는 레지스트리에서 읽어 온 사실이에요.
- 연결 방식: 내 컴퓨터에서 실행
- 전송 방식: stdio
- 카테고리: 데이터베이스 및 데이터셋
- 입력해야 할 값: GREPTIMEDB_PASSWORD
설치
쓰고 있는 AI 앱을 고른 다음 설정을 복사하세요.
설치하기 전에
- 기본 점검: 1개 중 1개 통과
- 내 컴퓨터에서 내 사용자 계정의 권한(파일, 네트워크, 앱)으로 실행돼요.
- 직접 입력할 값:
GREPTIMEDB_HOST,GREPTIMEDB_PORT,GREPTIMEDB_USER,GREPTIMEDB_PASSWORD,GREPTIMEDB_DATABASE,GREPTIMEDB_TIMEZONE,GREPTIMEDB_POOL_SIZE,GREPTIMEDB_HTTP_PORT,GREPTIMEDB_HTTP_PROTOCOL,GREPTIMEDB_MASK_ENABLED,GREPTIMEDB_MASK_PATTERNS,GREPTIMEDB_AUDIT_ENABLED,GREPTIMEDB_ALLOW_WRITE
비밀로 표시된 값은 내 계정의 열쇠예요. 절대 다른 사람과 공유하거나 채팅에 붙여 넣지 마세요.
필요한 것
- PyPIPython의 uv 설치(uvx 명령어용)
어떤 앱을 쓰세요?
위에서 앱을 고르세요. 기억해 두었다가 다음부터는 버튼에 “…에 설치”라고 표시해요.
Claude Desktop → Settings → Developer → Edit Config를 열고 claude_desktop_config.json에 이 내용을 붙여 넣으세요
{
"mcpServers": {
"greptimedb": {
"command": "uvx",
"args": [
"greptimedb-mcp-server"
],
"env": {
"GREPTIMEDB_HOST": "your-value",
"GREPTIMEDB_PORT": "your-value",
"GREPTIMEDB_USER": "your-value",
"GREPTIMEDB_PASSWORD": "your-value",
"GREPTIMEDB_DATABASE": "your-value",
"GREPTIMEDB_TIMEZONE": "your-value",
"GREPTIMEDB_POOL_SIZE": "your-value",
"GREPTIMEDB_HTTP_PORT": "your-value",
"GREPTIMEDB_HTTP_PROTOCOL": "your-value",
"GREPTIMEDB_MASK_ENABLED": "your-value",
"GREPTIMEDB_MASK_PATTERNS": "your-value",
"GREPTIMEDB_AUDIT_ENABLED": "your-value",
"GREPTIMEDB_ALLOW_WRITE": "your-value"
}
}
}
}터미널에서 이 명령어를 실행하세요
claude mcp add greptimedb --env GREPTIMEDB_HOST=your-value --env GREPTIMEDB_PORT=your-value --env GREPTIMEDB_USER=your-value --env GREPTIMEDB_PASSWORD=your-value --env GREPTIMEDB_DATABASE=your-value --env GREPTIMEDB_TIMEZONE=your-value --env GREPTIMEDB_POOL_SIZE=your-value --env GREPTIMEDB_HTTP_PORT=your-value --env GREPTIMEDB_HTTP_PROTOCOL=your-value --env GREPTIMEDB_MASK_ENABLED=your-value --env GREPTIMEDB_MASK_PATTERNS=your-value --env GREPTIMEDB_AUDIT_ENABLED=your-value --env GREPTIMEDB_ALLOW_WRITE=your-value -- uvx greptimedb-mcp-server실행하기 전에 빈 값을 채워 주세요.
또는 설정을 직접 복사하기
프로젝트의 .cursor/mcp.json 또는 ~/.cursor/mcp.json에 붙여 넣으세요
{
"mcpServers": {
"greptimedb": {
"command": "uvx",
"args": [
"greptimedb-mcp-server"
],
"env": {
"GREPTIMEDB_HOST": "your-value",
"GREPTIMEDB_PORT": "your-value",
"GREPTIMEDB_USER": "your-value",
"GREPTIMEDB_PASSWORD": "your-value",
"GREPTIMEDB_DATABASE": "your-value",
"GREPTIMEDB_TIMEZONE": "your-value",
"GREPTIMEDB_POOL_SIZE": "your-value",
"GREPTIMEDB_HTTP_PORT": "your-value",
"GREPTIMEDB_HTTP_PROTOCOL": "your-value",
"GREPTIMEDB_MASK_ENABLED": "your-value",
"GREPTIMEDB_MASK_PATTERNS": "your-value",
"GREPTIMEDB_AUDIT_ENABLED": "your-value",
"GREPTIMEDB_ALLOW_WRITE": "your-value"
}
}
}
}브라우저가 앱을 열지 물어본 다음, 앱이 설정을 보여 주고 확인을 요청해요. 키 값은 비워 두니 직접 입력하세요.
또는 설정을 직접 복사하기
프로젝트의 .vscode/mcp.json에 붙여 넣으세요
{
"servers": {
"greptimedb": {
"type": "stdio",
"command": "uvx",
"args": [
"greptimedb-mcp-server"
],
"env": {
"GREPTIMEDB_HOST": "your-value",
"GREPTIMEDB_PORT": "your-value",
"GREPTIMEDB_USER": "your-value",
"GREPTIMEDB_PASSWORD": "your-value",
"GREPTIMEDB_DATABASE": "your-value",
"GREPTIMEDB_TIMEZONE": "your-value",
"GREPTIMEDB_POOL_SIZE": "your-value",
"GREPTIMEDB_HTTP_PORT": "your-value",
"GREPTIMEDB_HTTP_PROTOCOL": "your-value",
"GREPTIMEDB_MASK_ENABLED": "your-value",
"GREPTIMEDB_MASK_PATTERNS": "your-value",
"GREPTIMEDB_AUDIT_ENABLED": "your-value",
"GREPTIMEDB_ALLOW_WRITE": "your-value"
}
}
}
}브라우저가 앱을 열지 물어본 다음, 앱이 설정을 보여 주고 확인을 요청해요. 키 값은 비워 두니 직접 입력하세요.
이 서버는 내 컴퓨터에서 실행되는데, ChatGPT는 인터넷에 있는 서버에만 연결할 수 있어요. 다른 앱을 고르세요.
선택한 앱은 이 기기의 쿠키에만 저장돼요. 계정은 필요 없어요.
직접 입력할 값
GREPTIMEDB_HOSTenvGreptimeDB host addressGREPTIMEDB_PORTenvGreptimeDB MySQL protocol port (default: 4002)GREPTIMEDB_USERenvDatabase username- Database password
GREPTIMEDB_DATABASEenvDatabase name to connect toGREPTIMEDB_TIMEZONEenvSession timezone (default: UTC)GREPTIMEDB_POOL_SIZEenvConnection pool size (default: 5)GREPTIMEDB_HTTP_PORTenvHTTP API port for pipeline/dashboard management (default: 4000)GREPTIMEDB_HTTP_PROTOCOLenvHTTP protocol for pipeline/dashboard API: http or https (default: http)GREPTIMEDB_MASK_ENABLEDenvEnable sensitive data masking (default: true)GREPTIMEDB_MASK_PATTERNSenvAdditional column name patterns for data masking (comma-separated)GREPTIMEDB_AUDIT_ENABLEDenvEnable audit logging for tool invocations (default: true)GREPTIMEDB_ALLOW_WRITEenvAllow write/destructive SQL (DDL/DML) via execute_sql by skipping the security gate. DANGEROUS: only use on local or test instances (default: false)
이 설정은 제작자의 레지스트리 정보로 만들었어요. README와 다르면 README를 따르세요.
할 수 있는 일
내 컴퓨터에서 실행돼요. 설치하면 AI 앱에 도구 목록이 나타나요.
기본 점검i
누구나 볼 수 있는 정보를 점검했고, 코드는 읽지 않았어요. 해당하지 않는 항목은 개수에서 뺐어요. · 2026년 11월 9일 점검
- ✓ 통과
제작자와 저장소 일치
레지스트리 이름이 GitHub 계정 GreptimeTeam 기준으로 확인되었고, 이 계정이 저장소를 소유하고 있어요
- … 아직 점검 안 함
계속 관리되고 있음
아직 GitHub에서 이 저장소를 읽어 오지 않았어요
- … 아직 점검 안 함
라이선스 있음
아직 GitHub에서 이 저장소를 읽어 오지 않았어요
- – 해당 없음
엔드포인트 응답
내 컴퓨터에서 실행되는 서버라 인터넷 엔드포인트가 없어요
- – 해당 없음
OAuth로 로그인
내 컴퓨터에서 실행되며, 대신 로컬 설정을 사용해요
- … 아직 점검 안 함
도구 설명에 숨겨진 지시 없음
내 컴퓨터에서 실행돼요. 도구 목록은 인터넷 엔드포인트가 있는 서버에서만 읽을 수 있어요
데이터베이스 및 데이터셋 카테고리의 다른 서버와 비교i
- 이 카테고리의 다른 서버 1151개 중 0%보다 스타가 많아요
- 이 카테고리의 다른 서버 1151개 중 36%보다 최근에 레지스트리에 공개됐어요
- 기본 점검 결과가 이 카테고리의 다른 서버 1151개 중 100%와 같거나 더 좋아요
레지스트리에서 이 카테고리의 활성 서버 전체와 비교했어요. 스타는 게시자가 저장소를 소유한 경우에만 세요.
자주 묻는 질문
Greptimedb MCP Server, 안전한가요?
해당하는 기본 점검 1개 중 1개를 통과했어요. 코드는 읽지 않았어요. 키나 토큰을 넣기 전에 서버가 어떤 권한을 요구하는지 확인하고, 꼭 필요한 권한만 있는 키를 쓰세요.
어떤 키나 코드가 필요한가요?
입력해야 할 값: GREPTIMEDB_PASSWORD
내 컴퓨터에서 실행되나요, 클라우드에서 실행되나요?
내 컴퓨터에서 실행돼요. AI 앱이 필요할 때 실행하고, 데이터는 제작자의 서버를 거치지 않아요(서버 자체가 온라인 서비스를 호출하는 경우는 제외).
아직 관리되고 있나요?
GitHub 저장소는 마지막으로 – 변경됐고, 최신 버전(0.6.0)은 2개월 전 레지스트리에 올라왔어요.
어떤 앱에서 쓸 수 있나요?
Claude Desktop, Claude Code, Cursor, VS Code처럼 MCP를 지원하는 앱에서 쓸 수 있어요. 내 컴퓨터에 Python (uv)도 있어야 해요.
대신 쓸 수 있는 건 뭐가 있나요?
같은 카테고리에는: Supabase, MongoDB MCP Server, Elasticsearch MCP Server
대안
같은 카테고리에서 다른 제작자가 만든 서버예요. 스타 순으로 정렬했어요.
카드 보는 법:↓ 주간 다운로드i★ GitHub 스타i세 기둥: 리뷰 · 점검 · 사용 정도i업데이트 = 최신 버전을 레지스트리에 공개한 날i
제작자의 README
README 열기
제작자의 저장소에서 쓰인 그대로 가져왔어요. PopNx MCP가 검토하거나 보증한 내용이 아니에요. HTML, 이미지, 스크립트는 제거했어요. 링크를 누르면 이 사이트를 벗어나요.
greptimedb-mcp-server
A Model Context Protocol (MCP) server for GreptimeDB — an open-source observability database that handles metrics, logs, and traces in one engine.
Enables AI assistants to query and analyze GreptimeDB using SQL, TQL (PromQL-compatible), and RANGE queries, with built-in security features like read-only enforcement and data masking.
Quick Start
# Install
pip install greptimedb-mcp-server
Run (connects to localhost:4002 by default)
greptimedb-mcp-server --host localhost --database public
For Claude Desktop, add this to your config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": { "greptimedb": { "command": "greptimedb-mcp-server", "args": ["--host", "localhost", "--database", "public"] } } }
Features
Tools
| Tool | Description |
|---|---|
execute_sql | Execute SQL queries with format (csv/json/markdown) and limit options |
execute_tql | Execute TQL (PromQL-compatible) queries for time-series analysis |
query_range | Execute time-window aggregation queries with RANGE/ALIGN syntax |
search_table_semantics | Find tables by observability concept, ranked by matched terms; searches table names, semantic options, and entity declarations. schema selects the database to search |
query_semantic_graph | Query the semantic graph: summary (what it contains), entities (nodes), relationships (edges) over a required time window |
describe_table | Inspect a table profile: schema, semantic metadata, latest sample rows, and query guidance |
explain_query | Analyze SQL or TQL query execution plans (analyze=true for runtime stats; add verbose=true alongside analyze=true for per-partition scan metrics and index-pruning counters) |
health_check | Check database connection status and server version |
search_table_semantics and the semantic metadata in describe_table read information_schema.table_semantics. A table appears there when it carries a greptime.semantic.* option or a built-in convention derives an entity declaration for it; other tables are absent. The server reads the view's column list once per process and selects only the columns it exposes. entity_declarations requires GreptimeDB 1.3; on earlier versions it is reported as a missing column rather than as an empty declaration set.
Tool results are bounded by GREPTIMEDB_MAX_RESULT_BYTES (default 1048576, or 1 MiB). A query result over the budget returns fewer rows and reports it in truncated and truncation_reason; a result with no rows to shed is cut with a notice at the end. The budget is a backstop against a result too large to be consumed, so lower it if your MCP client rejects results before it is reached.
Cross-database queries
The server connects to one database, but reads are not restricted to it:
| Tool | How to reach another database |
|---|---|
execute_sql, query_range, describe_table | Qualify the table as schema.table |
execute_tql | metric{__schema__="other_db"}, which accepts = only |
search_table_semantics | Pass schema |
query_semantic_graph | Catalog-wide already; no scoping needed |
The connected account needs read permission on the target database. Use SHOW DATABASES to list them.
query_semantic_graph reads greptime_private.semantic_entities and greptime_private.semantic_relationships, which require GreptimeDB 1.3. At startup the server checks that both views exist, carry the columns it reads, and are readable by the connected account; when they are not, the tool is not offered and the reason is logged. Its time window is required and half-open, [start_time, end_time) over observed_at, and rows are aggregated across the 60-second observation buckets in that window.
Pipeline Management
| Tool | Description |
|---|---|
list_pipelines | List all pipelines or get details of a specific pipeline |
create_pipeline | Create a new pipeline with YAML configuration |
dryrun_pipeline | Test a pipeline with sample data without writing to database |
delete_pipeline | Delete a specific version of a pipeline |
Dashboard Management
| Tool | Description |
|---|---|
list_dashboards | List all Perses dashboard definitions |
create_dashboard | Create or update a Perses dashboard definition |
delete_dashboard | Delete a dashboard definition |
Resources & Prompts
- Resources: Browse tables via
greptime:// /dataURIs - Prompts: Built-in Jinja templates for common tasks —
pipeline_creator,log_pipeline,metrics_analysis,promql_analysis,trace_analysis,table_operation,schema_design_advisor,observability_correlation,ingestion_troubleshooting,query_performance_tuning
For LLM integration and prompt usage, see docs/llm-instructions.md.
These tools cover querying and managing data in an existing GreptimeDB. For deployment, server configuration, write protocols, pipeline syntax, schema design, and performance diagnosis, point the assistant at the GreptimeDB skills index at https://docs.greptime.com/SKILL.md.
Configuration
Environment Variables
GREPTIMEDB_HOST=localhost # Database host
GREPTIMEDB_PORT=4002 # MySQL protocol port (default: 4002) GREPTIMEDB_USER=root # Database user GREPTIMEDB_PASSWORD= # Database password GREPTIMEDB_DATABASE=public # Database name GREPTIMEDB_TIMEZONE=UTC # Session timezone
Optional
GREPTIMEDB_HTTP_PORT=4000 # HTTP API port for pipeline/dashboard management GREPTIMEDB_HTTP_PROTOCOL=http # HTTP protocol (http/https) GREPTIMEDB_POOL_SIZE=5 # Connection pool size GREPTIMEDB_MASK_ENABLED=true # Enable sensitive data masking GREPTIMEDB_MASK_PATTERNS= # Additional patterns (comma-separated) GREPTIMEDB_AUDIT_ENABLED=true # Enable audit logging GREPTIMEDB_ALLOW_WRITE=false # Allow writes: DDL/DML plus pipeline and dashboard changes (DANGEROUS, local/test only) GREPTIMEDB_MAX_RESULT_BYTES=1048576 # Byte budget for a single tool result (1 MiB)
Transport (for HTTP server mode)
GREPTIMEDB_TRANSPORT=stdio # stdio, sse, or streamable-http GREPTIMEDB_LISTEN_HOST=0.0.0.0 # HTTP server bind host GREPTIMEDB_LISTEN_PORT=8080 # HTTP server bind port GREPTIMEDB_ALLOWED_HOSTS= # DNS rebinding protection (comma-separated) GREPTIMEDB_ALLOWED_ORIGINS= # CORS allowed origins (comma-separated)
CLI Arguments
greptimedb-mcp-server \
--host localhost \ --port 4002 \ --database public \ --user root \ --password "" \ --timezone UTC \ --pool-size 5 \ --mask-enabled true \ --allow-write false \ --transport stdio
HTTP Server Mode
For containerized or Kubernetes deployments:
# Streamable HTTP (recommended for production)
greptimedb-mcp-server --transport streamable-http --listen-port 8080
SSE mode (legacy)
greptimedb-mcp-server --transport sse --listen-port 3000
DNS Rebinding Protection
By default, DNS rebinding protection is disabled for compatibility with proxies, gateways, and Kubernetes services. To enable it, use --allowed-hosts:
# Enable DNS rebinding protection with allowed hosts
greptimedb-mcp-server --transport streamable-http \ --allowed-hosts "localhost:*,127.0.0.1:*,my-service.namespace:*"
With custom allowed origins for CORS
greptimedb-mcp-server --transport streamable-http \ --allowed-hosts "my-service.namespace:*" \ --allowed-origins "http://localhost:*,https://my-app.example.com"
Or via environment variables
GREPTIMEDB_ALLOWED_HOSTS="localhost:*,my-service.namespace:*" \ GREPTIMEDB_ALLOWED_ORIGINS="http://localhost:*" \ greptimedb-mcp-server --transport streamable-http
If you encounter 421 Invalid Host Header errors, either disable protection (default) or add your host to the allowed list.
Security
Read-Only Database User (Recommended)
Create a read-only user in GreptimeDB using static user provider:
mcp_readonly:readonly=your_secure_password
Application-Level Security Gate
All queries go through a security gate that:
- Blocks: DROP, DELETE, TRUNCATE, UPDATE, INSERT, ALTER, CREATE, GRANT, REVOKE, EXEC, LOAD, COPY
- Blocks: Encoded bypass attempts (hex, UNHEX, CHAR)
- Allows: SELECT, SHOW, DESCRIBE, TQL, EXPLAIN, UNION
Write Mode (Disabled by Default)
The server is read-only by default. Write mode enables every operation that changes stored state:
- destructive SQL (DDL/DML such as
CREATE,DROP,ALTER,INSERT,UPDATE,DELETE) throughexecute_sql create_pipeline,delete_pipeline,create_dashboard,delete_dashboard
# Environment variable
GREPTIMEDB_ALLOW_WRITE=true greptimedb-mcp-server
Or CLI argument
greptimedb-mcp-server --allow-write true
When enabled, the security gate is bypassed for execute_sql, and the server logs a warning on startup. With write mode off, those four tools return an error without contacting the server; list_pipelines, list_dashboards and dryrun_pipeline are read-only and stay available.
⚠️ Danger: This lets an AI assistant run destructive statements against your
database. Never enable it against production data. Combine with a read-only
database user if you only need read access.
Data Masking
Sensitive columns are automatically masked (******) based on column name patterns:
- Authentication:
password,secret,token,api_key,credential - Financial:
credit_card,cvv,bank_account - Personal:
ssn,id_card,passport
Configure with --mask-patterns phone,email to add custom patterns.
Audit Logging
All tool invocations are logged:
2025-12-10 10:30:45 - greptimedb_mcp_server.audit - INFO - [AUDIT] execute_sql | query="SELECT * FROM cpu LIMIT 10" | success=True | duration_ms=45.2
Disable with --audit-enabled false.
Development
# Clone and setup
git clone https://github.com/GreptimeTeam/greptimedb-mcp-server.git cd greptimedb-mcp-server uv venv && source .venv/bin/activate uv sync
Run tests
pytest
Format & lint
uv run black . uv run flake8 src
Debug with MCP Inspector
npx @modelcontextprotocol/inspector uv --directory . run -m greptimedb_mcp_server.server
License
MIT License - see LICENSE.md.
Acknowledgement
Inspired by: