mcpField
M
MCP Server for OSCAL

MCP Server for OSCAL

ローカル
github.com/dfkunstlerセキュリティ03 日前に更新

MCP Server for OSCAL について

NIST OSCAL の検索や検証に使うツールを AI アシスタントに提供する MCP サーバーです。OSCAL の実装や概念実証を支援し、既定では同梱データをローカルで使い、スキーマとデータの整合性を検証します。

主な機能

  1. 01OSCAL スキーマとモデル情報の照会
  2. 02Metaschema の制約と定義の検索
  3. 03OSCAL コンテンツの検証
  4. 04OSCAL ドキュメントの検索と読み取り
  5. 05コンポーネント定義とコミュニティ資料の参照
  6. 06起動時の同梱データ整合性チェック

活用シーン

  1. 01有効な OSCAL テンプレートの生成
  2. 02OSCAL ファイルの要件適合確認
  3. 03コントロールやコンポーネント定義の検索
  4. 04OSCAL モデルとドキュメントの調査

MCP 対応

MCP クライアントに OSCAL ツールを公開し、既定では stdio トランスポートでローカル実行します。パッケージにはスタンドアロンの OSCAL Agent も含まれます。

設定

ローカルサーバーの設定はどのクライアントでも共通です。コピーしてクライアントの MCP 設定ファイルに貼り付けてください。

mcp.json · 共通設定
{
"mcpServers": {
"dfkunstler-mcp-server-for-oscal": {
"command": "uvx",
"args": [
"mcp-server-for-oscal"
],
"env": {
"BEDROCK_MODEL_ID": "<BEDROCK_MODEL_ID>",
"OSCAL_KB_ID": "<OSCAL_KB_ID>",
"AWS_PROFILE": "<AWS_PROFILE>",
"AWS_REGION": "<AWS_REGION>",
"LOG_LEVEL": "<LOG_LEVEL>"
}
}
}
}
起動コマンドuvx mcp-server-for-oscal
設定が必要な環境変数
BEDROCK_MODEL_IDAWS Bedrock model ID for OSCAL documentation queries
OSCAL_KB_IDAWS Bedrock Knowledge Base ID for OSCAL documentation
AWS_PROFILEAWS CLI profile name for credential resolution
AWS_REGIONAWS region for Bedrock API calls
LOG_LEVELLogging verbosity level (DEBUG, INFO, WARNING, ERROR)

ローカルサーバーにはマシン上の実行環境(Node.js 18 以上など)が必要です。設定ファイルの場所はクライアントごとに異なります。

パッケージ
pypimcp-server-for-oscal0.7.1

ツール

ツール一覧はまだ取得されていません

ローカルサーバーのツールはマシン上で起動して初めて取得できます。メンテナーはまだツール一覧を提供していません。

詳細

ビルド状況 バージョン PyPI - Python バージョン PyPI PyPI - ダウンロード数 OSCAL GitHub ライセンス

OSCAL 用 MCP サーバー

お気に入りの AI エージェントですぐに OSCAL の専門知識を活用

NIST の Open Security Controls Assessment Language(OSCAL)を扱うためのツールを、AI アシスタント(Claude、Cline、Kiro、Claude Code など)に提供する Model Context Protocol(MCP)サーバーです。多くの早期導入者と同様に、ビジネス関係者に価値を示すための OSCAL の概念実証の実装に、私たちもサポートを必要としていました。公開されている事例が限られていることが理由かもしれませんが、AI エージェント/LLM だけでは、OSCAL に関して一貫性のない結果が多く生成されることがわかりました。この MCP サーバーのツールは、私たちのユースケースでこの問題を最小限に抑えました。皆さんにも同じように役立つことを願っています。

ヒント

使い始めるには、以下のインストールをご覧ください。

目次

機能

この MCP サーバーが提供するツールを組み合わせることで、お好みの AI アシスタントが OSCAL のアーキテクチャ、モデル、ユースケース、要件、実装について、正確で信頼できるガイダンスを提供できるようになります。利用するにあたってツールの仕組みを理解する必要はありませんが、詳細は tools ディレクトリに記載されています。

