Open Policy Agent (OPA) REST API MCP Server
MCPサーバー
このプロジェクトは、AG2 のMCP ビルダーを使用して自動生成された、指定された OpenAPI URL - https://api.apis.guru/v2/specs/openpolicy.local/0.28.0/openapi.json用の MCP (マルチエージェント会話プロトコル) サーバーです。
前提条件
Python 3.9以上
pipとuv
Related MCP server: swaggbot
インストール
リポジトリをクローンします。
git clone <repository-url> cd mcp-server依存関係のインストール: .devcontainer/setup.shスクリプトは
pip install -e ".[dev]"を使用して依存関係のインストールを処理します。dev コンテナを使用していない場合は、このコマンドを手動で実行できます。pip install -e ".[dev]"あるいは、
uvを使用することもできます。uv pip install --editable ".[dev]"
発達
このプロジェクトでは、リンティングとフォーマットにruffを使用し、静的型チェックにmypy使用し、テストにpytest使用します。
リンティングとフォーマット
リンティングの問題を確認するには:
ruff checkコードをフォーマットするには:
ruff formatこれらのコマンドは、scripts/lint.shスクリプト経由でも利用できます。
静的分析
静的分析を実行するには (mypy、bandit、semgrep):
./scripts/static-analysis.shこのスクリプトは、 .pre-commit-config.yamlでコミット前フックとしても構成されます。
テストの実行
カバレッジ付きテストを実行するには:
./scripts/test.shpytest が実行され、カバレッジレポートが生成されます。レポートとクリーンアップを組み合わせたものを作成するには、以下を使用します。
./scripts/test-cov.shコミット前フック
このプロジェクトでは、 .pre-commit-config.yamlで定義されたコミット前フックを使用します。フックをインストールするには、以下の手順に従います。
pre-commit installフックは各コミットの前に自動的に実行されます。
サーバーの実行
MCPサーバーは、mcp_server/main.pyスクリプトを使用して起動できます。様々なトランスポートモード(例: stdio 、 sse )をサポートしています。
サーバーを起動するには(例:stdio モード):
python mcp_server/main.py stdioサーバーは環境変数を使用して設定できます。
CONFIG_PATH: JSON 構成ファイルへのパス (例: mcp_server/mcp_config.json )。CONFIG: 構成を含む JSON 文字列。SECURITY: セキュリティ パラメータ (API キーなど) の環境変数。
これらがどのようにロードされるかの詳細については、 mcp_server/main.pyのif __name__ == "__main__":ブロックを参照してください。
tests/test_mcp_server.pyファイルは、テストのためにプログラムでサーバーを起動して操作する方法を示しています。
建築と出版
このプロジェクトは、ビルドと公開にHatchを使用しています。プロジェクトをビルドするには:
hatch buildプロジェクトを公開するには:
hatch publishこれらのコマンドは、scripts/publish.shスクリプト経由でも利用できます。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
An MCP server that provides an API to LLMs to manage their JumpCloud resources.
- mcpOAuthcom.gibsonai
GibsonAI MCP server: manage your databases with natural language
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
MCP server that lets AI assistants use all OneSchema features exposed via the public API.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceThis MCP Server provides a natural language interface to interact with Google's Policy Analyzer API, allowing users to analyze policies and evaluate compliance through conversations.-
- AlicenseNot gradedqualityDmaintenanceTransforms Swagger/OpenAPI documented APIs into conversational interfaces, enabling natural language interaction with APIs through an MCP server for use with AI assistants.4MIT
- AlicenseCqualityDmaintenanceAn MCP server that exposes Oracle Cloud Infrastructure (OCI) control plane to LLM clients, enabling management of compute, networking, storage, databases, and more through natural language.551Apache 2.0
- AlicenseNot gradedqualityDmaintenanceA lightweight MCP server that enables natural language interaction with Kubernetes clusters, allowing management of pods, deployments, namespaces, and cluster resources through conversational queries or API endpoints.1MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ag2-mcp-servers/open-policy-agent-opa-rest-api'
If you have feedback or need assistance with the MCP directory API, please join our Discord server