Token导航 LogoToken导航TokenDH.com
MCP Next logo
AI代理stdio官方级别未说明来源级核验

MCP Next

MCP Server

AnyTool是一个通用工具使用层,通过智能工具检索、自演化工具编排和统一工具自动化,为AI代理提供快速、可扩展且强大的工具使用能力。

工具数

0

提示词数

0

GitHub Stars

650

资源数

0
AI代理PythonClaudeClaudeCursor

安装说明

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

作者 / 组织

HKUDS

提供方

HKUDS

最后核验

2026/5/17 20:20

快速接入

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

命令预览

pip install -r requirements.txt

详细介绍

AnyTool:AI代理的通用工具使用层

✨ **一行代码为任何代理增压

快速、可扩展和强大的工具使用** ✨

![Platform](https://github.com/HKUDS/AnyTool/) ![Python](https://www.python.org/) ![License](https://opensource.org/licenses/MIT/) ![Feishu](./COMMUNICATION.md) ![WeChat](./COMMUNICATION.md)

| ⚡ 快速闪电工具检索 |  📈 自我进化工具编排 |  ⚡ 通用工具自动化 |

🎯 AnyTool是什么?

AnyTool是一个 通用工具使用层 这改变了人工智能代理与工具的交互方式。它解决了阻碍可靠代理自动化的三个基本挑战: 压倒性的工具上下文, 不可靠的社区工具,以及 能力覆盖范围有限 --为生产AI代理提供第一个真正智能的工具编排系统。

💡 研究亮点

快速闪电工具检索

  • 智能上下文管理:渐进式工具过滤通过多级管道在毫秒内提供精确的工具,在保持速度的同时消除上下文污染。
  • 零废弃物处理:预先计算的嵌入和延迟初始化消除了冗余处理——工具可以在所有执行中立即准备就绪。

📈 可扩展-自我进化的工具编排

  • 自适应MCP工具选择:智能缓存和选择性重新索引可保持10到10000个工具的恒定性能,并实现最佳资源使用。
  • 自进化工具优化:系统通过持久内存不断改进,随着工具生态系统的扩展而变得更加高效。

🌍 强大-通用工具自动化

  • 质量意识选择:内置的可靠性跟踪和安全控制通过持续的学习和执行保障提供生产就绪的自动化。
  • 通用工具使用能力:多后端架构通过统一界面无缝扩展到web API之外的系统操作、GUI自动化和深入研究。

⚡ 易于使用和轻松集成

一行即可获得智能工具编排。零配置设置将复杂的多工具工作流转换为单个API调用。

from anytool import AnyTool

# One line to get intelligent tool orchestration
async with AnyTool() as tool_layer:
    result = await tool_layer.execute(
        "Research trending AI coding tools from GitHub and tech news, "
        "collect their features and user feedback, analyze adoption patterns, "
        "then create a comparison report with insights"
    )

______________________________________________________________________

📋 目录

______________________________________________________________________

🎯 快速开始

1.环境设置

# Clone repository
git clone https://github.com/HKUDS/AnyTool.git
cd AnyTool

# Create and activate conda environment (includes ffmpeg for video recording)
conda create -n anytool python=3.12 ffmpeg -c conda-forge -y
conda activate anytool

# Install dependencies
pip install -r requirements.txt
\[!注意\] 创建一个 .env 文件并添加API密钥(请参阅 anytool/.env.example).

2.执行模式:本地vs服务器

AnyTool的Shell和GUI后端支持两种执行模式。您可以在中配置模式 anytool/config/config_grounding.json:

{
  "shell": { "mode": "local", ... },  // or "server"
  "gui":   { "mode": "local", ... }   // or "server"
}

本地模式(默认--不需要服务器)

本地模式,Shell和GUI操作通过以下方式直接在进程内执行 subprocess / asyncio。这是最简单的设置-- 不需要本地服务器。只需正常使用AnyTool,请参阅 快速集成 作为使用示例。

\[!提示\] 在以下情况下使用本地模式 您正在要控制的同一台机器(您自己的笔记本电脑/台式机)上运行AnyTool。这是大多数用户的推荐模式。

服务器模式(用于远程虚拟机/隔离)

服务器模式,Shell和GUI操作通过HTTP发送到正在运行的 local_server Flask服务。在以下情况下,这是必需的:

  • 控制远程虚拟机 --代理在您的主机上运行,而服务器在VM内运行。
  • 进程隔离/沙盒 --为了安全或稳定,您希望在单独的进程中执行脚本。
  • 多机部署 --代理和执行环境位于不同的机器上。

要使用服务器模式,请设置 "mode": "server"config_grounding.json,然后安装特定于平台的依赖关系并启动服务器:

\[!重要\] 需要特定于平台的设置:不同的操作系统需要不同的桌面控制依赖关系。请在启动本地服务器之前安装操作系统所需的依赖项:

macOS Setup

# Install macOS-specific dependencies
pip install pyobjc-core pyobjc-framework-cocoa pyobjc-framework-quartz atomacos

需要权限:macOS将在您首次运行本地服务器时自动提示您输入权限。授予以下权利:

  • 无障碍 (用于GUI控制)
  • 屏幕录制 (用于截图和视频捕获)
如果没有出现提示,请在“系统设置”中手动授予权限→ 隐私和安全。

Linux Setup

# Install Linux-specific dependencies
pip install python-xlib pyatspi numpy

# Install system packages
sudo apt install at-spi2-core python3-tk scrot
\[!注意\] 可选依赖关系: - 可访问性: pyatspi + at-spi2-core - 窗口管理: wmctrl - 屏幕截图中的光标: libx11-dev + libxfixes-dev

Windows Setup

# Install Windows-specific dependencies
pip install pywinauto pywin32 PyGetWindow

安装特定于平台的依赖关系后,启动本地服务器:

python -m anytool.local_server.main
\[!注意\] 看 anytool/local_server/README.md 以获取完整的API文档和高级配置。

模式比较

本地模式("local")服务器模式("server")
设置零-只需运行您的代理开始 local_server 首先
用例同机开发远程虚拟机、沙盒、多机
Shell执行asyncio.subprocess 进程内HTTP→ 烧瓶→ subprocess
GUI执行直接pyautogui/截图助手HTTP→ 烧瓶→ 皮乌古伊
依赖项只有核心AnyTool核心+Flask+平台deps
网络无需代理之间的HTTP↔ 服务器

3.快速集成

AnyTool是一个 即插即用通用工具使用层 对于任何AI代理。任务已传递给 execute() 可以来自代理的计划模块、用户输入或任何工作流系统。

import asyncio
from anytool import AnyTool
from anytool.tool_layer import AnyToolConfig

async def main():
    config = AnyToolConfig(
        enable_recording=True,
        recording_backends=["gui", "shell", "mcp", "web"],
        enable_screenshot=True,
        enable_video=True,
    )
    
    async with AnyTool(config=config) as tool_layer:
        result = await tool_layer.execute(
            "Research trending AI coding tools from GitHub and tech news, "
            "collect their features and user feedback, analyze adoption patterns, "
            "then create a comparison report with insights"
        )
        print(result["response"])

asyncio.run(main())
\[!提示\] MCP服务器配置:对于需要特定工具的任务,请将相关的MCP服务器添加到 anytool/config/config_mcp.json.不确定要添加哪些服务器?只需添加所有可能有用的工具,AnyTool的智能工具RAG就会自动为您的任务选择合适的工具。看 MCP配置 了解详情。

______________________________________________________________________

技术创新与实施

🧩 挑战1:MCP工具上下文过载

问题当前的MCP代理存在一个根本的设计缺陷:它们在每个执行步骤都加载所有配置的服务器和工具,造成了压倒性的操作空间,并产生了三个关键问题:

  • 大量上下文加载导致性能缓慢

每一步同时加载所有预配置服务器的完整工具集,降低执行速度

  • 🎯 盲刀设置精度差

用户在连接前无法预览工具,导致“以防万一”的过度设置和令人困惑的工具选择

  • 💸 没有内存的资源浪费

在每个执行步骤重新加载相同的工具,没有缓存,导致冗余加载

✅ AnyTool的解决方案:工具上下文管理框架

动机:“加载所有内容”→ “检索所需内容”

改进:通过智能检索和存储,更快的工具选择、更清晰的上下文和高效的资源使用。

技术创新:

🎯 多级工具检索管道

  • 渐进式MCP工具过滤:服务器选择→ 工具名称匹配→ 工具语义搜索→ LLM排名
  • 减少MCP工具搜索空间:每个阶段都会缩小候选工具的范围,以优化精度和速度

💾 长期工具记忆

  • 保存一次,永远使用:预计算工具嵌入一次,并将其保存到磁盘以供即时重用
  • 零废弃物处理:不再有冗余处理-工具可以在所有执行步骤中立即使用

🧠 自适应工具选择

  • 自适应MCP工具排名:仅当MCP工具结果较大或不明确时,才会触发基于LLM的工具选择细化
  • 刀具选择效率:平衡MCP工具精度和计算效率

🚀 按需资源管理

  • 延迟MCP服务器启动:MCP服务器初始化仅在需要特定工具时触发
  • 选择性工具更新:仅对已更改的MCP工具进行增量重新索引,而不是对整个工具集进行索引

______________________________________________________________________

🚨 挑战2:MCP工具质量问题

问题当前的MCP服务器面临着社区贡献的挑战,这带来了三个关键问题:

  • 🔍 工具描述不佳

误导性的声明、不存在的宣传工具和模糊的功能规范会导致错误的工具选择。

  • 📊 无可靠性信号

使用前无法评估MCP工具的质量,导致盲目选择决策。

  • ⚠️ 安保和安全差距

未授权的社区工具可能会在没有适当保护措施的情况下执行危险的操作。

AnyTool解决方案:自给自足的质量管理

动机:“盲目工具信托”→ “智能质量评估”

改进:通过质量跟踪和安全控制,实现可靠的工具选择、安全执行和自主恢复。

技术创新:

🎯 质量意识工具选择

  • 描述质量检查:基于LLM的MCP工具描述清晰度和完整性评估。
  • 基于绩效的排名:在持久内存中跟踪每个MCP工具的调用/成功率,以确定可靠选项的优先级。

💾 基于学习的工具记忆

  • 跟踪工具性能:记住哪些MCP工具工作良好,哪些会随着时间的推移而失效。
  • 智能工具优先级:根据过去的成功率和描述质量自动对工具进行排名。

🛡️ 安全第一执行

  • 阻止危险操作:防止任意代码执行,并要求用户批准敏感的MCP工具操作。
  • 执行保障:所有MCP工具执行的内置安全控制。

🚀 自愈工具管理

  • 自主工具切换:在本地切换发生故障的MCP工具,而无需重新启动昂贵的计划循环。
  • 本地故障恢复:故障时自动切换到替代MCP工具,而不会升级到上级代理。

______________________________________________________________________

🔄 挑战3:MCP能力范围有限

问题当前的MCP生态系统主要侧重于Web API和在线服务,造成了严重的自动化差距,阻碍了全面的任务完成:

  • 🖥️ 缺少系统操作

本地系统上不支持文件操作、进程管理或命令执行。

  • 🖱️ 无桌面自动化

无法控制缺少API的GUI应用程序,将自动化限制在仅限web的场景中。

  • 📊 工具覆盖不完整

社区中有限的服务器类别和现有服务器中不完整的工具集造成了工作流瓶颈。

✅ AnyTool解决方案:通用功能扩展

(MCP+系统命令+GUI控制≈通用任务完成)

动机:“仅网络MCP”→ “通用任务完成”

改进:通过多后端架构实现完全自动化覆盖,将MCP功能无缝扩展到web API之外。

🏗️ 多后端架构

  • MCP后端:用于Web API和在线服务的社区服务器
  • 壳牌后端:用于系统级操作和文件管理的Bash/Python执行
  • GUI后端:无API要求的任何可视化应用程序的像素级自动化
  • Web后端:深网研究和数据提取能力

💡 自我进化能力发现

  • 智能间隙检测:规划代理确定MCP工具何时不足以满足任务要求
  • 自动后端选择:Shell/GUI后端自动填补功能空白,无需人工干预
  • 动态能力扩展:通过后端组合,以前不可能的任务变得可以实现

🎭 统一工具编排

  • 统一工具模式:所有后端都暴露出相同的接口,用于无缝选择代理工具
  • 透明后端切换:代理在不知道实现细节的情况下跨后端类型选择最佳工具
  • 智能刀具路径:根据任务要求自动路由到最合适的后端

🚀 无缝集成层

  • 单工具界面:统一的API,从人工智能代理中抽象出后端复杂性。
  • 跨后端协调:启用跨多个后端功能的复杂工作流。
  • 一致的安全控制:在所有后端类型中统一应用安全措施。

______________________________________________________________________

🔧 配置指南

配置概述

AnyTool使用分层配置系统:

  • config_dev.json (最高优先级):地方发展优先。覆盖所有其他配置。
  • config_agents.json:代理定义和后端访问控制
  • config_mcp.json:MCP服务器注册表
  • config_grounding.json:后端特定设置和智能工具RAG配置
  • config_security.json:敏感操作的运行时用户确认安全策略

______________________________________________________________________

代理配置

路径: anytool/config/config_agents.json

目的:定义代理角色,控制后端访问范围,并设置执行限制以防止无限循环。

配置示例:

{
  "agents": [
    {
      "name": "GroundingAgent",
      "class_name": "GroundingAgent",
      "backend_scope": ["gui", "shell", "mcp", "system", "web"],
      "max_iterations": 20
    }
  ]
}

关键字段:

字段描述选项/示例
backend_scope无障碍后端[] 或以下各项的任意组合 ["gui", "shell", "mcp", "system", "web"]
max_iterations最大执行周期任何整数(例如。, 15, 20, 50)或 null (无限制)

______________________________________________________________________

MCP配置

路径: anytool/config/config_mcp.json (复制自 config_mcp.json.example)

目的:使用连接详细信息注册MCP服务器。AnyTool会自动从所有注册的服务器中发现工具,并通过Smart Tool RAG使其可用。

配置示例:

{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}"
      }
    }
  }
}