このサーバーは軽量で、追加のセットアップなしにローカルで実行できます。デフォルトでは、MCP のトランスポートに stdio プロトコルを使用します。トランスポートのセキュリティや認証はまだ実装されていないため、streamable-http トランスポートでサーバーを使用しないでください。

デフォルトのツールは、リモートサービスやリソースに接続しません。必要なコンテンツはすべてサーバーに同梱されています。セキュリティ対策として、同梱コンテンツの基本的なファイル整合性検証を実装しています。ビルド時に、同梱された OSCAL スキーマと事前構築済みのコンテンツデータベースの SHA-256 ハッシュを含むマニフェストを生成します。サーバーの起動時には、両方をマニフェストと照合して検証します。スキーマが一致しない場合はエラーが発生し、起動が中止されます。データベースが一致しない場合は、同梱データベースを破棄して空のデータベースで起動します。

このツール群は、OSCAL スキーマとモデルのメタデータ、Metaschema の許可値・制約・参照・定義の検索、およびソースの読み取り(get_allowed_values、get_constraints、find_references_to、get_definition、get_metaschema_source)、複数レベルのコンテンツ検証、Component Definition のナビゲーション、すべての OSCAL モデルタイプ(カタログ、プロファイル、SSP、アセスメント計画と結果、POA&M、マッピングコレクション)のクエリ・一覧表示・全文検索、コミュニティリソース、ドキュメントを網羅しています。検索ツールは検索と取得のペアで構成されています。text_search_oscal は要素 ID と parentDocumentUuid を返し、get_child_element でその内容を取得できます。また、query_oscal_documentation はページ分割された {title, snippet} の抜粋を返します。ローカルページの場合は docId が含まれ、get_oscal_documentation で行範囲を読み取れます。結果にファイルシステムのパスが含まれることはありません。完全な一覧は tools README を参照してください。

MCP サーバーに加えて、このパッケージには Strands Agents で構築されたスタンドアロンの OSCAL エージェントが含まれています。以下の OSCAL エージェント セクションを参照してください。

OSCAL とは?

OSCAL(Open Security Controls Assessment Language)は、NIST が開発したフレームワークに依存しないベンダーニュートラルな機械可読スキーマのセットです。コントロールから是正計画まで、GRC(ガバナンス、リスク、コンプライアンス)成果物のライフサイクル全体を記述します。OSCAL は、デジタル文書(スプレッドシート、PDF など)を標準ベースの構造化データ形式に置き換えることで、GRC ワークフローの自動化を可能にします。OSCAL について詳しく知るには、まずこの MCP サーバーをインストールしてから、AI に質問してください。または、OSCAL 公式ウェブサイトを参照してください。

MCP とは?

MCP(Model Context Protocol)は、AI アプリケーションを外部システムに接続するためのオープンソース標準です。MCP は、AI アプリケーション用の USB-C ポートのようなものだと考えてください。USB-C が電子機器を接続する標準的な方法を提供するように、MCP は AI アプリケーションを外部システムに接続する標準的な方法を提供します。

使用方法 / 例

以下の例は kiro-cli で作成しましたが、MCP サーバーに対応する任意の AI アシスタントで動作するはずです。

例 1:利用可能な OSCAL モデルについて学ぶ
 % kiro-cli

> /tools trust get_oscal_schema list_oscal_models list_oscal_resources


Tools '@oscal/get_oscal_schema', '@oscal/list_oscal_models', '@oscal/list_oscal_resources' are now trusted. I will not ask for confirmation before running these tools.


> How many GA OSCAL models are there? 


> I'll check the available OSCAL models to find out how many are in GA (Generally Available) status.
Running tool list_oscal_models with the param (from mcp server: oscal)
 ⋮  {}
 - Completed in 0.1s

> There are 8 GA OSCAL models:

Control Layer (3):
- Catalog
- Profile  
- Mapping Collection

Implementation Layer (2):
- Component Definition
- System Security Plan (SSP)

Assessment Layer (3):
- Assessment Plan (SAP)
- Assessment Results (SAR)
- Plan of Action and Milestones (POA&M)

All of these models have "GA" (Generally Available) status, meaning they are stable and ready for production use.
 ▸ Time: 8s
