[{"data":1,"prerenderedAt":93},["ShallowReactive",2],{"project-mcp-grid-decision-support":3},{"id":4,"title":5,"body":6,"description":12,"extension":59,"heroImages":60,"highlights":61,"meta":71,"navigation":72,"overview":73,"path":74,"role":75,"seo":76,"stack":77,"stem":88,"tagline":89,"type":90,"year":91,"__hash__":92},"projects\u002Fprojects\u002Fmcp-grid-decision-support.md","MCP Servers for a Power Grid",{"type":7,"value":8,"toc":55},"minimark",[9,13,16,19,29,32,35,38,49,52],[10,11,12],"p",{},"I did this project during my internship at Jade Hochschule in Wilhelmshaven, Germany, from April to June 2026. The team works on a decision support tool for the people who run the power grid. When the grid is too loaded, they need to find the risks fast, try some switching options and check what happens after. My part was to see if an LLM can help with that when it can ask questions to the grid data and run simulations.",[10,14,15],{},"The grid data comes as CGMES files, the standard format used between grid operators in Europe. They are big XML files, not easy to use directly. The team already had a tool called GridPIM that loads them into a Neo4j graph database and builds a Pandapower network from it, so I started from that. I also added an Apache Jena Fuseki triple store, to query the same data with SPARQL.",[10,17,18],{},"Then I built two MCP servers in Python, so the LLM can use all of this as tools:",[20,21,22,26],"ul",{},[23,24,25],"li",{},"The first one talks to Neo4j and Pandapower. The model can get a summary of the grid, list buses, lines, transformers, switches and generators, then create a scenario, open or close switches, run an AC power flow, look for bottlenecks and compare two scenarios.",[23,27,28],{},"The second one talks to Fuseki and only reads the ontology.",[10,30,31],{},"In both there is a tool to run a raw query (Cypher or SPARQL) when the other tools are not enough. I did not use RAG, because it loses the structure of the grid. A question like \"what is connected to this line\" needs the real graph.",[10,33,34],{},"The data of the real operators is confidential, so we tested on the MiniGrid T1 from ENTSO-E, which is public. It is also why a local model matters: with a cloud model, the grid data leaves the company. So I compared two local Qwen 3.6 models running on Ollama with Qwen 3.6 Plus and Claude Sonnet 4.6 in the cloud.",[10,36,37],{},"I ran three experiments:",[20,39,40,43,46],{},[23,41,42],{},"Does the model need the schema of the graph? I tried with no schema, with a tool to get it, and with the schema given at the start. Giving it at the start helped the smaller models not get lost.",[23,44,45],{},"20 questions in 5 categories (connectivity, topology, generation, simulation, grid state), with no tools, with one server or with both.",[23,47,48],{},"An N-1 test: for each of the 9 lines, open its switches, run the bottleneck analysis and give the result in JSON.",[10,50,51],{},"What I got is that the tools matter more than the model. Without tools, the models can answer almost nothing. Claude got up to 45%, but I think it is because MiniGrid T1 is on the internet and was in its training data. With the tools, the local Qwen 3.6 27B got 85 to 90% and Claude Sonnet 4.6 got 90 to 95%. On the N-1 test, Qwen 27B was right on 8 lines out of 9, Qwen 35B-A3B on 9 out of 9 and Claude on 6 out of 9. The tools gave the right data every time. The mistakes came from the model counting the violations wrong when writing the JSON. Giving both servers at the same time did not help either, the models started to use the wrong one.",[10,53,54],{},"So a local model can do this job if the tools are good, and this is what the team wanted to know. We wrote a paper about it, and it was accepted at the BCS SGAI 2026 conference in Cambridge.",{"title":56,"searchDepth":57,"depth":57,"links":58},"",2,[],"md",[],[62,65,68],{"title":63,"description":64},"Two MCP servers","One for the Neo4j graph and the Pandapower simulation, one for the ontology in Fuseki with SPARQL.",{"title":66,"description":67},"Local models work","With good tools, a local Qwen 3.6 27B got 85 to 90% on 20 grid questions. Claude Sonnet 4.6 got 90 to 95%.",{"title":69,"description":70},"Paper","Accepted at the BCS SGAI 2026 conference, Peterhouse College, Cambridge.",{},true,"My internship at Jade Hochschule: I built MCP servers so an LLM can query power grid data and run simulations, and we tested if a local model can do the job. We wrote a paper about it.","\u002Fprojects\u002Fmcp-grid-decision-support","AI Software Engineer Intern",{"title":5,"description":12},[78,79,80,81,82,83,84,85,86,87],"Python","MCP","Neo4j","Cypher","Apache Jena Fuseki","SPARQL","Pandapower","Ollama","Qwen","Claude","projects\u002Fmcp-grid-decision-support","Letting an LLM ask questions to a power grid and run simulations.","Work",2026,"cvJXUwECl80Tag9Z7ARDs2bLdcYGKTOC08p3d3rabuY",1791377584489]