AI代理集成工具

一个生产就绪的AI代理,动态集成多个基于HTTP的MCP服务器,提供动态工具发现、生产弹性、类型安全配置等功能。

  • by thanhnc261
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 thanhnc261/ai-agent-mcp

使用说明

集成MCP的AI代理

可与多个基于HTTP的MCP服务器动态集成的生产就绪AI代理。

快速开始

# Install dependencies
python3 -m uv sync

# Install pre-commit hooks
python3 -m uv run pre-commit install

# Run tests
python3 -m uv run pytest

# Run all checks
make check

特性

  • 从MCP清单中动态发现工具
  • 生产弹性(重试、断路器、速率限制)
  • 使用Pydantic设置进行类型安全配置
  • 带有关联ID的结构化日志记录
  • 现代Python工具(UV、Ruff、mypy)

测试

快速测试命令

# Run all tests
make test

# Run with coverage
make test-cov

# Run specific test
.venv/bin/pytest tests/unit/test_security.py -v

有关详细的测试文档,请参阅 测试指导

测试指南包括:

  • 测试环境设置
  • 运行和调试测试
  • 用示例编写新测试
  • 常见测试模式
  • 覆盖率报告
  • CI/CD集成
  • 常见问题排查

文档