__init__.py•2.62 kB
"""
MCP Tools package for the server.
"""
from mcp.server.fastmcp import FastMCP
# Create a shared MCP instance for all tools
mcp = FastMCP("test-server")
# Import all tool modules to register them
from . import (
basic_tools,
control_tools,
file_tools,
persistence_tools,
scheduling_tools,
system_tools,
telegram_tools,
youtube_tools,
)
# Function registry for scheduled calls
function_registry = {
# Telegram tools
"send_telegram_message": telegram_tools.send_telegram_message,
"receive_telegram_updates": telegram_tools.receive_telegram_updates,
# Basic tools
"echo": basic_tools.echo,
# System tools
# "run_command": system_tools.run_command, # Disabled for safety; see system_tools.py
"run_python_code": system_tools.run_python_code,
"install_python_library": system_tools.install_python_library,
"system_info": system_tools.system_info,
"list_processes": system_tools.list_processes,
# File tools
"read_file": file_tools.read_file,
"write_file": file_tools.write_file,
"create_file": file_tools.create_file,
"create_folder": file_tools.create_folder,
"list_files": file_tools.list_files,
"delete_file": file_tools.delete_file,
"rename_file": file_tools.rename_file,
"move_folder": file_tools.move_folder,
# Persistence tools
"update_persistent_info": persistence_tools.update_persistent_info,
"get_persistent_info": persistence_tools.get_persistent_info,
"delete_persistent_info_key": persistence_tools.delete_persistent_info_key,
# Scheduling tools
"schedule_telegram_message": scheduling_tools.schedule_telegram_message,
"schedule_function_call": scheduling_tools.schedule_function_call,
"schedule_recurring_job": scheduling_tools.schedule_recurring_job,
"list_scheduled_jobs": scheduling_tools.list_scheduled_jobs,
"cancel_scheduled_job": scheduling_tools.cancel_scheduled_job,
"get_available_functions": scheduling_tools.get_available_functions,
"get_job_execution_log": scheduling_tools.get_job_execution_log,
# YouTube tools
"youtube_video_info": youtube_tools.youtube_video_info,
"youtube_download_audio": youtube_tools.youtube_download_audio,
"youtube_download_video": youtube_tools.youtube_download_video,
# Control tools
"type_text": control_tools.type_text,
"press_hotkey": control_tools.press_hotkey,
"switch_to_window": control_tools.switch_to_window,
"list_open_windows": control_tools.list_open_windows,
"move_mouse_to": control_tools.move_mouse_to,
"click_mouse": control_tools.click_mouse,
}