2.4 KiB
2.4 KiB
🤖 MCP Agent Tools & Multimodal Support
A FastAPI-based AI agent tool service providing agent core tools, multimodal AI capabilities, TTS/OCR, knowledge base, essays, and utility APIs.
This project contains two FastAPI services for AI agent assistance:
- Main Agent Tools — core agent tools: MCP endpoint, safe command execution, workspace switching, SSH session management, and permission dialogs.
- Multimodal & Gadget Support — multimodal AI (Qwen chat/ask/TTS/OCR), knowledge base management, essay recording/search, and utility APIs (WHOIS / IP / GitHub).
📦 Components
🤖 Main Agent Tools (agent_tools.py)
Agent core tools exposed via FastAPI:
- MCP endpoint (
/mcp) - Safe command execution (
execute_command_safe) - Workspace switching (
/switch_workspace,/current_workspace) - SSH session management (
/ssh/sessions,/ssh/cleanup) - Python runner (
create_and_run_python) - Permission dialogs (confirm / input) on Windows
🧩 Multimodal & Gadget Support (multimodal_gadget_support.py)
- AI Chat / Ask — Qwen (Flash / Pro) chat & ask endpoints
- TTS — text-to-speech (Flash / Plus / Max)
- OCR — text recognition (
/ocr,/ocr_advanced) - Knowledge Base — add / query / search / manage knowledge points
- Essays — record, search, view personal essays
- Utilities — WHOIS, IP info, GitHub repo lookup
- Keyword split — DeepSeek-based query segmentation
🚀 Quick Start
Prerequisites
- Python 3.9+
fastapi,uvicorn,pydantic- Optional:
paramiko(SSH),openai(AI),pandas, etc.
Run
pip install fastapi uvicorn pydantic
# Run Agent Tools
python agent_tools.py
# Run Multimodal & Gadget Support (on another port)
python multimodal_gadget_support.py
📁 Project Structure
mcp/
├── Main Agent Tools.py # 🤖 Agent core tools (FastAPI)
├── Multimodal and Gadget Support.py # 🧩 Multimodal & gadget support (FastAPI)
└── README.md # This document
📄 License
This project is licensed under the MIT License. See LICENSE for details.
⚠️ Security Note
This service executes system commands and exposes agent tools. Run only in trusted environments. All sensitive keys are configured via environment variables, not hardcoded.