______________________________________________________________________

Runtime Configuration (AnyToolConfig)

运行时配置(AnyToolConfig)

完整示例:

from anytool import AnyTool
from anytool.tool_layer import AnyToolConfig

config = AnyToolConfig(
    # LLM Configuration
    llm_model="anthropic/claude-sonnet-4-5",
    llm_enable_thinking=False,
    llm_timeout=120.0,
    llm_max_retries=3,
    llm_rate_limit_delay=0.0,
    llm_kwargs={},  # Additional LiteLLM parameters
    
    # Separate models for specific tasks (None = use llm_model)
    tool_retrieval_model=None,   # Model for tool retrieval LLM filter
    visual_analysis_model=None,  # Model for visual analysis
    
    # Grounding Configuration
    grounding_config_path=None,  # Path to custom config file
    grounding_max_iterations=20,
    grounding_system_prompt=None,  # Custom system prompt
    
    # Backend Configuration
    backend_scope=["gui", "shell", "mcp", "web", "system"],
    
    # Workspace Configuration
    workspace_dir=None,  # Auto-create temp dir if None
    
    # Recording Configuration
    enable_recording=True,
    recording_backends=["gui", "shell", "mcp"],
    recording_log_dir="./logs/recordings",
    enable_screenshot=True,
    enable_video=True,
    enable_conversation_log=True,  # Save LLM conversations to conversations.jsonl
    
    # Logging Configuration
    log_level="INFO",
    log_to_file=False,
    log_file_path=None,
)

async with AnyTool(config=config) as tool_layer:
    result = await tool_layer.execute("Your task here")
    # Or with external task_id for benchmark integration:
    # result = await tool_layer.execute("Your task", task_id="my-task-001")

______________________________________________________________________

Other Configuration Files

后端配置

路径: anytool/config/config_grounding.json

目的:配置后端特定的行为、超时、智能工具RAG系统以实现高效的工具选择,以及工具质量跟踪以实现自我进化的工具智能。

关键字段:

后端字段描述选项/默认值
外壳timeout命令超时(秒)任意整数(默认值: 60)
conda_env自动激活conda环境环境名称或 null (默认值: "anytool")
working_dir命令执行的工作目录任何有效路径(默认:当前目录)
default_shell使用外壳"/bin/bash", "/bin/zsh"等等。
图形用户界面timeout操作超时(秒)任意整数(默认值: 90)
screenshot_on_error故障截图truefalse (默认值: true)
driver_typeGUI自动化驱动程序"pyautogui" 或其他支持的驱动程序
主控程序timeout请求超时(秒)任意整数(默认值: 30)
sandbox在E2B沙盒中运行truefalse (默认值: false)
eager_sessions启动时预连接所有服务器truefalse (默认值: false,懒惰连接)
工具搜索search_mode工具检索策略"semantic", "hybrid" (语义+LLM过滤器),或 "llm" (默认值: "hybrid")
max_tools搜索返回的最大工具数任意整数(默认值: 40)
enable_llm_filter启用基于LLM的工具预过滤truefalse (默认值: true)
llm_filter_threshold当工具超过此计数时启用LLM筛选器任何整数(默认值: 50)
enable_cache_persistence坚持将缓存嵌入磁盘truefalse (默认值: true)
工具_质量enabled启用刀具质量跟踪truefalse (默认值: true)
enable_persistence将高质量数据保存到磁盘truefalse (默认值: true)
cache_dir质量缓存目录路径字符串(默认值: .anytool/tool_quality 在项目目录中)
auto_evaluate_descriptions使用LLM自动评估工具描述truefalse (默认值: true)
enable_quality_ranking将质量分数纳入工具排名truefalse (默认值: true)
evolve_interval每N次工具执行触发一次自我进化任意整数1-100(默认值: 5)

