Skip to main content
Glama
nesar-ai-assistant

hydroemu-mcp-server

hydroemu-mcp-server

HACC宇宙論的流体シミュレーションエミュレータ(事前学習済みSEPIAガウス過程モデル)を、任意のLLMエージェント向けツールとして公開するMCPサーバーです。

このリポジトリが教える一つのアイデア

科学コードは通常のPythonのまま。MCPラッパーはそれを公開するだけ。

  • tools/ は通常の科学パッケージです。MCPを一切インポートしません。エミュレータツールは tools/hydro_tools.py に、SEPIAラッパーの中核は tools/emulator.py にあります。

  • mcp_server/ は約70行の汎用ラッパーです。pyproject.toml から1行の設定を読み、科学パッケージをインポートし、その __all__ にリストされたすべての関数をMCPツールとして登録します。

[tool.mcp-server]
tool_modules = ["tools"]

あなたの型ヒント、Pydanticの Field 制約、docstringが、エージェントが見るツールスキーマになります。独自サーバーを構築するには:モジュールを tools/ に置く(またはその1行の設定を自分のパッケージに向ける)だけで、__all__ に公開関数をリストすれば完了です。

Related MCP server: copamind-mcp

レイアウト

models/                           Pre-trained SEPIA pickles (copy from CosmoHydro/models/)
tools/
  emulator.py                    Core SEPIA wrapper: lazy load, predict, redshift interpolation
  hydro_tools.py                 The 5 MCP tool functions + ArtifactResult contract
  __init__.py                    __all__ — ONLY these names become tools
mcp_server/                      Generic drop-in wrapper (FastMCP)
tests/test_tools.py              Tools tested as plain Python, no MCP needed
docs/mcp-clients.md              Multi-client setup guide

パラメータ

合計7パラメータ(サブグリッド5 + 宇宙論2):

パラメータ

記号

範囲

単位

AGN風結合

κ_w

[0.03, 3.0]

AGNエネルギー効率

e_w

[0.001, 0.1]

BH種質量

M_seed

[0.5, 50.0]

10⁶ M☉

運動学的フィードバック速度

v_kin

[0.1, 1.0]

10⁴ km/s

運動学的フィードバック効率

ε_kin

[0.1, 1.0]

10¹

物質密度

ω_m

[0.12, 0.155]

ゆらぎ振幅

σ₈

[0.7, 0.9]

設計:ラテン超方格設計による110シミュレーション(400 Mpc/hボックス)。

観測量

観測量

説明

スナップショット

z範囲

GSMF

銀河恒星質量関数

11

0–2

HMF

ハロー質量関数

11

0–2

fGas

銀河団ガス質量比

7

0–1.0

CGD

銀河団ガス密度プロファイル

5

0–0.5

CGED

銀河団ガス電子密度プロファイル

5

0–0.5

CPP

銀河団ガス圧力プロファイル

5

0–0.5

CTP

銀河団ガス温度プロファイル

5

0–0.5

CEP

銀河団ガスエントロピープロファイル

5

0–0.5

CEEP

銀河団電子エントロピープロファイル

5

0–0.5

CMP

銀河団ガス金属量プロファイル

5

0–0.5

CYP

銀河団Compton-y(tSZ)プロファイル

5

0–0.5

ツール

ツール

機能

list_observables()

11個すべてのエミュレート観測量をメタデータ付きで一覧表示

describe_parameters()

7パラメータの設計空間と範囲を表示

predict_observable(...)

z=0で任意の観測量を予測し、CSVを書き出す

predict_observable_redshift(...)

任意のz(補間)で予測

plot_observable_comparison(...)

2パネル図:観測量+比

科学MCPサーバーにコピーする価値のある2つの慣習:

  1. すべてのツールは {status, files, message, metadata}ArtifactResult)を返す。

  2. 配列はツール間でファイルパスとして移動し、エージェントのコンテキストウィンドウを経由しない。

インストール

conda create -n hydroemu python=3.12 -y
conda activate hydroemu
pip install -e ".[dev]"
pytest                        # tests pass without SEPIA models (fixture data)

事前学習済みモデル

CosmoHydro/models/ から学習済みSEPIA pickleを models/ ディレクトリにコピーします:

cp -r /path/to/CosmoHydro/models/GSMF_multiz models/
cp -r /path/to/CosmoHydro/models/HMF_multiz models/
# ... etc for each observable

モデルがなくても、list_observables()describe_parameters()plot_observable_comparison() は動作します。pickleを必要とするのは predict_observablepredict_observable_redshift のみです。

サーバーの起動

Streamable HTTP — サーバーはURLを持つ可視プロセスです:

python -m mcp_server --transport streamable-http --port 8000

クライアントは http://127.0.0.1:8000/mcp に接続します。サーバーを停止するには Ctrl+C を押します(Ctrl+Zは一時停止するだけで、ポートが占有されたままになります。その場合はサーバーを再起動するだけです:ポートを保持している残存 mcp_server を検出し、自動的にクリアします)。

このサーバーをClaude Code、Claudeデスクトップアプリ、Codex、Cursor、その他のMCPクライアントから使用するには、docs/mcp-clients.md を参照してください。チェックイン済みの .mcp.json がすでにClaude Codeに配線しています。

アーキテクチャ

このサーバーは spectra-mcp-server と同じアーキテクチャに従います:

エミュレータプロット

CosmoHydroトレーニングノートブックからの24の検証、感度、比較プロットについては、完全なギャラリー を参照してください。ハイライト:

GSMF検証

Pk感度

GSMF:エミュレータ vs 保留シミュレーション

P(k)抑制:パラメータごとの感度

アーキテクチャ(詳細)

  • mcp_server/汎用ドロップインMCPラッパー(リポジトリ間でコピー)

  • tools/ にはドメイン固有の科学関数が含まれる

  • pyproject.toml[tool.mcp-server] 設定がそれらを結びつける

  • すべてのSEPIAインポートは遅延(モジュールスコープではなく関数内)

  • モデルは初回使用時にロードされ、以降の呼び出しでキャッシュされる

F
license - not found
Not graded
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables interaction with the CopaMind platform via MCP, exposing read-only and write tools for querying match predictions, Monte Carlo simulations, team rankings, and RAG-based explanations, all while maintaining full traceability and reproducibility.
    1
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Exposes SwarmLabs physics-informed scientific experiment predictions as MCP tools, enabling agents to run predictions, list engines, and perform parameter sweeps with honesty-first uncertainty reporting.
    MIT

View all related MCP servers

Related MCP Connectors

  • Free public MCP for AI agents — 193 tools, 44 workflows. No API key.

  • Hosted MCP with 91 agent tools: X, domains, SEO, Maps, Trends, Search, YouTube, TikTok, and more.

  • Hosted MCP endpoint with realistic fake data for prototyping agents. 12 tools, no setup.

View all MCP Connectors

Latest Blog Posts

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/nesar-ai-assistant/hydroemu-mcp-server'

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