例 2:OSCAL テンプレートの生成
> generate a minimum, valid, OSCAL mapping in JSON for use as a template.

> I'll help you create a minimal, valid OSCAL mapping in JSON. Let me first check what OSCAL models are available to understand the structure.
Running tool list_oscal_models with the param (from mcp server: oscal)
 ⋮  {}
 - Completed in 0.1s

> Now let me get the schema for the mapping-collection model to understand its structure:
Running tool get_oscal_schema with the param (from mcp server: oscal)
 ⋮  {
 ⋮    "model_name": "mapping-collection",
 ⋮    "schema_type": "json"
 ⋮  }
 - Completed in 0.14s

> Based on the schema, I'll create a minimal, valid OSCAL mapping collection template. Here's the absolute minimum required structure:
I'll create the following file: ./oscal-mapping-template.json (using tool: write)
Purpose: Create minimal OSCAL mapping collection template

+     1: {
+     2:   "mapping-collection": {
+     3:     "uuid": "12345678-1234-4567-8901-123456789012",
+     4:     "metadata": {
+     5:       "title": "Sample Mapping Collection",
+     6:       "last-modified": "2026-01-06T20:46:28.034Z",
+     7:       "version": "1.0",
+     8:       "oscal-version": "1.2.0"
+     9:     },
+    10:     "provenance": {
+    11:       "method": "human",
+    12:       "matching-rationale": "semantic",
+    13:       "status": "draft",
+    14:       "mapping-description": "Sample mapping between two control frameworks"
+    15:     },
+    16:     "mappings": [
+    17:       {
+    18:         "uuid": "87654321-4321-7654-1098-210987654321",
+    19:         "source-resource": {
+    20:           "type": "catalog",
+    21:           "href": "https://example.com/source-catalog.json"
+    22:         },
+    23:         "target-resource": {
+    24:           "type": "catalog", 
+    25:           "href": "https://example.com/target-catalog.json"
+    26:         },
+    27:         "maps": [
+    28:           {
+    29:             "uuid": "11111111-2222-3333-4444-555555555555",
+    30:             "relationship": "equivalent",
+    31:             "sources": [
+    32:               {
+    33:                 "type": "control",
+    34:                 "id-ref": "ac-1"
+    35:               }
+    36:             ],
+    37:             "targets": [
+    38:               {
+    39:                 "type": "control",
+    40:                 "id-ref": "access-control-policy"
+    41:               }
+    42:             ]
+    43:           }
+    44:         ]
+    45:       }
+    46:     ]
+    47:   }
+    48: }

Creating: ./oscal-mapping-template.json
 - Completed in 0.8s

> I've created a minimal, valid OSCAL mapping collection template at ./oscal-mapping-template.json. This template includes:

Required elements:
- uuid: Unique identifier for the mapping collection
- metadata: Document metadata with title, last-modified timestamp, version, and OSCAL version
- provenance: Mapping methodology information including method, matching rationale, status, and description
- mappings: Array containing at least one mapping with:
  - uuid: Mapping identifier
  - source-resource and target-resource: References to the catalogs being mapped
  - maps: Array with mapping entries showing relationships between controls

Key features:
- Uses placeholder UUIDs (replace with actual UUIDs in production)
- Maps a source control "ac-1" to target control "access-control-policy" with "equivalent" relationship
- Includes minimal required fields only
- Valid JSON structure conforming to OSCAL 1.2.0 schema

You can customize this template by:
- Replacing placeholder UUIDs with real ones
- Updating the resource URLs to point to actual catalogs
- Adding more mapping entries in the maps array
- Modifying control IDs and relationships as needed
 ▸ Time: 21s

例 3:オープンソースの OSCAL カタログを見つける
> What are some open source OSCAL catalogs?

Running tool list_oscal_resources with the param (from mcp server: oscal)
 ⋮  {}
 - Completed in 0.51s

> Based on the OSCAL community resources, here are some notable open source OSCAL catalogs:

## Government/Official Catalogs

Australian Cyber Security Centre (ACSC)
- Information Security Manual (ISM) controls in OSCAL format
- Essential Eight Maturity Levels (ML1, ML2, ML3)
- Available at: https://www.cyber.gov.au/ism/oscal