______________________________________________________________________

安全配置

路径: anytool/config/config_security.json

目的:定义具有命令过滤和访问控制的安全策略。

关键字段:

字段描述选项
全球allow_shell_commands启用shell命令执行truefalse (默认值: true)
allow_network_access启用网络操作truefalse (默认值: true)
allow_file_access启用文件系统操作truefalse (默认值: true)
blocked_commands平台特定命令黑名单对象 common, linux, darwin, windows 阵列
sandbox_enabled为所有操作启用沙盒truefalse (默认值: false)
后端shell, mcp, gui, web每后端安全覆盖与全局字段相同,后端特定

被阻止的命令示例: rm -rf, shutdown, reboot, mkfs, dd, format, iptables

行为:

  • 被阻止的命令包括 自动拒绝
  • 沙盒模式隔离安全环境中的操作(MCP的E2B沙盒)

______________________________________________________________________

开发人员配置

路径: anytool/config/config_dev.json (复制自 config_dev.json.example)

加载优先级: config_grounding.jsonconfig_security.jsonconfig_dev.json (dev.json覆盖了之前的文件)

______________________________________________________________________

📖 代码结构

📖 快速概览

传说: ⚡ 核心模块|🔧 支持模块
AnyTool/
├── anytool/
│   ├── __init__.py                       # Package exports
│   ├── __main__.py                       # CLI entry point (python -m anytool)
│   ├── tool_layer.py                     # AnyTool main class
│   │
│   ├── ⚡ agents/                         # Agent System
│   ├── ⚡ grounding/                      # Unified Backend System
│   │   ├── core/                         # Core abstractions
│   │   └── backends/                     # Backend implementations
│   │       ├── shell/                    # Shell command execution
│   │       ├── gui/                      # Anthropic Computer Use
│   │       ├── mcp/                      # Model Context Protocol
│   │       └── web/                      # Web search & browsing
│   │
│   ├── 🔧 prompts/                       # Prompt Templates
│   ├── 🔧 llm/                           # LLM Integration
│   ├── 🔧 config/                        # Configuration System
│   ├── 🔧 local_server/                  # GUI Backend Server
│   ├── 🔧 recording/                     # Execution Recording
│   ├── 🔧 platform/                      # Platform Integration
│   └── 🔧 utils/                         # Utilities
│
├── .anytool/                             # Runtime cache
│   ├── embedding_cache/                  # Tool embeddings for Smart Tool RAG
│   └── tool_quality/                     # Persistent tool quality tracking data
│
├── logs/                                 # Execution logs
│
├── requirements.txt                      # Python dependencies
├── pyproject.toml                        # Package configuration
└── README.md

