zhenyun-pangun-mcp
This MCP server provides read-only operational access to logs, databases, Choerodon issue tracking, and local code search.
Query Loki logs and list available Loki datasources (
obs_log_query,obs_log_datasources).Query Aliyun SLS logs for cn prod (
obs_sls_query).Run read-only SQL and inspect Archery databases: execute queries, describe tables, list columns/databases/instances, and query tenant information.
Work with Choerodon: query issue details, list/filter issues, search users and tasks by person, get status maps, list attachments, and resolve attachment download URLs.
Search local code repositories by content, filename, or module structure (
search_repo).Note: the provided schema exposes a subset of the broader tool set described in the README.
Provides read-only GitLab repository capabilities, including searching projects and code, retrieving file contents, and listing directory trees and branches.
Provides log querying through Grafana/Loki datasources, supporting LogQL queries, trace lookup, and datasource discovery for AWS and CN non-production environments.
Provides persistent knowledge base storage for business knowledge, SQL templates, table catalog metadata, and table relations, with search, create, update, and delete operations.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@zhenyun-pangun-mcp 查询盘古国内生产环境最近的错误日志"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
zhenyun-pangun-mcp
Zhenyun Pangu General Tools MCP, reusable by any MCP client (Claude Desktop / Cursor / various agents).
Fully self-contained: depends on no external project directories; simply configure real credentials in .env.
Capabilities Overview
Tools are grouped by prefix (17 total):
Prefix | Tools | Description |
|
| Log query: Loki dual platforms (AWS global all environments + CN domestic non-production) + Alibaba Cloud SLS (CN domestic Pangu prod only) |
|
| Database query (Archery dual sites cn/aws + Pangu dedicated tenant/database/instance capabilities) |
|
| Choerodon collaboration (built-in Python client, pure HTTP login) |
|
| Cross-local repository search (content / file name / module structure) |
Related MCP server: OpenObserve MCP Server
Log Platform Differentiation (Important)
Pangu logs are distributed across three different platforms. Confirm the target environment's platform before querying:
Capability | Environment | Platform | Data Source / project | Tag System |
| AWS Global (all environments) | Grafana/Loki |
|
|
| CN domestic non-production (dev/test) | Grafana/Loki |
|
|
| CN domestic Pangu prod only | Alibaba Cloud SLS |
|
|
CN domestic Pangu
prodlogs = Alibaba Cloud SLS (integration method replicated fromlog-ops-mcp), query withobs_sls_query.CN domestic Pangu
dev/testand other non-production useobs_log_query(region="cn"); logs in the Pangu non-production panel (namespace=saas-dev-new/saas-test-new) reside in theLoki (pangu-noneprod)data source.AWS Global (prod or non-production) all use
obs_log_query(region="aws").⚠️ Routing rule of thumb: Except for CN domestic Pangu prod which goes to SLS, all others (CN non-production + all AWS) go to Loki. Do not call
obs_sls_queryfor Pangu non-production.
Login credentials and data source names for the three platforms are configured independently in
.env; see.env.examplefor details.
Installation and Running
cd zhenyun-pangun-mcp
uv sync # 或 pip install -e .
cp .env.example .env # 填写真实凭据Run via stdio:
uv run zhenyun-pangun-mcp
# 或
python -m zhenyun_pangun_mcpMCP Client Configuration
{
"mcpServers": {
"zhenyun-pangun-mcp": {
"command": "uvx",
"args": ["--from", "/path/to/zhenyun-pangun-mcp", "zhenyun-pangun-mcp"],
"env": {
"MCP_ENV_DIR": "/path/to/zhenyun-pangun-mcp"
}
}
}
}Configuration (.env)
Group | Environment Variables | Description |
Archery |
| Database gateway cn/aws credentials |
| Instance alias → real instance name | |
Loki |
| Grafana login credentials |
| Environment → data source name mapping | |
Choerodon |
| Choerodon gateway and login credentials |
SLS |
| Pangu production Alibaba Cloud log credentials |
Other |
| Cross-repository search root directory (default: this repository root) |
Do not commit credentials to git;
.envis excluded by.gitignore. Only.env.example(with placeholder values) is committed.
Available Tools
17 toolsarchery_describe_tableC
获取表结构(SHOW CREATE TABLE)。
Inputs: table (required), db, site, instance. Returns: result
archery_list_columnsC
获取表的字段列表。
Inputs: table (required), db, site, instance. Returns: result
archery_list_databasesC
列出实例下的数据库列表(SHOW DATABASES)。
Inputs: site, instance. Returns: result
archery_list_instancesA
列出 Archery 实例别名映射(短名 -> 真实实例名,按站点分组)。
返回结构明确标注每个别名归属的 site(cn/aws),调用方据此显式传 site, 避免「用 cn 站点查 aws 实例」导致的「未关联该实例」歧义错误。
Inputs: no named parameters. Returns: result
archery_queryA
执行 SQL 查询(只读)。
site=cn 国内 / aws 日本云。instance 可用别名:prod/prod-ro/dev/test。 db 默认 srm。仅允许 SELECT/SHOW/DESC/EXPLAIN/WITH 前缀。
Inputs: sql (required), db, site, limit, +1 more. Returns: result
archery_query_tenantA
查询租户信息(hpfm_tenant)。tenant 为空时列出前 100 个租户。
盘古专属能力:sql-ops-mcp 未覆盖的多租户查询。 site=cn 国内 / aws 日本云(JP-SaaS-1)。instance 可用别名: cn: prod/prod-ro/dev/test;aws: aws(=aws-prod, 正式环境 JP-SaaS-1-Prod-RW-8.0)。
Inputs: db, site, tenant, instance. Returns: result
choerodon_download_attachmentA
通过猪齿鱼 hfle 接口将附件 URL 解析为可下载的签名地址。
Inputs: file_url (required). Returns: result
choerodon_get_status_mapB
获取猪齿鱼项目状态映射(状态名 -> 加密 id),供列表过滤用。
Inputs: project_id. Returns: result
choerodon_list_attachmentsB
查看猪齿鱼任务的附件列表(文件名 + URL)。
Inputs: issue_id (required), project_id. Returns: result
choerodon_list_issueA
条件查询猪齿鱼任务列表。
keyword 为概要模糊搜索;assignee 为经办人姓名(自动解析成员); status 为状态名(自动解析状态 id)。返回任务摘要列表。
Inputs: size, status, keyword, assignee, +1 more. Returns: result
choerodon_query_issueA
查询猪齿鱼单个任务/缺陷详情(含附件列表)。
issue_id 为工单加密 ID(来自列表结果);project_id 可选,默认用 CHOERODON_PROJECT_ID。 返回 summary/状态/优先级/类型/创建人/描述(HTML)/附件。
Inputs: issue_id (required), project_id. Returns: result
choerodon_search_tasks_by_personB
按经办人姓名搜索其负责的猪齿鱼任务(先查成员再按经办人过滤)。
Inputs: name (required), size, project_id. Returns: result
choerodon_search_usersB
按姓名模糊搜索猪齿鱼项目成员(返回加密 id / 真实名 / 登录名)。
Inputs: name (required), size, project_id. Returns: result
obs_log_datasourcesC
列出指定日志平台的 Loki 数据源(用于确认环境名与数据源名映射)。
Inputs: region (required). Returns: result
obs_log_queryA
查询日志(Loki)。
区分两套平台:region=aws 查 AWS 海外(jp-saas-1),region=cn 查国内公有云。 国内非 prod 已切换至 Loki 风格,地址 logs.going-link.net。 query 为 LogQL 表达式,如 '{app="srm-gateway"} |= "403"'。 time_range 支持 30m/2h/1d/today/yesterday 或 "YYYY-MM-DD HH:mm~HH:mm"(北京时间)。
Inputs: env (required), query (required), region (required), limit, +4 more. Returns: result
obs_sls_queryA
查询阿里云 SLS 日志(仅 cn 国内盘古 prod 用阿里云日志;非生产请走 Loki)。
仅 environment=prod 适用(project=pangu-cn-saas-3-prod-shared-sls-project-0)。 盘古 dev/test 等非生产环境日志在 Loki,应使用 obs_log_query(region="cn")。 传入 trace_id 做「ERROR/WARN + 全链路」两阶段查询;否则用 keyword, 自动加上 namespace 过滤。level 默认 ERROR(传空则不过滤级别)。
Inputs: level, limit, system, keyword, +5 more. Returns: result
search_repoA
跨本地代码仓库搜索(内容 / 文件名 / 模块结构)。
mode: content(内容搜索,返回命中行与上下文) / filename(文件名模糊匹配) / modules(列出服务-模块-层结构)。 扫描根目录由 PG_ROOT 指定(默认本仓库根)。max_results 限制命中数量, context 为内容搜索上下文行数,depth 为递归深度。
Inputs: keyword (required), mode, depth, context, +1 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 17 tools
Each tool serves a distinct purpose within its domain: log query tools are clearly separated by data source (Loki vs. SLS) and environment, database tools cover different schema operations, and issue tools handle specific retrieval tasks. No two tools overlap in function.
Most tools follow a consistent 'service_operation' pattern (e.g., obs_log_query, archery_query, choerodon_list_issue). The only deviation is 'search_repo' which lacks the service prefix, but it still uses a clear verb_noun format. Overall naming is predictable and readable.
17 tools covering logging, database operations, issue tracking, and code search is on the higher side but justified given the diverse domains. Each tool serves a specific need, and the count is appropriate for the server's multi-purpose scope.
The tool surface is heavily read-oriented: logging and database tools allow querying but not modification. Issue tracking is particularly incomplete, lacking create, update, and delete operations. Agents will encounter dead ends when trying to perform standard CRUD workflows.
Maintenance
Related MCP Connectors
Search and inspect source-pinned agent skills, plugins and tools through a free public MCP.
Query application logs, traces, and metrics from your AI coding assistant via Foam's MCP server.
The Cortex MCP server provides read-only access to real-time engineering context from the Cortex developer portal, allowing AI coding assistants to answer natural language questions about your organization's catalog (microservices, libraries, domains, teams, infrastructure), scorecards (engineering standards and best practices), initiatives (goals and deadlines), and Engineering Intelligence metrics. It includes tools for querying documentation, tracking personal entities, and accessing AI-assisted insights across the entire Cortex ecosystem.
Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables querying logs and metrics from Graylog, Prometheus, and InfluxDB 2.x. It provides tools for executing Lucene log searches, PromQL queries, and Flux queries directly within MCP-compatible clients.MIT
- AlicenseAqualityDmaintenanceEnables querying logs, traces, and metrics from multiple OpenObserve instances via MCP tools, with parallel execution, batching, and caching.648 npm11MIT
- AlicenseNot gradedqualityCmaintenanceProvides a unified MCP server to interact with multiple middleware (Loki, MySQL, Redis, RocketMQ, Elasticsearch, MongoDB) through a desktop application for connection management and configuration export.4MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for querying observability data from Elasticsearch, SkyWalking, and Prometheus/VictoriaMetrics, enabling AI models to search logs, traces, and metrics across environments.9MIT