Token导航 LogoToken导航TokenDH.com
Ansible Collection MCP Audit logo
开发工具stdio官方级别未说明来源级核验

Ansible Collection MCP Audit

MCP Server

Ansible集合,用于测试和审计Model Context Protocol (MCP)服务器,提供全面的模块来验证MCP服务器实现、测试工具、资源和提示,并具备详细的报告功能。

工具数

0

提示词数

0

GitHub Stars

1

资源数

0
服务器测试自动化测试Python模型集成

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

tosin2013

提供方

tosin2013

最后核验

2026/5/17 20:19

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

pip install -r requirements.txt

详细介绍

Ansible收集-到2013.mcp_audit

![Code Quality](https://github.com/tosin2013/ansible-collection-mcp-audit/actions/workflows/quality.yml) ![Ansible Sanity](https://github.com/tosin2013/ansible-collection-mcp-audit/actions/workflows/sanity.yml) ![Security](https://github.com/tosin2013/ansible-collection-mcp-audit/actions/workflows/security.yml) ![License](COPYING) ![REUSE status](https://api.reuse.software/info/github.com/tosin2013/ansible-collection-mcp-audit) ![Galaxy](https://galaxy.ansible.com/ui/repo/published/tosin2013/mcp_audit/) ![Ask DeepWiki](https://deepwiki.com/tosin2013/ansible-collection-mcp-audit)

用于测试和审计的可靠收集 模型上下文协议(MCP) 服务器。提供全面的模块,用于验证MCP服务器实现、测试工具、资源和具有详细报告功能的提示。

特性

  • 服务器发现:收集有关MCP服务器功能的全面信息
  • 工具测试:调用和验证具有预期结果的单个MCP工具
  • 资源测试:通过内容验证检索和验证MCP资源
  • 快速测试:带参数验证的测试提示模板
  • 测试套件:通过全面的报告协调多个测试
  • LLM集成:通过LiteLLM使用真实LLM进行端到端测试(支持100多个提供商)
  • 连接池:跨模块调用重用连接以获得更好的性能(v1.1.0+)
  • 多运输:支持stdio、SSE(服务器发送事件)和HTTP传输
  • 跨语言:使用Python和TypeScript MCP服务器进行测试
  • RHEL就绪:兼容RHEL 9/10、Python 3.9-3.13、可转换内核2.15-2.17

安装

来自Ansible Galaxy

ansible-galaxy collection install tosin2013.mcp_audit

该集合将自动发布到 银河系 当版本标签(例如。, v1.1.1)在所有CI测试通过后推送到存储库

docs/GALAXY-PUBLISHING.md 有关发布工作流的详细信息。

来源

# Clone the repository
git clone https://github.com/tosin2013/ansible-collection-mcp-audit.git
cd ansible-collection-mcp-audit

# Install dependencies
pip install -r requirements.txt

# Build the collection
ansible-galaxy collection build

# Install locally
ansible-galaxy collection install mcp-audit-*.tar.gz

需求

  • python:3.10或更高版本(MCP SDK要求;参见 问题#19)
  • 安塞波:可转换内核2.15.0或更高版本
  • MCP Python SDK:1.19.0或更高版本(自动安装)
  • 操作系统:Linux(RHEL 9+、Ubuntu 20.04+、Debian 11+)、macOS 11+

快速开始

测试MCP服务器

---
- name: Test MCP Server
  hosts: localhost
  gather_facts: false
  tasks:
    - name: Get server information
      tosin2013.mcp_audit.mcp_server_info:
        transport: stdio
        server_command: python -m mcp_server_example
      register: server_info

    - name: Display capabilities
      ansible.builtin.debug:
        var: server_info.capabilities

运行工具测试

- name: Test calculator add tool
  tosin2013.mcp_audit.mcp_test_tool:
    transport: stdio
    server_command: python -m calculator_mcp_server
    tool_name: add
    tool_arguments:
      a: 5
      b: 3
    expected_result:
      result: 8
  register: tool_test

- name: Check test passed
  ansible.builtin.assert:
    that:
      - tool_test.success
      - tool_test.test_passed

模块

核心模块

模块描述状态
mcp_server_info发现服务器功能和元数据✅ 可用
mcp_test_tool测试单个MCP工具✅ 可用
mcp_test_resource测试MCP资源✅ 可用
mcp_test_prompt测试MCP提示✅ 可用
mcp_test_suite运行全面的测试套件✅ 可用
mcp_test_llm_integration使用真实LLM进行端到端测试✅ 可用

运输支持

  • 标准:基于流程的通信(默认)
  • 上海证券交易所:服务器通过HTTP发送事件
  • 超文本传输协议:直接HTTP/HTTPS通信

文档

发展

设置开发环境

# Clone and enter directory
git clone https://github.com/tosin2013/ansible-collection-mcp-audit.git
cd ansible-collection-mcp-audit

# Install development dependencies
pip install -r requirements-dev.txt

# Install pre-commit hooks
pre-commit install

运行质量检查

# Run all quality checks
make quality

# Run individual checks
make lint        # Linting (ruff, yamllint, ansible-lint)
make format      # Code formatting (ruff)
make type-check  # Type checking (mypy)
make test        # Unit tests (pytest)

运行Ansible健全性测试

ansible-test sanity --docker

建筑

此集合遵循Ansible最佳实践,并建立在坚实的架构决策之上:

  • ADR-0001:集合命名空间选择(当前 tosin2013.mcp_audit)
  • ADR-0002:MCP Python SDK选择
  • ADR-0003:模块架构模式
  • ADR-0008:许可策略(GPL-3.0或更高版本)
  • 所有ADR:完成架构决策

许可证

此收藏已根据 GNU通用公共许可证v3.0或更高版本 (GPL-3.0或更高版本)。

  • 模块 (plugins/modules/):仅限GPL-3.0或更高版本
  • 模块实用程序 (plugins/module_utils/):双重许可GPL-3.0或更高版本或BSD-2条款

复制 获取完整的GPL-3.0许可证文本和 许可证/ 对于所有许可证文件。

这个系列是 符合重复使用要求.

安全

安全是首要任务。请私下报告安全漏洞:

  • 首选:使用
  • 电子邮件: tosin.akinosho@gmail.com(主题: [SECURITY] MCP Audit Collection)

安全.md 我们完整的安全政策和响应时间表。

贡献

欢迎投稿!请查看我们的 贡献指南 (即将推出)适用于:

  • 行为准则
  • 开发工作流程
  • 拉取请求流程
  • 测试要求
  • 代码质量标准

支持

  • 问题:
  • 讨论:
  • 文档: (即将推出)

路线图

1.0.0版本(目标:2025年第一季度)

  • ✅ 建筑基础(0期)- 完成
  • ✅ 基础设施设置(第一阶段)- 完成
  • ✅ 模块实用程序开发(第2阶段)- 完成
  • ✅ 核心模块实施(第3阶段)- 完成
  • ✅ 集成测试(第4阶段)- 完成
  • ✅ 银河出版物(第6阶段)- 完成 (已发布v1.0.0)
  • 🚧 文件和示例(第5阶段)- 进行中

1.1.0版本(发布时间:2025-10-30)

  • ✅ LiteLLM集成(第8阶段)- 完成
  • ✅ 端到端法学硕士→ MCP工具→ 结果流已验证
  • ✅ 多提供商支持(Ollama、OpenRouter、vLLM、100多家提供商)
  • ✅ 使用Ansible Vault进行安全的凭据管理

版本1.1.1(发布时间:2025-11-03)

  • ✅ GitHub Actions工作流的Bug修复
  • ✅ 代码质量改进(乱码过滤和格式化)
  • ✅ 连接池功能的增强文档
  • ✅ Python 3.11和3.13在ansible内核2.15-2.17之间的兼容性得到验证

当前状态: ✅ v1.1.1发布到Galaxy |生产就绪

鸣谢

链接

  • 仓库: https://github.com/tosin2013/ansible-collection-mcp-audit
  • 银河系: https://galaxy.ansible.com/ui/repo/published/tosin2013/mcp_audit/
  • 模型上下文协议: https://modelcontextprotocol.io/
  • MCP Python SDK: https://github.com/modelcontextprotocol/python-sdk

______________________________________________________________________

状态: ✅ 发表于Ansible Galaxy 版本: 1.1.1 银河: 2013年中期审计 最后更新: 2025-11-03

目录标签

目录标签

服务器测试自动化测试Python模型集成MCP审计本地部署LLM集成Ansible工具

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP