RA

rufenglai/ansa-api-mcp

Productivity workflow

This page was translated automatically. Technical details may differ from the original. View the original

22 stars 2 forks Quality 64 Trend 14

MCP Server for searching ANSA Python API documentation

Overview

ANSA Python API intelligent search service based on Model Context Protocol (MCP). Enables Claude Code to directly search and understand ANSA API documentation, assisting users in writing ANSA scripts. ANSA is a widely used CAE preprocessing software in the industry, with its Python API included and distributed within **. Faced with such a massive API system, developers often find it difficult to quickly find the functions they need. This project builds ANSA API documentation into structured indexes and exposes them to Claude Code via the MCP protocol, enabling AI to: - Understand users' natural language intents (available in both Chinese and English) - Accurately locate corresponding ANSA API functions - Return function signatures, parameter descriptions, and code examples 1. — Precisely match the most relevant functions based on pre-generated Chinese and English keyword indexes 2. — Perform substring matching in function signatures and descriptions to supplement results not covered by keywords 3. — Search the full API documentation to ensure nothing is missed - The more keyword hits, the higher the ranking - returns function signatures, modules, categories, parameter lists, and code examples - supports filtering by module and category In Claude Code, you describe requirements directly in natural language, and AI will automatically call the search tool: 1. — Extract function signatures, parameters, descriptions, and examples from ANSA Sphinx documentation 2. — Automatically classify by function name and module (mesh_edit, base_query, etc.) 3. — Call AI to generate Chinese and English search keywords for each function 4. — Generate ansa_api_index.json for runtime search

Overview (machine translated)

ANSA Python API intelligent search service based on Model Context Protocol (MCP). Enables Claude Code to directly search and understand ANSA API documentation, assisting users in writing ANSA scripts.

Project Introduction

ANSA is a widely used CAE preprocessing software in the industry, with its Python API containing 2,379 functions distributed across 20 modules. Faced with such a massive API system, developers often find it difficult to quickly find the functions they need.

This project builds ANSA API documentation into structured indexes and exposes them to Claude Code via the MCP protocol, enabling AI to:

  • Understanding users’ natural language intents (available in both Chinese and English)
  • Precisely locate the corresponding ANSA API functions
  • Returns function signatures, parameter descriptions, and code examples

Modules overridden

Module Description
ansa.base Basic operations (query, create, modify, delete entities)
ansa.mesh Grid operations (division, quality inspection, editing)
ansa.morph Shape deformation (mapping, deformation control)
ansa.connections Connection management (weld points, bolts, etc.)
ansa.dm Data Management
ansa.calc Computing Tools
ansa.kinetics Kinematic Analysis
ansa.batchmesh Batch mesh processing
ansa.report Report generation
ansa.cad CAD import and export
and 10 other modules…

Functional Features

Three-Layer Search Strategy

  1. Keyword Matching — Based on pre-generated Chinese and English keyword indexes, it precisely matches the most relevant functions
  2. Fuzzy Search — Performs substring matching in function signatures and descriptions to supplement results not covered by keywords
  3. TXT Documentation Backup — Search the full API documentation to ensure nothing is missed

Bilingual support in Chinese and English

Built-in Chinese-English keyword mapping, supports describing requirements in Chinese:

Intelligent Result Sorting

  • The more keyword hits, the higher the ranking
  • Returns function signatures, modules, classifications, parameter lists, and code examples
  • Supports filtering by module and category.

Installation Tutorial

Prerequisites

  • Python 3.10+
  • Claude Code is installed

Step 1: Install MCP Server

Method A: With a Git environment

Method B: No Git Environment

Step 2: Register with Claude Code

Output example:

Step 3: Restart Claude Code

After rebooting, you can use the search_ansa_api tool to search for the ANSA API.

Usage Examples

This page was translated automatically. Technical details may differ from the original.

Install

This server does not publish a one-line install command.

Open the repository installation guide New to MCP? Start with the mcpskill.org guide →

Configuration

{ "mcpServers": { "ansa-api": { "type": "stdio", "command": "ansa-api-mcp", "args": [], "env": { "ANSA_TXT_DOCS_PATH": "C:/path/to/your/txt_docs" } } } }