CMS Acceptable Risk Safeguards (ARS)
- Tailored NIST SP 800-53 controls for Centers for Medicare and Medicaid Services
- Available at: https://github.com/CMSgov/ars-machine-readable

GovTech Singapore
- ICT&SS Policy catalog and profile for low-risk systems
- Available at: https://github.com/GovtechSG/tech-standards

## Industry/Standards Organizations

Center for Internet Security (CIS)
- CIS Critical Security Controls (formerly Top 18/20)
- Available at: https://github.com/CISecurity/CISControls_OSCAL/

Cloud Security Alliance (CSA)
- Cloud Controls Matrix v4 in OSCAL format
- Available at: https://cloudsecurityalliance.org/artifacts/ccm-machine-readable-bundle-json-yaml-oscal/

NIST SP 800-171 (Community)
- Maintained by Fathom5
- Available at: https://github.com/FATHOM5/oscal/tree/main/content/SP800-171/oscal-content

## Community Collections

CivicActions Component Definitions
- Cloud services, software, security and privacy controls
- Available at: https://github.com/CivicActions/oscal-component-definitions

RedHat OSCAL Content
- Component definitions: https://github.com/RedHatProductSecurity/oscal-component-definitions
- Custom profiles: https://github.com/RedHatProductSecurity/oscal-profiles

Brad Hards ISM Catalog
- Australian Government ISM controls (community version)
- Available at: https://github.com/bradh/ism-oscal

These catalogs provide ready-to-use OSCAL content for various compliance frameworks and can serve as templates or starting points for your own OSCAL implementations.
 ▸ Time: 15s
例 4:AWS サービスに関する情報を得るためにコンポーネント定義を照会する
[OSCAL] > what components are available for Cognito?

Running tool list_components with the param (from mcp server: oscal-dev)
 ⋮  {}
 - Completed in 0.49s

> There are 3 Cognito-related components available:

1. Cognito Identity - from "Cognito Identity Pools" component definition
2. Cognito Sync - from "Amazon Cognito Sync" component definition  
3. Cognito Identity Provider - from "Amazon Cognito Identity User Pools" component definition

 ▸ Time: 7s

[OSCAL] > show me the names and IDs from all 3 components

Running tool query_component_definition with the param (from mcp server: oscal-dev)
 ⋮  {
 ⋮    "query_type": "by_uuid",
 ⋮    "query_value": "7fd5d354-6ec4-4f8e-8c5f-2904086bb597"
 ⋮  }
Running tool query_component_definition with the param (from mcp server: oscal-dev)
 ⋮  {
 ⋮    "query_type": "by_uuid",
 ⋮    "query_value": "a1d82e1d-3733-41f4-bc09-90ab47b9e82f"
 ⋮  }
Running tool query_component_definition with the param (from mcp server: oscal-dev)
 ⋮  {
 ⋮    "query_type": "by_uuid",
 ⋮    "query_value": "2519deaf-4612-4c70-aba2-d9080ae3c816"
 ⋮  }
 - Completed in 0.13s

 - Completed in 0.6s

 - Completed in 0.6s

> 1. Cognito Sync
- Service ID: Cognito Sync
- API Endpoint Prefix: cognito-sync
- ARN Namespace: cognito-sync

2. Cognito Identity Provider
- Service ID: Cognito Identity Provider
- API Endpoint Prefix: cognito-idp
- ARN Namespace: cognito-idp

3. Cognito Identity
- Service ID: Cognito Identity
- API Endpoint Prefix: cognito-identity
- ARN Namespace: cognito-identity

 ▸ Time: 12s

[OSCAL] > show me everything in the EC2 component definition

Running tool query_component_definition with the param (from mcp server: oscal-dev)
 ⋮  {
 ⋮    "component_definition_filter": "Elastic Compute Cloud (EC2)",
 ⋮    "query_type": "all"
 ⋮  }
 - Completed in 0.14s

> The EC2 component definition contains 1 component:

Component: EC2
- UUID: 66345eb9-7c0d-435c-b2b5-675fd977de80
- Type: service
- Description: Empty

Properties:
- Service ID: EC2
- Version: 2016-11-15
- Availability: REGIONAL and ZONAL
- Full Name: Elastic Compute Cloud (EC2)
- API Endpoint Prefix: ec2
- ARN Namespace: ec2

Regional Availability (34 regions):
Africa (Cape Town), Asia Pacific (Hong Kong, Tokyo, Seoul, Osaka, Mumbai, Hyderabad, Singapore, Sydney, Jakarta, Melbourne, Malaysia), Canada (Central, Calgary), China (Beijing, Ningxia), 
Europe (Frankfurt, Zurich, Stockholm, Milan, Spain, Ireland, London, Paris), Israel (Tel Aviv), Middle East (UAE, Bahrain), South America (Sao Paulo), US East (N. Virginia, Ohio), AWS 
GovCloud (US-East, US-West), US West (N. California, Oregon)

 ▸ Time: 10s

[OSCAL] > what's the ID of the Jakarta region?

> Based on the EC2 component data I just retrieved, the Jakarta region's resource fragment ID is:

8041109b-0a0b-46cc-bddb-91d703667637

This is the UUID for the "Asia Pacific (Jakarta)" region component.

 ▸ Time: 3s

[OSCAL] > get the region ID from that component

Running tool query_component_definition with the param (from mcp server: oscal-dev)
 ⋮  {
 ⋮    "query_type": "by_uuid",
 ⋮    "query_value": "8041109b-0a0b-46cc-bddb-91d703667637"
 ⋮  }
 - Completed in 0.13s

> The region ID for Jakarta is: ap-southeast-3

 ▸ Time: 7s

[OSCAL] > /quit

インストール

お好みの IDE、AI エージェント、チャットボットなどで MCP サーバーを使用するため、以下の手順に従ってセットアップしてください。サーバーは次の 2 つの方法で配布されています。

  • MCP Bundle (.mcpb):Claude Desktop など、MCPB 対応デスクトップアプリ向けの、ワンクリックでインストールできる単一ファイルです。各GitHub リリースに添付されています。以下のMCP Bundleをご覧ください。
  • PyPI の Python パッケージ:あらゆる MCP クライアントで動作します。uvx コマンド(以下に記載)は、起動時に PyPI からサーバーの最新バージョンを自動的にダウンロードします。

メモ

開発環境でセットアップする場合は、DEVELOPING.mdをご覧ください。

MCP Bundle

MCP Bundleは、サーバー、そのマニフェスト、固定された依存関係のバージョンを 1 つのファイルにまとめたものです。ホストアプリが Python と依存関係をインストールするため、以下の前提条件は適用されません。

  1. 最新リリースからmcp-server-for-oscal-<version>.mcpbをダウンロードします。
  2. MCPB 対応アプリでファイルを開きます。Claude Desktop では、ファイルをダブルクリックするか、Settings > Extensionsにドラッグし、Installをクリックします。
  3. 必要に応じて、拡張機能の設定を行います。すべて任意の設定です。デフォルトでは、同梱コンテンツを使って完全にローカルで実行されます。
設定環境変数説明
OSCAL ドキュメントディレクトリOSCAL_DOCUMENTS_DIR同梱コンテンツとともにインデックス化する、独自の OSCAL JSON ファイルのディレクトリです。独自の OSCAL コンテンツの使用をご覧ください。
リモート URI を許可OSCAL_ALLOW_REMOTE_URISツールがhttp/https URI から OSCAL コンテンツを取得できるようにします。デフォルトではオフです。
Bedrock ナレッジベース IDOSCAL_KB_IDドキュメントへの問い合わせに使用する Amazon Bedrock Knowledge Base です。空欄にすると、同梱のローカルドキュメント検索が使用されます。
AWS プロファイル/AWS リージョンAWS_PROFILE / AWS_REGIONBedrock Knowledge Base の問い合わせに使用する認証情報とリージョンです。
ログレベルLOG_LEVELDEBUG、INFO(デフォルト)、WARNING、またはERRORです。

以下のuvxを使用する設定では起動時に最新の PyPI リリースを取得しますが、バンドルはインストールしたバージョンのままです。アップグレードするには、新しいリリースの.mcpbをダウンロードしてインストールしてください。

前提条件

これらは PyPI パッケージ(以下のuvxを使用するすべての設定)に適用され、MCP Bundle には適用されません。

  • Python 用uvパッケージマネージャー(インストール手順)
  • Python 3.13 以降(uv python install 3.14)。それ以降の Python バージョンでもサーバーが動作する可能性はありますが、現時点では 3.13 と 3.14 のみでテストしています。
IDE と AI ツールの設定

このサーバーは stdio(標準入出力)経由で通信し、Model Context Protocol をサポートするさまざまな IDE やエージェント型ツールと統合できます。以下に示す設定例は、お好みの IDE/チャットボット/エージェント向けです。

設定形式

ほとんどの MCP 対応ツールは、FastMCP のドキュメントで説明されている JSON 設定形式を使用します。基本的な構造は次のとおりです。

{
  "mcpServers": {
    "oscal": {
      "command": "uvx",
      "args": ["mcp-server-for-oscal@latest"]
    }
  }
}

一般的な実行時の使用では、MCP サーバーに追加の設定は必要ありません。必要に応じて、FastMCP のドキュメントで説明されているように、"env": {}オブジェクトで実行時の環境変数を設定できます。使用可能なオプションについては、dotenv.exampleファイルをご覧ください。

メモ

dotenv ファイルが必要なのは開発環境のみです。

Kiro の設定

追加オプションについては、Kiro の MCP ドキュメントをご覧ください。.kiro/settings/mcp.jsonに追加します。

{
  "mcpServers": {
    "oscal": {
      "command": "uvx",
      "args": ["mcp-server-for-oscal@latest"],
      "env": {},
      "disabled": false,
      "autoApprove": [
        "*"
      ]
    }
  }
}
Claude Desktop

最も簡単なインストール方法は、MCP Bundleを使用することです。Claude Desktop が Python と依存関係を管理するため、独自の OSCAL ドキュメントのディレクトリなど、任意の設定も構成できます。

または、Claude Desktop で Settings > Developer > Edit Config を開き、claude_desktop_config.json(macOS では ~/Library/Application Support/Claude/claude_desktop_config.json、Windows では %APPDATA%\Claude\claude_desktop_config.json にあります)に次の内容を追加します。

{
  "mcpServers": {
    "oscal": {
      "command": "uvx",
      "args": ["mcp-server-for-oscal@latest"]
    }
  }
}
VS Code

MCP: Open User Configuration コマンドを実行すると、ユーザープロファイル内の mcp.json ファイルが開きます。その後、サーバー構成を手動でファイルに追加できます。詳細やその他のオプションについては、VSCode/Copilot のドキュメントをご覧ください。

{
  "servers": {
    "oscal": {
      "command": "uvx",
      "args": ["mcp-server-for-oscal@latest"]
    }
  }
}

独自の OSCAL コンテンツを使用する

デフォルトでは、サーバーには OSCAL コンテンツ(AWS コンポーネント定義、OSCAL ドキュメント、スキーマ)が同梱されています。また、独自の OSCAL JSON ファイル(カタログ、SSP、プロファイル、評価計画、評価結果、POA&M、マッピングコレクション)があるディレクトリをサーバーに指定することもできます。サーバーは起動時にそれらをインデックス化し、すべてのクエリツールと一覧表示ツールから利用できるようにします。

OSCAL_DOCUMENTS_DIR 環境変数に、OSCAL コンテンツのディレクトリへのパスを設定します。パスには絶対パス、またはサーバーのパッケージディレクトリからの相対パスを指定できます。たとえば、MCP の構成では次のように指定します。

{
  "mcpServers": {
    "oscal": {
      "command": "uvx",
      "args": ["mcp-server-for-oscal@latest"],
      "env": {
        "OSCAL_DOCUMENTS_DIR": "/path/to/your/oscal/files"
      }
    }
  }
}

サーバーはディレクトリを再帰的にスキャンして .json ファイルを探し、見つかった有効な OSCAL ドキュメントをインデックス化します。独自のコンテンツは同梱のコンテンツと統合され、同じセッション内でどちらもクエリできます。ディレクトリ内の Markdown(.md)ファイルはドキュメントとしてインデックス化されます。query_oscal_documentation で検索でき(Bedrock Knowledge Base が構成されている場合も同様です)、get_oscal_documentation で docId を指定して読み取れます。

以下の環境変数で、OSCAL ストアの動作を制御できます。

変数デフォルト説明
OSCAL_DOCUMENTS_DIR(empty)独自の OSCAL JSON ファイルを含むディレクトリです。空の場合はスキャンされません。
OSCAL_STORE_DB_PATH(empty)永続化する SQLite データベースへのパスです。設定すると、毎回インデックスを再構築する代わりに、サーバーの再起動後もインデックスが再利用されます。
OSCAL_STORE_CACHE_SIZE100メモリ内 LRU キャッシュに保持する、解析済み OSCAL ドキュメントの最大数です。

ヒント

OSCAL ドキュメントを大量にお持ちの場合は、OSCAL_STORE_DB_PATH の設定をおすすめします。以降の起動時にサーバーがインデックス化する必要があるのは、新規または変更されたファイルのみです。古いバージョンのサーバーで作成されたデータベースは、初回起動時にその場でアップグレードされます。

OSCAL エージェント

MCP サーバーに加えて、このパッケージにはStrands Agentsで構築されたスタンドアロンの OSCAL エージェントが含まれています。このエージェントは MCP サーバーと同じツールを使用し、直接実行できます。

# Via entry point
oscal-agent

# Or via module
python -m mcp_server_for_oscal.oscal_agent

エージェントには AWS Bedrock へのアクセスが必要で、MCP サーバーと同じ構成用環境変数を使用します。

セッションの永続化

エージェントはセッションの永続化に対応しているため、会話履歴とエージェントの状態を呼び出し間で維持できます。ローカルファイルシステムと Amazon S3 ストレージから選択できます。

# File-based session storage (new session)
oscal-agent --session-storage file

# Resume a previous session
oscal-agent --session-storage file --session-id <your-session-id>

# S3-based session storage
oscal-agent --session-storage s3 --session-s3-bucket my-bucket

--session-id を指定せずにセッションストレージを有効にすると、UUID が自動生成され、後から再開できるように表示されます。セッションのデフォルト値は環境変数でも設定できます(DEVELOPING.mdをご覧ください)。

会話の管理

長時間にわたるワークフローでは、会話マネージャーを選択して、エージェントのコンテキストウィンドウの維持方法を制御できます。

# Summarize older messages to keep context manageable
oscal-agent --session-storage file --conversation-manager summarizing

# Sliding window (SDK default behavior)
oscal-agent --conversation-manager sliding-window

# No conversation management
oscal-agent --conversation-manager null

既存のツールと機能はさまざまな用途をカバーしていますが、包括的とはとても言えません。フィードバック、機能のリクエスト、質問、バグ報告は、GitHub issueでお寄せください。直接の貢献も歓迎します。

開発

始めるにはDEVELOPINGをご覧ください。

セキュリティ

詳細については、CONTRIBUTINGをご覧ください。

既知の制限事項

  • ChatGPTのMCPサポートが限られているため、現時点ではこのMCPサーバーをChatGPTで使用できません。
  • streamable-httpトランスポートでは、認証やトランスポートセキュリティはまだ実装されていません。本番環境のワークロードではstdioを使用してください。

関連プロジェクト

AWSサービス向けの実験的なコンポーネント定義は、このMCPサーバーにバンドルされています。このコンテンツは、AWS LabsプロジェクトのOSCAL Content for AWS Servicesでご覧いただけます。

MCP Server for OSCALは、モデルレベルのコンテンツ検証を含む、型付きOSCALモデルにoscal-bindingsを使用しています。

ライセンス

このプロジェクトはApache-2.0ライセンスの下でライセンスされています。

コメント

MCP は初めてですか?

プロトコルの概要から最初のサーバーの導入まで、よくある疑問にまとめて答えます。

AI アプリケーションが外部のツールやデータソースに統一的な方法で接続するためのオープンなプロトコルです。クライアントはモデルとの対話を担い、MCP サーバーはツール・リソース・プロンプトテンプレートを提供します。標準メッセージでやり取りするため、1 つのサーバーを複数のクライアントで再利用できます。