MCP Hub
Back to servers

XMI MCP Server

An MCP server for exploring and querying SysML XMI models, specifically optimized for MTConnect exports, enabling deep inspection of packages, classes, inheritance, and documentation.

Tools
11
Updated
Jan 16, 2026

XMI MCP Server

An MCP (Model Context Protocol) server for querying SysML XMI exports. This server parses the MTConnect SysML model and provides tools for exploring packages, classes, enumerations, and documentation.

Installation

npm install
npm run build

Loading into Claude Code on Windows

Option 1: Add to User Settings (Recommended)

  1. Open your Claude Code settings file at:

    %APPDATA%\Claude\claude_desktop_config.json
    

    Or create it if it doesn't exist.

  2. Add the MCP server configuration:

    {
      "mcpServers": {
        "xmimcp": {
          "command": "node",
          "args": ["C:\\source\\vibes\\xmimcp\\dist\\index.js"]
        }
      }
    }
    
  3. Restart Claude Code for the changes to take effect.

Option 2: Using a Custom XMI File Path

If your XMI file is in a different location, set the XMI_FILE_PATH environment variable:

{
  "mcpServers": {
    "xmimcp": {
      "command": "node",
      "args": ["C:\\source\\vibes\\xmimcp\\dist\\index.js"],
      "env": {
        "XMI_FILE_PATH": "C:\\path\\to\\your\\model.xml"
      }
    }
  }
}

Option 3: Project-Specific Configuration

Create a .mcp.json file in your project root:

{
  "mcpServers": {
    "xmimcp": {
      "command": "node",
      "args": ["C:\\source\\vibes\\xmimcp\\dist\\index.js"]
    }
  }
}

Verifying the Server is Loaded

After restarting Claude Code, you can verify the server is loaded by asking Claude to use one of the tools, such as:

  • "Get model statistics from the XMI server"
  • "List all packages in the SysML model"

Tool Reference

Package Tools

list_packages

List all packages in the SysML model with optional filtering.

Parameters:

ParameterTypeDescription
parentPackagestringFilter to children of this package (by name or xmi:id)
recursivebooleanInclude nested packages recursively (default: false)
namePatternstringRegex pattern to filter package names

Example:

List all packages that contain "Asset" in their name

get_package

Get detailed information about a specific package including its children.

Parameters:

ParameterTypeRequiredDescription
identifierstringYesPackage name or xmi:id

Returns: Package details including child packages, classes, and enumerations.

Example:

Get details of the "Asset Information Model" package

Class/Block Tools

find_classes

Find classes/blocks by name, pattern, or package.

Parameters:

ParameterTypeDescription
namestringExact class name to find
namePatternstringRegex pattern for class names
packagestringLimit search to this package (name or id)
recursivebooleanSearch in nested packages (default: true)
includeAbstractbooleanInclude abstract classes (default: true)

Example:

Find all classes with "Tool" in their name
Find classes in the "Cutting Tool" package

get_class_details

Get full details of a class including properties, inheritance, and documentation.

Parameters:

ParameterTypeRequiredDescription
identifierstringYesClass name or xmi:id
includeInheritedbooleanNoInclude inherited properties from parent classes (default: false)

Returns: Complete class information including:

  • Properties with types and multiplicity
  • Parent classes (generalizations)
  • Stereotypes (e.g., SysML Block)
  • Documentation

Example:

Get details of the "CuttingTool" class with inherited properties

get_inheritance_hierarchy

Get the inheritance chain for a class showing ancestors and/or descendants.

Parameters:

ParameterTypeRequiredDescription
identifierstringYesClass name or xmi:id
directionstringNoOne of: "ancestors", "descendants", "both" (default: "both")

Example:

Show the inheritance hierarchy for the "Asset" class

Enumeration Tools

list_enumerations

List all enumerations with optional filtering.

Parameters:

ParameterTypeDescription
packagestringFilter to a specific package
namePatternstringRegex pattern for enumeration names

Example:

List all enumerations containing "Type" in their name

get_enumeration

Get details of an enumeration including all literal values and their documentation.

Parameters:

ParameterTypeRequiredDescription
identifierstringYesEnumeration name or xmi:id

Returns: Enumeration details with all literals and their documentation.

Example:

Get all values of the "DataItemSubTypeEnum" enumeration

Search Tools

search_documentation

Full-text search across all documentation and comments in the model.

Parameters:

ParameterTypeRequiredDescription
querystringYesSearch terms (space-separated, all must match)
elementTypesarrayNoLimit to: "class", "enumeration", "package", "datatype"
limitnumberNoMaximum results (default: 50)

Example:

Search documentation for "cutting tool life"
Search for "spindle" in class documentation only

search_by_name

Search for any element by name across the entire model.

Parameters:

ParameterTypeRequiredDescription
querystringYesName or partial name to search for
exactMatchbooleanNoRequire exact name match (default: false)
elementTypesarrayNoLimit to: "class", "enumeration", "package", "datatype"

Example:

Search for elements named "Asset"
Find all elements containing "Observation"

Reference Tools

resolve_reference

Resolve an xmi:id reference to get element details. Useful for following cross-references in the model.

Parameters:

ParameterTypeRequiredDescription
xmiIdstringYesThe xmi:id to resolve

Example:

Resolve reference "_19_0_3_68e0225_1620206731259_178927_703"

Utility Tools

get_model_statistics

Get statistics about the loaded SysML model.

Parameters: None

Returns:

{
  "packageCount": 120,
  "classCount": 1179,
  "enumerationCount": 106,
  "dataTypeCount": 30,
  "propertyCount": 1924,
  "associationCount": 231
}

Troubleshooting

Server not loading

  1. Ensure Node.js is installed and in your PATH
  2. Verify the paths in the configuration use double backslashes (\\) on Windows
  3. Check that npm run build completed successfully

XMI file not found

  1. Verify the XMI file exists at the expected path
  2. Use the XMI_FILE_PATH environment variable to specify a custom location

Tools not appearing

  1. Restart Claude Code after updating the configuration
  2. Check the Claude Code logs for any error messages

Development

# Install dependencies
npm install

# Build
npm run build

# Run directly (for testing)
npm start

License

MIT

Reviews

No reviews yet

Sign in to write a review