______________________________________________________________________

📂 详细的模块结构

⚡ agents/ - Agent System

agents/
├── __init__.py
├── base.py                         # Base agent class with common functionality
└── grounding_agent.py              # Execution Agent (tool calling & iteration control)

主要职责:通过智能工具选择和迭代控制执行任务。

⚡ grounding/ - Unified Backend System (Core Integration Layer)

主要职责:统一的工具抽象、后端路由、会话池、智能工具RAG和自进化质量跟踪\*。

核心摘要

grounding/core/
├── grounding_client.py             # Unified interface across all backends
├── provider.py                     # Abstract provider base class
├── session.py                      # Session lifecycle management
├── search_tools.py                 # Smart Tool RAG for semantic search
├── exceptions.py                   # Custom exception definitions
├── types.py                        # Shared type definitions
│
├── tool/                           # Tool abstraction layer
│   ├── base.py                     # Tool base class
│   ├── local_tool.py               # Local tool implementation
│   └── remote_tool.py              # Remote tool implementation
│
├── quality/                        # Self-evolving tool quality tracking
│   ├── manager.py                  # Quality manager with adaptive ranking
│   ├── store.py                    # Persistent quality data storage
│   └── types.py                    # Quality record data types
│
├── security/                       # Security & sandboxing 🔧
│   ├── policies.py                 # Security policy enforcement
│   ├── sandbox.py                  # Sandbox abstraction
│   └── e2b_sandbox.py              # E2B sandbox integration
│
├── system/                         # System-level provider
│   ├── provider.py
│   └── tool.py
│
└── transport/                      # Transport layer abstractions 🔧
    ├── connectors/
    │   ├── base.py
    │   └── aiohttp_connector.py
    └── task_managers/
        ├── base.py
        ├── async_ctx.py
        ├── aiohttp_connection_manager.py
        └── placeholder.py

