Metadata-Version: 2.4
Name: aas-mcp
Version: 0.0.1
Summary: A Python Model Context Protocol (MCP) Server for Eclipse BaSyx to manage Asset Administration Shells (AAS)
Project-URL: Homepage, https://github.com/SmartFactory-KL/aas-mcp
Project-URL: Issues, https://github.com/SmartFactory-KL/aas-mcp/issues
Project-URL: Documentation, https://github.com/SmartFactory-KL/aas-mcp
Author-email: Peter Stein <peter.stein@dfki.de>
License: MIT License
        
        Copyright (c) 2025 Peter Stein
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.10
Requires-Dist: fastmcp
Requires-Dist: shellsmith>=0.4.0
Provides-Extra: test
Requires-Dist: mypy; extra == 'test'
Requires-Dist: pytest; extra == 'test'
Requires-Dist: ruff; extra == 'test'
Description-Content-Type: text/markdown

    aas-mcp

**aas-mcp** is a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server that provides AI assistants with tools to interact with [Asset Administration Shells (AAS)](https://industrialdigitaltwin.org/en/content-hub/aasspecifications) via the [Eclipse BaSyx](https://www.eclipse.org/basyx/) REST API.

This MCP server enables AI assistants to perform full CRUD operations on AAS Shells, Submodels, and Submodel Elements, making it ideal for industrial automation, digital twin management, and AAS-based workflows.

### Features

- 🤖 **MCP Server** with 25+ tools for comprehensive AAS management
- 🔧 **Full CRUD Operations** on Shells, Submodels, and Submodel Elements
- ⚙️ **Health Monitoring** tools for AAS environment status
- 🔁 **Seamless Integration** with [Eclipse BaSyx](https://www.eclipse.org/basyx/) Environment REST API
- 📡 **AI-Ready** tools designed for intelligent automation workflows  

## 🚀 Installation

```bash
pip install aas-mcp
```

**Requires**: Python 3.10+

## 🚀 Usage

### Running the MCP Server

```bash
# Start the MCP server
aas-mcp
```

### Available Tools

The MCP server provides 25+ tools for AAS management:

#### Shell Management
- `get_shells` - Retrieve all AAS Shells
- `get_shell` - Get a specific Shell by ID
- `create_shell` - Create a new Shell
- `update_shell` - Update an existing Shell
- `delete_shell` - Delete a Shell

#### Submodel Management
- `get_submodels` - Retrieve all Submodels
- `get_submodel` - Get a specific Submodel by ID
- `create_submodel` - Create a new Submodel
- `update_submodel` - Update an existing Submodel
- `delete_submodel` - Delete a Submodel
- `get_submodel_value` - Get Submodel raw value
- `update_submodel_value` - Update Submodel value
- `get_submodel_metadata` - Get Submodel metadata

#### Submodel Element Management
- `get_submodel_elements` - Get all elements from a Submodel
- `get_submodel_element` - Get a specific element by path
- `create_submodel_element` - Create a new element
- `update_submodel_element` - Update an existing element
- `delete_submodel_element` - Delete an element
- `get_submodel_element_value` - Get element raw value
- `update_submodel_element_value` - Update element value

#### Reference Management
- `get_submodel_refs` - Get Submodel references from a Shell
- `create_submodel_ref` - Create a Submodel reference
- `delete_submodel_ref` - Delete a Submodel reference

#### Health & Monitoring
- `get_health_status` - Check AAS environment health
- `is_healthy` - Boolean health check

## 🔧 Configuration

### MCP Client Configuration

To use this server with MCP clients like [Claude Desktop](https://claude.ai/download), add it to your client's configuration:

```json
{
  "mcpServers": {
    "aas-mcp": {
      "command": "aas-mcp",
      "env": {
        "SHELLSMITH_BASYX_ENV_HOST": "http://localhost:8081"
      }
    }
  }
}
```

> ℹ️ Change the value of `SHELLSMITH_BASYX_ENV_HOST` to match your BaSyx Environment host URL

The configuration format is similar for other MCP clients like LM Studio.

### BaSyx Environment Configuration

The MCP server connects to an Eclipse BaSyx environment. The default host is:

```
http://localhost:8081
```

You can override it in several ways:

- Set the environment variable:  
  ```bash
  export SHELLSMITH_BASYX_ENV_HOST=https://your-host:1234
  ```

- Create a `.env` file in your working directory with:  
  ```dotenv
  SHELLSMITH_BASYX_ENV_HOST=https://your-host:1234
  ```

Each tool also accepts a `host` parameter to override the default configuration dynamically.

## 🤝 Contributing

We welcome contributions! Please see our contributing guidelines for setup, testing, and coding standards.

