Greybeam MCP

Greybeam MCP

A single MCP server that lets agents query data through the Greybeam routing layer with Snowflake-compatible tooling.

Category
访问服务器

README

Greybeam MCP

A single MCP server that lets agents query data through the Greybeam routing layer with Snowflake-compatible tooling.

  • run_snowflake_query — executes SQL via the Greybeam proxy (Snowflake protocol).
  • cortex_analyst — calls Snowflake Cortex Analyst; any returned SQL is executed via Greybeam.
  • cortex_search — delegated to the pinned upstream Snowflake MCP (no SQL, REST only).

Out of scope for v1: Cortex Agent, semantic views, and the upstream object_manager / query_manager / semantic_manager tool families. These are locked off in the child config so a misconfigured deployment can't accidentally expose them.

Quick start

Install and run the setup wizard with uv:

uvx greybeam-mcp init

The init wizard prompts for account, user, proxy host, and auth method; writes a config file at ~/.config/greybeam-mcp.yaml (mode 0600); and prints the exact registration command for Claude Code and Claude Desktop.

For a packaged install, the printed command uses this form:

claude mcp add greybeam -- uvx greybeam-mcp --config ~/.config/greybeam-mcp.yaml

Manual install and run

If you'd rather author the YAML by hand, copy examples/greybeam.yaml to a location of your choice, edit it, chmod 600 it, then:

uvx greybeam-mcp --config /absolute/path/to/greybeam.yaml

From a source checkout, use uv run instead:

uv run greybeam-mcp --config /absolute/path/to/greybeam.yaml

Configuration

The YAML is the single source of truth — it holds account, proxy host, and auth credentials. Pick one auth method (in order of recommendation):

  • private_key_file (path to a PEM key, plus optional private_key_passphrase) — recommended, since Snowflake is deprecating password auth
  • private_key (inline PEM contents) — for environments without a writable disk
  • authenticator: externalbrowser for SSO (requires a SAML2 integration on the account)
  • password — deprecated by Snowflake, avoid for new setups

chmod 600 the file since it contains credentials.

Environment variable fallback

Every field above can also come from an environment variable (SNOWFLAKE_USER, SNOWFLAKE_PRIVATE_KEY_FILE, SNOWFLAKE_PRIVATE_KEY_PASSPHRASE, SNOWFLAKE_PRIVATE_KEY, SNOWFLAKE_AUTHENTICATOR, SNOWFLAKE_PASSWORD). YAML takes precedence; envs fill in unset fields. Useful in container/k8s deployments where secrets are mounted as env vars.

Cortex Analyst auth (v1 limitation)

The Cortex Analyst REST endpoint expects Authorization: Bearer <oauth_or_jwt>. The v1 client supports Bearer (token) directly; the password / Basic-auth branch is test scaffolding and will return 401 against real Snowflake. If you need Cortex Analyst in production today, configure an OAuth access token via the token field in code; broader keypair-JWT support is tracked for v1.1.

Client integration

uvx greybeam-mcp init prints registration snippets pre-filled with your config path. The general shapes:

Claude Code (CLI):

claude mcp add greybeam -- uvx greybeam-mcp --config /absolute/path/to/greybeam.yaml

Start a new claude session to pick it up. Verify with claude mcp list.

Claude Desktop: paste the JSON printed by greybeam-mcp init into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or the equivalent on your platform, then restart the app. The installed-package shape is:

{
  "mcpServers": {
    "greybeam": {
      "command": "uvx",
      "args": ["greybeam-mcp", "--config", "/absolute/path/to/greybeam.yaml"]
    }
  }
}

After a successful install, ask the agent something like "run select 1 on snowflake" — it should pick the run_snowflake_query tool automatically.

Statement-type policy

Greybeam MCP does not enforce statement-type restrictions at the MCP layer. CREATE / DROP / ALTER and other potentially destructive statements are subject to:

  1. Greybeam backend routing and policy.
  2. Your Snowflake role's grants on the target objects.

If you need hard MCP-layer restrictions, scope the Snowflake role tightly or contact Greybeam about backend policy options. This is an intentional v1 divergence from upstream Snowflake MCP, which blocks DDL by default — see the design doc for rationale.

Cancellation

v1 bounds in-flight calls via two driver-level mechanisms inside run_snowflake_query:

  1. cursor.execute(timeout=greybeam.query_timeout) — Snowflake's own query timeout.
  2. Explicit cursor.close() on row-cap / byte-cap exceedance (acquires the driver's _lock_canceling and aborts the in-flight query).

Client-driven cancellation (notifications/cancelled) is not wired in v1. The CancelToken primitive, dispatcher in-flight table, and delegated-cancel forwarding are scaffolding retained and unit-tested so v1.1 can light them up by adding a notifications/cancelled handler.

Development

uv sync --extra dev
uv run pytest

To run the server from a local clone instead of the PyPI package:

uv run greybeam-mcp init

The wizard detects the source checkout and prints registration commands using uv --directory /absolute/path/to/greybeam-mcp run greybeam-mcp ..., so local development can point clients at unpublished changes.

The default suite runs unit + always-on contract tests (no network, no DB). Two test layers are gated behind environment variables:

Contract tests against the real upstream child (requires real Snowflake credentials — placeholders are not enough because the upstream child may validate at startup):

GREYBEAM_RUN_CHILD_CONTRACT=1 \
  SNOWFLAKE_ACCOUNT=... SNOWFLAKE_USER=... SNOWFLAKE_PASSWORD=... \
  uv run pytest tests/contract/

Integration tests against a real Greybeam dev endpoint:

GREYBEAM_RUN_INTEGRATION=1 \
  SNOWFLAKE_ACCOUNT=... SNOWFLAKE_USER=... SNOWFLAKE_PASSWORD=... \
  GREYBEAM_PROXY_HOST=greybeam-dev.example.com \
  uv run pytest tests/integration/

The upstream Snowflake MCP package is pinned at snowflake-labs-mcp==1.4.1 (import name mcp_server_snowflake). Bumping that pin should re-run the child contract snapshot test and re-approve tests/contract/fixtures/child_tools_list.json if the surface drifted.

Design doc: docs/superpowers/specs/2026-04-24-greybeam-mcp-design.md.

Release

Build and verify locally before publishing:

uv build --no-sources
uv run pytest
uv run ruff check src/ tests/

Preferred publish path:

  1. Create a GitHub environment named pypi.
  2. Configure a pending PyPI Trusted Publisher for project greybeam-mcp, this repository, the pypi environment, and .github/workflows/publish.yml.
  3. Create a GitHub release for a tag whose version matches pyproject.toml.

Manual fallback, if Trusted Publishing is not configured yet:

uv publish --token pypi-...

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选