后端实现

Shell Backend - Command execution via local server

backends/shell/
├── provider.py                     # Shell provider implementation
├── session.py                      # Shell session management
└── transport/
    └── connector.py                # HTTP connector to local server

GUI Backend - Anthropic Computer Use integration

backends/gui/
├── provider.py                     # GUI provider implementation
├── session.py                      # GUI session management
├── tool.py                         # GUI-specific tools
├── anthropic_client.py             # Anthropic API client wrapper
├── anthropic_utils.py              # Utility functions
├── config.py                       # GUI configuration
└── transport/
    ├── connector.py                # Computer Use API connector
    └── actions.py                  # Action execution logic

MCP Backend - Model Context Protocol servers

backends/mcp/
├── provider.py                     # MCP provider implementation
├── session.py                      # MCP session management
├── client.py                       # MCP client
├── config.py                       # MCP configuration loader
├── installer.py                    # MCP server installer
├── tool_converter.py               # Convert MCP tools to unified format
├── tool_cache.py                   # MCP tool cache for offline tool discovery
└── transport/
    ├── connectors/                 # Multiple transport types
    │   ├── base.py
    │   ├── stdio.py                # Standard I/O connector
    │   ├── http.py                 # HTTP connector
    │   ├── websocket.py            # WebSocket connector
    │   ├── sandbox.py              # Sandboxed connector
    │   └── utils.py
    └── task_managers/              # Protocol-specific managers
        ├── stdio.py
        ├── sse.py
        ├── streamable_http.py
        └── websocket.py

Web Backend - Search and browsing

backends/web/
├── provider.py                     # Web provider implementation
└── session.py                      # Web session management

🔧 prompts/ - Prompt Templates

prompts/
├── __init__.py
└── grounding_agent_prompts.py     # Grounding agent system & tool selection prompts

🔧 llm/ - LLM Integration

