CST MCP

CST MCP

An MCP server that integrates CST Studio Suite with the Model Context Protocol to enable automated electromagnetic simulation workflows. It provides specialized tools for material definition management and direct interaction with the CST Studio Suite environment.

Category
访问服务器

README

CST MCP Project

CST MCP 项目

This project is a Python package that integrates with CST Studio Suite and MCP (Model Center Platform). 本项目是一个集成了 CST Studio Suite 和 MCP (Model Center Platform) 的 Python 包。

Project Structure

项目结构

  • Materials/: Contains material definitions for CST Studio Suite
  • Materials/: 包含 CST Studio Suite 的材料定义
  • .gitignore: Git ignore file
  • .gitignore: Git 忽略文件
  • .python-version: Python version specification
  • .python-version: Python 版本规范
  • pyproject.toml: Project configuration file
  • pyproject.toml: 项目配置文件

Prerequisites

先决条件

  • Python 3.13 or higher
  • Python 3.13 或更高版本
  • CST Studio Suite 2026
  • CST Studio Suite 2026
  • MCP (Model Center Platform) 1.25.0 or higher
  • MCP (Model Center Platform) 1.25.0 或更高版本
  • uv package manager
  • uv 包管理器

Installing uv

安装 uv

# Install uv using pip
# 使用 pip 安装 uv
pip install uv

# Or install uv directly
# 或直接安装 uv
# For Windows:
# Windows系统:
winget install uv.uv

# For macOS:
# macOS系统:
brew install uv

# For Linux:
# Linux系统:
curl -LsSf https://astral.sh/uv/install.sh | sh

Installation

安装

Using uv (Recommended)

使用 uv(推荐)

  1. Clone the repository

  2. 克隆仓库

    git clone <repository-url>
    cd CST_MCP
    
  3. Create and activate virtual environment using uv

  4. 使用 uv 创建并激活虚拟环境

    # Create virtual environment
    # 创建虚拟环境
    uv venv
    
    # Activate virtual environment
    # 激活虚拟环境
    # Windows:
    # Windows系统:
    .venv\Scripts\activate
    # macOS/Linux:
    # macOS/Linux系统:
    source .venv/bin/activate
    
  5. Install dependencies using uv

  6. 使用 uv 安装依赖

    uv add .
    

Using Traditional pip

使用传统 pip

  1. Clone the repository

  2. 克隆仓库

    git clone <repository-url>
    cd CST_MCP
    
  3. Create a virtual environment

  4. 创建虚拟环境

    python -m venv .venv
    
  5. Activate the virtual environment

  6. 激活虚拟环境

    • Windows:
    • Windows系统:
      .venv\Scripts\activate
      
    • macOS/Linux:
    • macOS/Linux系统:
      source .venv/bin/activate
      
  7. Install dependencies

  8. 安装依赖

    uv pip install -e .
    

Dependencies

依赖项

  • cst-studio-suite-link: CST Studio Suite Python libraries
  • cst-studio-suite-link: CST Studio Suite Python 库
  • mcp[cli]>=1.25.0: Model Center Platform CLI
  • mcp[cli]>=1.25.0: Model Center Platform 命令行工具

Usage

使用方法

Basic Usage

基本用法

Adding the MCP in Trae

在 Trae 中添加 MCP

Note: This MCP relies on the uv package manager for virtual environment management and startup. 注意: 此 MCP 依赖 uv 包管理器进行虚拟环境管理和启动。

Method 1: Using JSON Configuration

方法 1: 使用 JSON 配置

  1. Create a JSON configuration file with the following content:
  2. 创建一个 JSON 配置文件,内容如下:
{
  "mcpServers": {
    "cst_interface": {
      "command": "uv",
      "args": [
        "--directory",
        "...\\CST_MCP",
        "run",
        "advanced_mcp.py"
      ]
    }
  }
}

About the uv Startup Configuration

关于 uv 启动配置

The JSON configuration uses uv as the command to start the MCP, which: JSON 配置使用 uv 作为启动 MCP 的命令,它会:

  1. Sets the working directory to the project folder using --directory
  2. 设置工作目录 到项目文件夹,使用 --directory
  3. Runs the advanced_mcp.py script using uv run
  4. 运行 advanced_mcp.py 脚本,使用 uv run
  5. Automatically uses the virtual environment created by uv
  6. 自动使用 uv 创建的虚拟环境

This ensures that the MCP runs with all the necessary dependencies installed in the uv-managed virtual environment. 这确保了 MCP 在 uv 管理的虚拟环境中运行,包含所有必要的依赖项。

  1. Import the JSON file in Trae:
  2. 在 Trae 中导入 JSON 文件
    • Open Trae IDE
    • 打开 Trae IDE
    • Navigate to the MCP section
    • 导航到 MCP 部分
    • Click on "Import MCP Configuration" or similar option
    • 点击 "导入 MCP 配置" 或类似选项
    • Select the JSON file you created
    • 选择你创建的 JSON 文件
    • Confirm the import
    • 确认导入

Verifying the MCP in Trae

在 Trae 中验证 MCP

  1. Check the MCP list in Trae
  2. 检查 Trae 中的 MCP 列表
  3. Ensure the CST MCP project is listed
  4. 确保 CST MCP 项目已列出
  5. Test the MCP by running a simple workflow
  6. 通过运行简单工作流测试 MCP

Materials

材料

The project includes a comprehensive set of material definitions in the Materials/ directory, including: 项目在 Materials/ 目录中包含了一套全面的材料定义,包括:

  • Conductors (Aluminum, Copper, Gold, etc.)
  • 导体(铝、铜、金等)
  • Dielectrics (FR-4, PTFE, etc.)
  • 电介质(FR-4、PTFE 等)
  • Absorbers (ECCOSORB series)
  • 吸收体(ECCOSORB 系列)
  • Semiconductors (Gallium Arsenide)
  • 半导体(砷化镓)
  • And many more...
  • 以及更多...

Configuration

配置

The project is configured using pyproject.toml, which specifies: 项目使用 pyproject.toml 进行配置,其中指定了:

  • Project metadata
  • 项目元数据
  • Python version requirements
  • Python 版本要求
  • Dependencies
  • 依赖项
  • Source locations for CST Studio Suite libraries
  • CST Studio Suite 库的源位置

Troubleshooting

故障排除

Common Issues

常见问题

  1. CST Studio Suite path not found

  2. 找不到 CST Studio Suite 路径

    • Ensure CST Studio Suite 2026 is installed in the default location
    • 确保 CST Studio Suite 2026 安装在默认位置
    • Verify the path in pyproject.toml is correct
    • 验证 pyproject.toml 中的路径是否正确
  3. Python version compatibility

  4. Python 版本兼容性

    • Ensure you're using Python 3.13 or higher
    • 确保使用 Python 3.13 或更高版本
    • Check the .python-version file for the recommended version
    • 查看 .python-version 文件了解推荐版本

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选