SA

sap/aas-mcp-server

API 开发

本页由 AI 翻译,技术细节请以原文为准。 查看原文

9 stars 7 forks 质量 82 趋势 37Apache-2.0

一个AAS MCP适配器,将配置的资产管理 shell API作为模式上下文协议工具,使LLM代理能够与任何符合AAS的后端交互.

概览

OpenAPI - MCP 用于资产管理 Shell (AAS) API 的桥 一个AAS MCP适配器,将配置的资产管理 shell API作为模式上下文协议工具,使LLM代理能够与任何符合AAS的后端交互. 1. - IDTA 第2部分 API 从admin- shell-io/aas- specs-api的 git 标记中被捆绑成一个文件,每个API(需要 git, perl 和 node.js for npx) 2. - SAP BNAC AAS 服务器, Eclipse BaSyx, FA3ST Service等. 3. OR 重复步骤3与SPEC设定为相邻组件的文档,如子模型存储服务规格/V3.2 SSP-001.yaml,资产管理壳存储服务规格/V3.2 SSP-001.yaml,子模型存储服务规格/V3.2 SSP-001.yaml,概念描述存储服务规格/V3.2 SSP-001.yaml或发现服务规格/V3.2 SSP-001.yaml. 文件名只携带了次要版本(所有v3.2.x标记的V3.2 SSP-001.yaml),因此标记会进入文件夹名.

概述(AI 翻译)

□关于这个项目

资产管理 Shell (AAS) API 的 OpenAPI 对 MCP 桥

一个AAS MCP适配器,将配置的资产管理 shell API作为模式上下文协议工具,使LLM代理能够与任何符合AAS的后端交互.

□ 要求和设置

· 先决条件

  1. ** AAS OpenAPI 规格** - IDTA 第2部分 API 从admin- shell-io/aas- specs-api 的 git 标记中取出,被捆绑成每个 API 的一个文件(需要 git, perl 和 Node.js for [[T0]) )
  2. AAS后端服务器 - SAP BNAC AAS服务器,Eclipse BaSyx,FA3ST服务等.
  3. P 3.12+ 或 ** Docker**

QQ 设置

  1. 获得AAS规格**:

重复步骤 3 与 SPEC 设定为相邻组件的文件,例如. SubmodelRepositoryServiceSpecification/V3.2_SSP-001.yaml, AssetAdministrationShellRegistryServiceSpecification/V3.2_SSP-001.yaml, SubmodelRegistryServiceSpecification/V3.2_SSP-001.yaml, ConceptDescriptionRepositoryServiceSpecification/V3.2_SSP-001.yaml或 DiscoveryServiceSpecification/V3.2_SSP-001.yaml. 文件名称只包含小版本([[T7]) v3.2.x标签),所以标签会进入文件夹名. 可用标签 :

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

AAS MCP Server

About this project

OpenAPI-to-MCP bridge for Asset Administration Shell (AAS) APIs

An AAS MCP adapter that exposes configured Asset Administration Shell APIs as Model Context Protocol tools, enabling LLM agents to interact with any AAS-compliant backend.

Requirements and Setup

Prerequisites

  1. AAS OpenAPI Specifications - the IDTA Part 2 API specs from the git tags of admin-shell-io/aas-specs-api, bundled into one file per API (needs git, perl and Node.js for npx)
  2. AAS Backend Server - SAP BNAC AAS Server, Eclipse BaSyx, FA³ST Service, etc.
  3. Python 3.12+ OR Docker

Setup

  1. Get AAS Specifications:

    TAG=v3.2.0
    SPEC=AssetAdministrationShellRepositoryServiceSpecification/V3.2_SSP-001.yaml
    
    # 1. Clone the tag (a throwaway copy, step 2 edits it)
    git clone -q --depth 1 --branch "$TAG" \
      https://github.com/admin-shell-io/aas-specs-api "aas-specs-api-$TAG"
    
    # 2. v3.1.x only (no-op for v3.2.0): use the shared schemas of the same tag
    #    instead of fetching them from SwaggerHub
    find "aas-specs-api-$TAG" -name '*.yaml' -exec perl -pi -e \
      's#https://api\.swaggerhub\.com/domains/Plattform_i40/(Part1-MetaModel-Schemas|Part2-API-Schemas)/V[0-9.]+#../$1/openapi.yaml#g' {} +
    
    # 3. Bundle into one self-contained file
    mkdir -p "specs/$TAG/$(dirname "$SPEC")"
    npx -y @redocly/[email protected] bundle "aas-specs-api-$TAG/$SPEC" -o "specs/$TAG/$SPEC"
    

    Repeat step 3 with SPEC set to the file of each other component, e.g. SubmodelRepositoryServiceSpecification/V3.2_SSP-001.yaml, AssetAdministrationShellRegistryServiceSpecification/V3.2_SSP-001.yaml, SubmodelRegistryServiceSpecification/V3.2_SSP-001.yaml, ConceptDescriptionRepositoryServiceSpecification/V3.2_SSP-001.yaml or DiscoveryServiceSpecification/V3.2_SSP-001.yaml. The file names carry the minor version only (V3.2_SSP-001.yaml for all v3.2.x tags), so the tag goes into the folder name. Available tags: git ls-remote --tags https://github.com/admin-shell-io/aas-specs-api.

  2. Create config.yaml (copy from config.yaml.template):

    components:
      aas-repo:
        official_spec: specs/v3.2.0/AssetAdministrationShellRepositoryServiceSpecification/V3.2_SSP-001.yaml
        curation:
          allowlist:
            - [get, "*"]  # All GET operations (wildcard)
在 GitHub 查看完整 README

安装

npx -y @redocly/[email protected] bundle "aas-specs-api-$TAG/$SPEC" -o "specs/$TAG/$SPEC"
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "aas-repo": { "command": "aas-mcp-server", "args": [ "--component", "aas-repo", "--base-url", "http://localhost:8080", "--config", "/path/to/your/config.yaml" ], "env": { "LOG_LEVEL": "INFO" } } } }