SWMF MCP Server
SWMF MCP Server enables AI agents to work with the Space Weather Modeling Framework (SWMF) through tools for context, evidence, artifact inspection, and comparison. It includes task-specific skills for explanation, configuration, building, running, debugging, and analysis.
README
SWMF AI
SWMF AI combines a small MCP tool surface with task-specific skills for SWMF work. The MCP tools return evidence only. Skills decide which tool to use first, what evidence matters, and how to answer. The detailed protocol lives in docs/skill_mcp_protocol.md.
System
flowchart TD
CLIENT["AI client / skill protocol"] --> MCP["SWMF MCP server"]
MCP --> T1["get_context"]
MCP --> T2["get_evidence"]
MCP --> T3["inspect_artifact"]
MCP --> T4["compare_artifacts"]
T1 --> BACKEND["SWMF source tree, PARAM/XML metadata, examples, logs, run dirs"]
T2 --> BACKEND
T3 --> BACKEND
T4 --> BACKEND
MCP Tools
get_contextfor broad orientation, architecture, and cross-component questions.get_evidencefor source, docs, schema, lookup, and workflow evidence.inspect_artifactfor direct inspection of logs, PARAM files, XML, and run directories.compare_artifactsfor deterministic diffs between two artifacts.
Skills
Skills live in src/agent_assets/skills and are the
main way the agent decides how to work.
Entry skills:
swmf-explainfor "how does this work?" questions.swmf-configurefor setup and parameterization.swmf-buildfor build workflows.swmf-runfor run workflows.swmf-debugfor failure analysis.swmf-analyzefor output interpretation and postprocessing.swmf-comparefor change and difference questions.
Support skills:
swmf-architectureswmf-exact-lookupswmf-implementationswmf-paramsswmf-postproc
The shared discipline source is
src/agent_assets/SWMF_CORE_DISCIPLINE.md.
AI-Assisted Install
If you are already inside an AI coding agent (Claude Code, GitHub Copilot, Codex CLI), copy the prompt below, fill in the two placeholders, and paste it into the agent. The agent will handle path discovery and run the right install command for you.
| Placeholder | What to put |
|---|---|
<AGENT> |
claude, copilot-vscode, copilot-cli, or codex |
<TARGET_DIR> |
Absolute path to the project directory where SWMF AI should be installed |
I want to install SWMF AI into <TARGET_DIR> for use with the <AGENT> agent.
The SWMF AI repository is at: <absolute path to this swmf-mcp-prototype directory>
Please complete the following steps in order:
1. Run `make` inside the swmf-mcp-prototype repository to bootstrap the Python
runtime and build the knowledge index. Wait for it to succeed before continuing.
2. Find the SWMF source root. Check in order:
a. The environment variable $SWMF_ROOT if set.
b. A directory named "SWMF" that is a sibling of the swmf-mcp-prototype directory.
c. Any other existing path named "SWMF" visible from the current machine.
Report the resolved absolute path, or ask me if none is found.
3. Find SWMFSOLAR if it exists. Check in order:
a. A directory named "SWMFSOLAR" that is a sibling of the SWMF root found above.
b. A directory named "SWMFSOLAR" that is a sibling of the swmf-mcp-prototype directory.
Report the resolved absolute path, or skip if none exists.
4. Run `which idl` to find the IDL executable. Report the path, or skip if not found.
5. Run the install command, substituting the paths discovered above:
make install \
AGENT=<AGENT> \
TARGET_DIR=<TARGET_DIR> \
SWMF_ROOT=<path from step 2> \
[SWMF_IDL_EXEC=<path from step 4>] \
[SWMFSOLAR_ROOT=<path from step 3>]
Omit SWMF_IDL_EXEC and SWMFSOLAR_ROOT if those paths were not found.
Install & Usage
Requirements:
- Python 3.11+
make- network access the first time dependencies are resolved with
uv
Bootstrap the local runtime and build the local knowledge index:
make
make installs uv if needed, reuses a valid .venv when possible, creates or syncs the environment when needed, warms the embedding cache, and builds the knowledge index used by the MCP server.
Install one agent bundle:
make install AGENT=claude
make install AGENT=copilot-vscode SWMF_ROOT=/data/SWMF
make install AGENT=copilot-cli SWMF_ROOT=/data/SWMF SWMFSOLAR_ROOT=/data/SWMFSOLAR
make install AGENT=codex SWMF_ROOT=/data/SWMF SWMF_IDL_EXEC=/path/to/idl
make install AGENT=claude TARGET_DIR=/path/to/workspace SWMF_ROOT=/data/SWMF
AGENT is required for make install and must be one of claude, copilot-vscode, copilot-cli, or codex.
SWMF_ROOT defaults to ./SWMF relative to this repository. SWMF_IDL_EXEC is optional and is written only when passed. SWMFSOLAR_ROOT is optional; when omitted during make install, the installer auto-detects it and writes only the first existing match from:
- a sibling of the chosen
SWMF_ROOT ./SWMFSOLARin this repositoryTARGET_DIR/SWMFSOLAR
TARGET_DIR defaults to this repository. When TARGET_DIR points elsewhere, make install also creates TARGET_DIR/.swmf_mcp_server as a symlink back to this repo so the generated agent config can still reference the server.
Unlike make, make install bootstraps the Python runtime if needed but does not warm the embedding cache or rebuild the knowledge index.
make install writes exactly one agent-specific config surface, symlinks the matching instruction file to the shared discipline source, and symlinks the agent skill tree from src/agent_assets/skills.
When the agent is launched in your project directory, it should be able to load MCP tools and skills automatically.
Example user prompts:
- "Explain how GM couples to IE in this setup."
- "Find evidence for how
DoCoupleGMIEis defined and used." - "What entrypoints matter for configuring GM?"
- "Inspect this PARAM.in and summarize likely issues."
- "Compare these two run directories and summarize meaningful changes."
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。