Sponsored by Deepsite.site

OpenDSS MCP 服务器

Created By
XJTU-RL8 months ago
mcp server for LMC
Content

OpenDSS MCP 服务器

这个项目是使用Model Context Protocol (MCP)框架构建的OpenDSS服务器。它使电力系统仿真工具可以通过MCP协议与大型语言模型(LLM)进行交互。

功能特点

  • 支持OpenDSS电力系统仿真核心功能
  • 通过MCP协议暴露OpenDSS的功能和数据
  • 提供易用的资源、工具和提示模板
  • 支持电力系统分析和操作的常见任务

安装

前提条件

  • Python 3.10 或更高版本
  • OpenDSS 安装(通过opendssdirect.py)

安装步骤

使用 uv 安装(推荐):

uv install git+https://github.com/your-username/opendss-mcp.git

或者使用 pip 安装:

pip install git+https://github.com/your-username/opendss-mcp.git

快速开始

启动服务器

# 开发模式运行,带调试界面
mcp dev -m opendss_mcp.server

# 安装到Claude桌面版
mcp install -m opendss_mcp.server

基本用法示例

from mcp.server.fastmcp import FastMCP
from opendss_mcp.models.opendss import OpenDSSModel

# 创建一个OpenDSS MCP服务器
mcp = FastMCP("OpenDSS服务器")

# 编译DSS文件
@mcp.tool()
def compile_dss_file(file_path: str) -> dict:
    """编译DSS文件"""
    model = OpenDSSModel()
    return model.compile_dss_file(file_path)

主要功能

工具

  • compile_dss_file: 编译DSS文件
  • execute_command: 执行OpenDSS命令
  • solve: 求解电力系统
  • get_power_flow: 获取功率潮流结果
  • get_voltages: 获取电压信息
  • get_losses: 获取损耗信息

资源

  • circuit://current: 获取当前电路信息
  • elements://{type}: 获取指定类型的元素信息
  • buses://list: 获取所有母线列表
  • results://{result_type}: 获取指定类型的结果数据

提示模板

  • analyze_circuit: 分析电路提示模板
  • solve_power_flow: 求解功率潮流提示模板
  • explain_results: 解释结果提示模板

贡献

欢迎提交问题报告和贡献代码。请确保提交的代码符合项目的编码规范。

许可证

MIT

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
WindsurfThe new purpose-built IDE to harness magic
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Serper MCP ServerA Serper MCP Server
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Tavily Mcp
Amap Maps高德地图官方 MCP Server
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
CursorThe AI Code Editor
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
ChatWiseThe second fastest AI chatbot™
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Playwright McpPlaywright MCP server
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
DeepChatYour AI Partner on Desktop