Skip to main content
Glama
environ-mcp

environ-mcp

by renhail

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
ENVIRON_TOKENNo直接指定 token(不设则读写绑定表 / token 文件)。
MCP_AUTH_TOKENNoMCP 接入令牌(客户端 Authorization 头)。为空则不校验。
MCP_PUBLIC_URLNo对外地址,生成接入片段用。https://app.environ.online/mcp
ENVIRON_API_BASENoenviron 后端地址。http://localhost:8080
OAUTH_ACCESS_TTLNoOAuth access_token 有效期(秒)。86400
MCP_CLIENT_HEADERNo客户端标识请求头名。X-Environ-Client
OAUTH_REFRESH_TTLNoOAuth 刷新令牌有效期(秒)。2592000
ENVIRON_OAUTH_FILENoOAuth 客户端/令牌落盘位置。~/.workbuddy/environ-mcp/oauth.json
ENVIRON_TIMEOUT_MSNo后端请求超时。20000
ALLOW_DEFAULT_BINDINGNo是否允许共享默认绑定。多人共用时保持 false。false
ENVIRON_BINDINGS_FILENo绑定表落盘位置。~/.workbuddy/environ-mcp/bindings.json

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
bind_userA

用 environ 系统的用户名和密码完成应用绑定,绑定后才能查询站点数据。首次使用或提示 token 失效时必须先调用一次。

list_stationsA

列出当前绑定用户有权限查看的环境监测站点(站点 ID、名称、编码、地址、在线状态)。用户问「我有哪些站点」「XX 站在哪」时用这个。用户给了具体关键字(地名、行业词)时,优先用 search_stations 精确搜索。

search_stationsA

按关键字搜索当前用户有权限查看的环境监测站点。关键字可匹配站点名称、站点编码、上级站点名和站点地址(含城市、区县)。⚠️ 当用户只说了模糊的地名或行业词(如「污水」「重庆」「兰州」)而不确定是哪个站点时,先用这个工具搜出候选站点,拿到站点 ID 后再调用 get_overview / get_realtime / get_hour_data。

get_realtimeA

查询站点当前最新的实时监测数据(各污染因子浓度值及单位)。用户问「XX 站点现在数据多少」「现在 SO2 多少」时用这个。

get_hour_dataA

查询站点指定时间范围内的小时级监测数据序列。默认返回当天 0 点至当前时刻。用户问「XX 站昨天各小时数据」「近 6 小时趋势」时用这个。

get_overviewA

一次返回站点基本信息 + 当前实时数据 + 当日小时数据。用户问「XX 站点情况怎么样」「给我看下 XX 站的完整数据」时用这个,最省事。

check_bindA

检查当前会话使用的是哪个 environ 账号、身份是怎么来的(客户端绑定 / 直传 token / 共享默认),以及绑定是否还有效、能看到多少个站点。用户问「我现在绑的是谁」「为什么查不到数据」时用这个。

unbind_userA

解除当前客户端与 environ 账号的绑定,之后的查询会要求重新绑定。换账号、离职交接时用这个。⚠️ 这是破坏性操作:必须显式传 confirm=true 才会真正执行;不传或传 false 时只返回当前绑定状态,不会解绑。

get_client_configA

返回可以直接粘进 ~/.workbuddy/mcp.json 的 MCP 接入配置片段,含本机的客户端标识(X-Environ-Client)。新同事接入时用这个。

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4/5.0

Scored across 9 tools

Disambiguation4/5

Each tool has a distinct resource+action, and the descriptions actively route between the one genuinely overlapping pair (list_stations defers to search_stations for keyword queries). The remaining soft overlap is get_overview vs. get_realtime/get_hour_data, but that composite is explicitly framed as a convenience wrapper, and check_bind vs. get_client_config are clearly separated (auth status vs. config snippet).

Naming Consistency5/5

All nine tools follow a uniform snake_case verb_noun pattern (check_bind, bind_user, list_stations, search_stations, get_realtime, get_hour_data, get_overview, unbind_user, get_client_config). Verb choices are meaningful and consistent — get_ for reads, bind/unbind for lifecycle, check_ for status.

Tool Count5/5

Nine tools is well within the ideal 3-15 range and every tool maps to a concrete user intent. Nothing appears redundant: bind/unbind/check_bind form a complete auth triad, and the three data tools cover realtime, series, and combined views.

Completeness4/5

The surface covers the full lifecycle for its domain: binding (bind/check/unbind), station discovery (list/search), and data retrieval (realtime/hourly/overview), plus onboarding config. Minor gaps remain — no daily/aggregate statistics, alarm or threshold queries, or metadata lookup for a single station by ID — but agents can work around these with existing tools.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues