MCP Server for OSCAL について
MCP Server for OSCAL は、NIST の OSCAL(Open Security Controls Assessment Language)を扱うツールを AI アシスタントに提供する MCP サーバーです。OSCAL の概念実証や GRC ワークフローの自動化を行う利用者を想定しています。同梱コンテンツは起動時にハッシュで検証されます。
主な機能
- 01OSCAL のモデル、スキーマ、リソースを扱うツール
- 02デフォルトでの stdio トランスポートによるローカル実行
- 03同梱コンテンツの SHA-256 整合性チェック
- 04OSCAL_DOCUMENTS_DIR による独自 OSCAL JSON の読み込み
- 05任意の SQLite インデックスとLRU キャッシュ
活用シーン
- 01AI アシスタントによる最小限の有効な OSCAL JSON テンプレートの生成
- 02AWS サービスのコンポーネント定義の検索
- 03オープンソースの OSCAL カタログとリソースの調査
MCP 対応
本プロジェクトは、OSCAL コンテンツの照会と処理用ツールを MCP クライアントに公開する MCP サーバーです。
設定
ローカルサーバーの設定はどのクライアントでも共通です。コピーしてクライアントの MCP 設定ファイルに貼り付けてください。
uvx mcp-server-for-oscalBEDROCK_MODEL_IDAWS Bedrock model ID for OSCAL documentation queriesOSCAL_KB_IDAWS Bedrock Knowledge Base ID for OSCAL documentationAWS_PROFILEAWS CLI profile name for credential resolutionAWS_REGIONAWS region for Bedrock API callsLOG_LEVELLogging verbosity level (DEBUG, INFO, WARNING, ERROR)ローカルサーバーにはマシン上の実行環境(Node.js 18 以上など)が必要です。設定ファイルの場所はクライアントごとに異なります。
ツール
ローカルサーバーのツールはマシン上で起動して初めて取得できます。メンテナーはまだツール一覧を提供していません。
詳細
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 サーバーが提供するツールは、OSCAL のアーキテクチャ、モデル、ユースケース、要件、実装について、正確で信頼できるガイダンスをお好みの AI アシスタントが提供できるようにすることを目的としています。ツールの仕組みを理解していなくても利用できます。詳細はツールディレクトリをご覧ください。
このサーバーは軽量で、追加のセットアップなしでローカルで実行できるように設計されています。デフォルトでは、MCP のトランスポートに stdio プロトコルを使用します。トランスポートのセキュリティや認証をまだ実装していないため、streamable-http トランスポートでの使用は試みないでください。
デフォルトのツールは、リモートサービスやリソースに接続しません。必要なコンテンツはすべてサーバーに同梱されています。セキュリティ対策として、同梱コンテンツの基本的なファイル整合性検証を実装しています。ビルド時に、すべてのコンテンツファイルの SHA-256 ハッシュを含むマニフェストを生成します。サーバーの起動時には毎回、すべてのコンテンツファイルをハッシュマニフェストと照合して検証します。不一致がある場合はエラーが発生し、起動が中止されます。
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 サーバーを使用するため、以下の手順に従ってセットアップしてください。このサーバーは PyPI の Python パッケージとして公開されています。uvx コマンド(以下に表示)は、起動時に PyPI からサーバーの最新バージョンを自動的にダウンロードします。
メモ
開発用にセットアップする場合は、DEVELOPING.md を参照してください。
前提条件
- Python 用の
uvパッケージマネージャー(インストール手順) - Python 3.11 以降(
uv install python 3.12)。それ以降の Python バージョンでも動作する可能性がありますが、現在は 3.11 と 3.12 のみでテストしています。
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
~/.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 ドキュメントをインデックス化します。独自のコンテンツは同梱コンテンツに統合され、同じセッション内でどちらもクエリできます。
OSCAL ストアの動作は、次の 2 つの環境変数でも制御できます。
| 変数 | デフォルト | 説明 |
|---|---|---|
OSCAL_DOCUMENTS_DIR | (empty) | OSCAL JSON ファイルを含むディレクトリです。空の場合はスキャンされません。 |
OSCAL_STORE_DB_PATH | (empty) | 永続化する SQLite データベースへのパスです。設定すると、起動のたびにインデックスを再構築する代わりに、再起動後もインデックスが再利用されます。 |
OSCAL_STORE_CACHE_SIZE | 100 | インメモリ 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 で確認できます。
OSCAL 用 MCP サーバーは、OSCAL コンテンツの検証など、一部の機能に compliance-trestle を使用しています。
ライセンス
このプロジェクトは Apache-2.0 ライセンスの下でライセンスされています。
コメント
AI アプリケーションが外部のツールやデータソースに統一的な方法で接続するためのオープンなプロトコルです。クライアントはモデルとの対話を担い、MCP サーバーはツール・リソース・プロンプトテンプレートを提供します。標準メッセージでやり取りするため、1 つのサーバーを複数のクライアントで再利用できます。