
MCP Server for OSCAL
io.github.dfkunstler由 GitHub 账号 dfkunstler 发布v0.7.1更新于 Oct 29, 2026
AI agent tools for Open Security Controls Assessment Language (OSCAL)
概览
本地 MCP 服务器,为 AI 助手提供查询、校验和搜索 NIST OSCAL 架构、模型与合规文档的工具。
- 可以做什么
- 查询 OSCAL 架构、模型元数据、Metaschema 允许值、约束、引用与定义,并读取 Metaschema 源文件
- 对 OSCAL 内容做多层级校验,并浏览组件定义
- 对各类 OSCAL 模型(目录、概要、SSP、评估计划与结果、POA&M、映射集合)进行查询、列举与全文搜索
- 搜索并读取文档片段,列举社区 OSCAL 资源
- 将指定目录下自有的 OSCAL JSON 文件与 Markdown 文档与内置内容一并建立索引
- 适用场景
- 适合需要助手就 OSCAL 结构与 GRC 制品给出准确一致指导的场景,例如生成合法的 OSCAL 模板、按架构校验文档,或查阅内置的 AWS 组件定义与社区目录。
- 运行要求
- 通过 stdio 在本地运行。PyPI 包需要 uv 包管理器和 Python 3.13 或更高版本;MCP Bundle 安装方式会自行处理 Python 与依赖。所有设置均为可选:OSCAL_DOCUMENTS_DIR、OSCAL_STORE_DB_PATH、OSCAL_ALLOW_REMOTE_URIS、OSCAL_KB_ID、AWS_PROFILE、AWS_REGION、BEDROCK_MODEL_ID 与 LOG_LEVEL。Bedrock 文档查询需要 AWS 凭证。
安装
在 SourceWeft 中
- 打开 控制台中的 MCP Server for OSCAL,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
MCP Server for OSCAL
Instant OSCAL expertise for your favorite AI agentA Model Context Protocol (MCP) server that provides AI assistants (Claude, Cline, Kiro, Claude Code, etc.) with tools to work with NIST's Open Security Controls Assessment Language (OSCAL). Like many early adopters, we needed help implementing OSCAL proofs-of-concept to demonstrate value to business stakeholders. Perhaps due to limited availability of examples in the public domain, we found that most AI agents/LLMs alone produced inconsistent results related to OSCAL. The tools in this MCP server minimized that problem for our use-case and we hope it does the same for you.
[!TIP] To get started, see Installation below.
Contents
- Features: what the tools cover, local-only operation, and integrity checks
- What is OSCAL? and What is MCP?: background
- How to use / examples: sample sessions covering models, templates, catalogs, and AWS component definitions
- Installation: one-click MCP Bundle (
.mcpb) for Claude Desktop, or the PyPI package with configuration for Kiro, Claude Desktop, and VS Code - Using your own OSCAL Content:
OSCAL_DOCUMENTS_DIRand store settings - OSCAL Agent: the standalone Strands/Bedrock agent, sessions, and conversation management
- Development, Security, Known limitations, Related projects, License
Features
Together, the tools provided by this MCP server are meant to enable your preferred AI assistant to provide accurate, authoritative guidance about OSCAL architecture, models, use-cases, requirements, and implementation. You don't need to understand the tools to use them, but details are in the tools directory.
The server is lightweight and meant to run locally without additional setup. By default, it uses stdio protocol for MCP transport. Do not attempt to use the server with streamable-http transport, as we've not yet implemented transport security or authentication.
The default tools should not connect to any remote services or resources - all required content is bundled with the server. As a security measure, we've implemented basic file integrity verification for bundled content. At build-time we generate manifests including SHA-256 hashes of the bundled OSCAL schemas and the pre-built content database. Each time the server starts, both are verified against their manifests. A schema mismatch produces an error and prevents startup; a database mismatch causes the server to discard the bundled database and start with an empty one.
The tools cover OSCAL schemas and model metadata, Metaschema allowed-values, constraint, reference, and definition lookup plus source reading (get_allowed_values, get_constraints, find_references_to, get_definition, get_metaschema_source), multi-level content validation, Component Definition navigation, query/list/full-text search for every OSCAL model type (catalogs, profiles, SSPs, assessment plans and results, POA&Ms, mapping collections), community resources, and documentation. Search tools come in search/fetch pairs: text_search_oscal returns element IDs plus parentDocumentUuid that get_child_element resolves, and query_oscal_documentation returns paged {title, snippet} passages, with a docId on local pages that get_oscal_documentation reads as a line range. Results never include filesystem paths. See the tools README for the full list.
In addition to the MCP server, the package includes a standalone OSCAL agent built with Strands Agents. See the OSCAL Agent section below.
What is OSCAL?
OSCAL (Open Security Controls Assessment Language) is a set of framework-agnostic, vendor-neutral, machine-readable schemas developed by NIST that describe the full life cycle of GRC (governance, risk, compliance) artifacts, from controls to remediation plans. OSCAL enables automation of GRC workflows by replacing digital paper (spreadsheets, PDFs, etc.) with a standard-based structured data format. To learn more about OSCAL, install this MCP server then ask your AI. Or see the official OSCAL website.
What is MCP?
MCP (Model Context Protocol) is an open-source standard for connecting AI applications to external systems. Think of MCP like a USB-C port for AI applications. Just as USB-C provides a standardized way to connect electronic devices, MCP provides a standardized way to connect AI applications to external systems.
How to use / examples
Examples below were created with kiro-cli, but should work with any AI assistant that supports MCP servers.
Example 1: Learn about available OSCAL models
Example 2: OSCAL template generation
Example 3: Discover open source OSCAL catalogs
Example 4: Query component definitions for information about AWS services
Installation
Follow these instructions to setup the MCP server for use with your preferred IDE, AI agent, chatbot, etc. The server is distributed two ways:
- MCP Bundle (
.mcpb): a single-file, one-click install for MCPB-compatible desktop apps such as Claude Desktop. Attached to every GitHub release. See MCP Bundle below. - Python package on PyPI: works with any MCP client. The
uvxcommand (shown below) automatically downloads the latest version of the server from PyPI on startup.
[!NOTE] To setup for development instead, see DEVELOPING.md
MCP Bundle
An MCP Bundle packages the server, its manifest, and locked dependency versions into one file. The host app installs Python and the dependencies for you, so the prerequisites below don't apply.
- Download
mcp-server-for-oscal-<version>.mcpbfrom the latest release. - Open the file with your MCPB-compatible app. In Claude Desktop, double-click it or drag it onto Settings > Extensions, then click Install.
- Optionally, configure the extension's settings. All are optional; the defaults run fully locally with the bundled content.
Unlike the uvx configurations below, which fetch the latest PyPI release on startup, a bundle stays at the version you installed. To upgrade, download and install the .mcpb from a newer release.
Prerequisites
These apply to the PyPI package (every configuration below that uses uvx), not to the MCP Bundle.
uvpackage manager for Python (Installation instructions)- Python 3.13 or higher (
uv python install 3.14). The server may work with later versions of Python, but we only test 3.13 & 3.14 for now.
Configuring IDEs and AI Tools
This server communicates via stdio (standard input/output) and can be integrated with various IDEs and agentic tools that support the Model Context Protocol. The configuration examples shown below are for your preferred IDE / chatbot / agent.
Configuration Format
Most MCP-compatible tools use a JSON configuration format described in the FastMCP documentation. Here's the basic structure:
For typical, runtime use of the MCP server, additional configuration should not be required. If needed, runtime environment variables can be configured in an "env": {} object as described in the FastMCP documentation. See the file dotenv.example for available options.
[!Note] A dotenv file is only needed in a development environment.
Kiro Configuration
See Kiro's MCP documentation for additional options. Add to your .kiro/settings/mcp.json:
Claude Desktop
The easiest way to install is with the MCP Bundle. Claude Desktop manages Python and dependencies for you, and lets you configure optional settings such as a directory of your own OSCAL documents.
Alternatively, open Settings > Developer > Edit Config in Claude Desktop and add the following to claude_desktop_config.json (located at ~/Library/Application Support/Claude/claude_desktop_config.json on macOS or %APPDATA%\Claude\claude_desktop_config.json on Windows):
VS Code
Run the MCP: Open User Configuration command, which opens the mcp.json file in your user profile. You can then manually add the server configuration to the file. See the VSCode/Copilot docs for additional options and details.
Using your own OSCAL Content
By default, the server ships with bundled OSCAL content (AWS component definitions, OSCAL documentation, and schemas). You can also point the server at a directory of your own OSCAL JSON files — catalogs, SSPs, profiles, assessment plans, assessment results, POA&Ms, or mapping collections. The server indexes them at startup and makes them available through all query and list tools.
Set the OSCAL_DOCUMENTS_DIR environment variable to the path of your OSCAL content directory. The path can be absolute or relative to the server's package directory. For example, in your MCP configuration:
The server scans the directory recursively for .json files and indexes any valid OSCAL documents it finds. Your content is merged with the bundled content — both are queryable in the same session. Markdown (.md) files in the directory are indexed as documentation: query_oscal_documentation searches them (also when a Bedrock Knowledge Base is configured), and get_oscal_documentation reads them by docId.
These environment variables control the OSCAL store behavior:
[!TIP] Setting
OSCAL_STORE_DB_PATHis recommended if you have a large collection of OSCAL documents. The server only needs to index new or changed files on subsequent startups. A database created by an older server version is upgraded in place on first start.
OSCAL Agent
In addition to the MCP server, the package includes a standalone OSCAL agent built with Strands Agents. The agent uses the same tools as the MCP server and can be run directly:
The agent requires AWS Bedrock access and uses the same configuration environment variables as the MCP server.
Session Persistence
The agent supports session persistence so that conversation history and agent state survive across invocations. Choose between local filesystem or Amazon S3 storage:
When session storage is enabled without a --session-id, a UUID is auto-generated and displayed so you can resume later. Session defaults can also be set via environment variables (see DEVELOPING.md).
Conversation Management
For long-running workflows, you can select a conversation manager to control how the agent's context window is maintained:
Existing tools and features cover a variety of use-cases but are far from comprehensive. Please share your feedback, feature requests, questions, or bug reports in a GitHub issue. Direct contributions are wanted and welcome.
Development
See DEVELOPING to get started.
Security
See CONTRIBUTING for more information.
Known limitations
- It's not yet possible to use this MCP server with ChatGPT due to limited MCP support by ChatGPT.
- The
streamable-httptransport does not yet implement authentication or transport security. Usestdiofor production workloads.
Related projects
Experimental Component Definitions for AWS services are bundled with this MCP server. You can find that content in the AWS Labs project OSCAL Content for AWS Services.
MCP Server for OSCAL uses oscal-bindings for its typed OSCAL models, including model-level content validation.
License
This project is licensed under the Apache-2.0 License.
来源:README.md,提交 599a41d
工具
0版本历史
11- v0.7.1最新Oct 29, 2026
- v0.7.0Oct 25, 2026
- v0.6.3Oct 23, 2026
- v0.6.2Oct 22, 2026
- v0.6.1Oct 11, 2026
- v0.6.0Oct 10, 2026
- v0.5.4Oct 3, 2026
- v0.5.3Oct 3, 2026
- v0.5.2Oct 1, 2026
- v0.5.1Oct 1, 2026
- v0.5.0Sep 30, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分