rishabh10gpt
MCP Serverrishabh10gptpublic

gmesh mcp

通过自然语言与Gmsh交互生成计算网格的系统,支持多种LLM和导出格式。

Repository Info

1
Stars
0
Forks
1
Watchers
0
Issues
Python
Language
-
License

About This Server

通过自然语言与Gmsh交互生成计算网格的系统,支持多种LLM和导出格式。

Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.

Documentation

Gmsh Model Context Protocol (MCP)

A system that enables Large Language Models (LLMs) to interact directly with Gmsh for computational mesh generation through natural language prompts.

Overview

This project implements a Model Context Protocol (MCP) system for Gmsh, a finite element mesh generator. It allows users to describe mesh requirements in natural language, which are then interpreted by an LLM to generate appropriate Gmsh commands. The system supports both API-based LLMs (like OpenAI's GPT and Anthropic's Claude) and local LLMs via Ollama.

Features

  • Natural language interface for mesh generation
  • Support for both API-based LLMs and local LLMs via Ollama
  • Real-time feedback and visualization of generated meshes
  • Interactive refinement of meshes based on user feedback
  • Support for various mesh types and configurations
  • Export capabilities for common simulation formats

Installation

  1. Clone this repository:

    git clone https://github.com/rishabh10gpt/gmesh-mcp.git
    cd gmesh-mcp
    
  2. Install dependencies:

    pip install -r requirements.txt
    
  3. Set up environment variables:

    cp .env.example .env
    

    Then edit .env to add your API keys if using cloud-based LLMs.

Usage

Starting the server

python -m src.server.main

Using the CLI

python -m src.cli.main "Create a tetrahedral mesh for a sphere with radius 1 and maximum element size 0.1"

Using the API

from gmesh_mcp import MeshGenerator

generator = MeshGenerator(llm_provider="openai")  # or "anthropic", "ollama"
mesh = generator.generate("Create a tetrahedral mesh for a sphere with radius 1")
mesh.visualize()
mesh.export("sphere.msh")

Architecture

The system consists of several components:

  1. LLM Interface: Handles communication with different LLM providers
  2. Gmsh Controller: Manages Gmsh operations through its Python API
  3. Server: Provides a web interface and API endpoints
  4. Feedback System: Processes mesh statistics and visualization for iterative refinement

Examples

See the examples/ directory for sample use cases and demonstrations.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgements

  • Built on the powerful Gmsh open-source mesh generator
  • Leverages advancements in LLMs for natural language understanding

Quick Start

1

Clone the repository

git clone https://github.com/rishabh10gpt/gmesh-mcp
2

Install dependencies

cd gmesh-mcp
npm install
3

Follow the documentation

Check the repository's README.md file for specific installation and usage instructions.

Repository Details

Ownerrishabh10gpt
Repogmesh-mcp
LanguagePython
License-
Last fetched8/10/2025

Recommended MCP Servers

💬

Discord MCP

Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.

integrationsdiscordchat
🔗

Knit MCP

Connect AI agents to 200+ SaaS applications and automate workflows.

integrationsautomationsaas
🕷️

Apify MCP Server

Deploy and interact with Apify actors for web scraping and data extraction.

apifycrawlerdata
🌐

BrowserStack MCP

BrowserStack MCP Server for automated testing across multiple browsers.

testingqabrowsers

Zapier MCP

A Zapier server that provides automation capabilities for various apps.

zapierautomation