Connect through MCP
Expose graph tools to a client using the installed Fehm executable.
Prepare the graph
Terminal
fehm scan .
uv tool dir --binThe second command reports the executable directory. Use the absolute path to its fehm executable, or fehm.exe on Windows. Skill registration and MCP configuration are separate.
Configure a stdio server
JSON
{
"mcpServers": {
"fehm": {
"command": "/absolute/path/to/bin/fehm",
"args": ["mcp", "/absolute/path/to/project/.fehm/graph.json"]
}
}
}Use your client’s actual configuration schema. VS Code uses a servers map. Codex uses TOML:
TOML
[mcp_servers.fehm]
command = "/absolute/path/to/bin/fehm"
args = ["mcp", "/absolute/path/to/project/.fehm/graph.json"]Verify the connection
Reload the client and confirm it discovers fehm_context and fehm_practices. Ask it to retrieve a known flow and check the returned source paths.
Keep the graph current
MCP does not require the HTTP cockpit. Refresh the graph with a scan or a separate watcher. Do not run multiple writers against the same repository state. Tools that execute code or call providers remain explicit operations.