Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

MCP Overview

GDM-Flow includes an MCP (Model Context Protocol) server that exposes OPF and Y-bus workflows as callable tools for MCP-compatible clients.

What It Provides

Install

Install with MCP and optimization dependencies:

pip install -e ".[mcp,optimization]"

Run the Server

gdm-flow-mcp-server

The server runs over stdio and is intended for MCP clients (for example, VS Code agent integrations) to start and manage.

Tool Families

model_ref Interoperability

All solver and export tools accept either:

model_ref shape

{
	"model_id": "abc123def456",
	"version": 2
}

Or direct path-carrying references:

{
	"stored_path": "/abs/path/to/system.json"
}

Resolution order

  1. stored_path

  2. path

  3. source_path

  4. Registry lookup by model_id / version

Lookup uses model_ref.registry_db first, then DIST_STACK_MODEL_REGISTRY_DB.

Example

{
	"model_ref": {
		"model_id": "abc123def456",
		"version": 2
	},
	"db_path": "./opf_results.sqlite"
}

For complete tool details and parameters, see the MCP Tool Reference page.