llm/
├── __init__.py
└── client.py                       # LiteLLM wrapper with retry logic

🔧 config/ - Configuration System

config/
├── __init__.py
├── loader.py                       # Configuration file loader
├── constants.py                    # System constants
├── grounding.py                    # Grounding configuration dataclasses
├── utils.py                        # Configuration utilities
│
├── config_grounding.json           # Backend-specific settings
├── config_agents.json              # Agent configurations
├── config_mcp.json.example         # MCP server definitions (copy to config_mcp.json)
├── config_security.json            # Security policies
└── config_dev.json.example         # Development config template

🔧 local_server/ - GUI Backend Server

local_server/
├── __init__.py
├── main.py                         # Flask application entry point
├── config.json                     # Server configuration
├── feature_checker.py              # Platform feature detection
├── health_checker.py               # Server health monitoring
├── platform_adapters/              # OS-specific implementations
│   ├── macos_adapter.py            # macOS automation (atomacos, pyobjc)
│   ├── linux_adapter.py            # Linux automation (pyatspi, xlib)
│   ├── windows_adapter.py          # Windows automation (pywinauto)
│   └── pyxcursor.py                # Custom cursor handling
├── utils/
│   ├── accessibility.py            # Accessibility tree utilities
│   └── screenshot.py               # Screenshot capture
└── README.md

目的:轻量级Flask服务,支持计算机控制(GUI、Shell、文件、屏幕截图)。

🔧 recording/ - Execution Recording

recording/
├── __init__.py
├── recorder.py                     # Main recording manager
├── manager.py                      # Recording lifecycle management
├── action_recorder.py              # Action-level logging
├── video.py                        # Video capture integration
├── viewer.py                       # Trajectory viewer and analyzer
└── utils.py                        # Recording utilities

目的:执行审计,包括轨迹记录和视频捕获。

🔧 platform/ - Platform Integration

platform/
├── __init__.py
├── config.py                       # Platform-specific configuration
├── recording.py                    # Recording integration
├── screenshot.py                   # Screenshot utilities
└── system_info.py                  # System information gathering

🔧 utils/ - Shared Utilities

utils/
├── logging.py                      # Structured logging system
├── ui.py                           # Terminal UI components
├── display.py                      # Display formatting utilities
├── cli_display.py                  # CLI-specific display
├── ui_integration.py               # UI integration helpers
└── telemetry/                      # Usage analytics (opt-in)
    ├── __init__.py
    ├── events.py
    ├── telemetry.py
    └── utils.py

📊 logs/ - Execution Logs & Recordings

logs/
├── /                        # Main application logs
│   └── anytool_YYYY-MM-DD_HH-MM-SS.log   # Timestamped log files
│
└── recordings/                           # Execution recordings
    └── task_/                        # Individual recording session
        ├── trajectory.json               # Complete execution trajectory
        ├── screenshots/                  # Visual execution record (GUI backend)
        │   ├── tool__.png
        │   ├── tool__.png
        │   └── ...                       # Sequential screenshots
        ├── workspace/                    # Task workspace
        │   └── [generated files]         # Files created during execution
        └── screen_recording.mp4          # Video recording (if enabled)

录音控制:通过启用 AnyToolConfig(enable_recording=True),过滤后端 recording_backends=["gui", "shell", ...]

______________________________________________________________________

🔗 相关项目

AnyTool建立在优秀的开源项目之上,我们衷心感谢他们的作者和贡献者:

  • OSWorld:用于评估不同操作系统任务中计算机使用代理的综合基准。
  • mcp使用:使用客户端SDK简化MCP代理开发的平台。

______________________________________________________________________

🌟 如果这个项目对你有帮助,请给我们一颗星!

🤖 通过智能工具编排为AI Agent赋能!

______________________________________________________________________

❤️ Thanks for visiting ✨ AnyTool!

目录标签

目录标签

AI代理PythonClaude本地部署工具编排智能检索自动化多后端集成

支持客户端

ClaudeCursor

接入字段

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

stdio

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

session

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

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

0

权限和风险

stdiosession部署方式未说明

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

安装前确认

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

来源信息

继续浏览同类 MCP