TeamAlpha:MCP支持的AI代理系统
你的AI代理现在拥有超能力! 🤖⚡
一个智能代理系统,结合了:
- LLM (Ollama语言模型)
- 主控程序 (工具的模型上下文协议)
- 码头工人 (集装箱化部署)
它能做什么?
✨ 搜索GitHub --查找存储库,阅读README,获取统计数据 📂 访问文件 --安全地读取和分析本地文件 🧠 AI分析 --智能地合成信息 🔄 多步骤工作流 --使用工具链的复杂任务
快速开始
# See it in action (3-4 minutes)
docker compose exec teamalpha-agent python mcp_tool_demo.py
# Watch realistic workflow (3-4 minutes)
docker compose exec teamalpha-agent python mcp_workflow_example.py文档索引
| 文件 | 目的 | 时间 |
|---|---|---|
| INDEX.md | 导航中心 | 5分钟 |
| MCP_SUMMARY.md | 你有什么 | 10分钟 |
| MCP_INTEGRATION-GUIDE.md | 工作原理 | 30分钟 |
| MCP_QUICK_REFERENCE.md | 快速查找 | 根据需要 |
| MCP_建筑.md | 系统设计 | 15分钟 |
演示脚本
# 1. Basic tool execution (START HERE)
docker compose exec teamalpha-agent python mcp_tool_demo.py
# 2. Realistic agent workflow
docker compose exec teamalpha-agent python mcp_workflow_example.py
# 3. Tool-aware agent
docker compose exec teamalpha-agent python mcp_langchain_agent.py
# 4. Advanced execution patterns
docker compose exec teamalpha-agent python mcp_executor_agent.py可用工具
📂 文件系统
read_file(path)--读取文件内容list_directory(path)--列出目录内容
🐙 GitHub
search_repositories(query)--搜索reposget_repository_readme(owner, repo)--获取READMEget_repo_stats(owner, repo)--获取回购统计信息
🧠 大语言模型分析
- Ollama Callam3模型(本地)
- 实时推理
- 上下文感知响应
系统概述
┌─────────────────────────────────────────┐
│ Docker Compose │
├─────────────────────────────────────────┤
│ │
│ Ollama (LLM) ←→ Python Agent │
│ (llama3) (LangChain) │
│ 11434 + MCP Tools │
│ │
│ ↓↓↓ │
│ │
│ MCP Tool Layer │
│ ├─ GitHub API access │
│ ├─ Filesystem access │
│ └─ Extensible framework │
│ │
└─────────────────────────────────────────┘关键概念
主控程序 =“用于AI的USB-C”
- 工具标准接口
- 安全访问外部系统
- LLM可以请求使用工具
工具链 =多个工具协同工作
Search GitHub
↓
Fetch README
↓
Analyze with LLM
↓
Generate response技术栈
- 语言: Python 3.12
- LLM Ollama(Calama3模型)
- 框架: LangChain
- 集装箱: Docker Compose
- API: GitHub REST API,本地文件系统
Docker命令
# Start everything
docker compose up -d
# Run a demo
docker compose exec teamalpha-agent python mcp_tool_demo.py
# View logs
docker compose logs -f
# Stop everything
docker compose down
# Rebuild image
docker compose up -d --build用例
研究助理
"Find and analyze crewAI on GitHub"
→ Searches GitHub
→ Fetches README
→ Gets statistics
→ Analyzes with AI代码审查
"Analyze our project structure"
→ Reads local files
→ Checks pyproject.toml
→ LLM provides insights项目比较
"Compare 3 Python frameworks"
→ Searches each on GitHub
→ Fetches READMEs
→ Collects statistics
→ LLM synthesizes comparison特性
✅ 实时数据访问 --不限于训练数据 ✅ 安全工具执行 --受控访问模式 ✅ 智能合成 --AI分析工具结果 ✅ 可扩展架构 --易于添加新工具 ✅ 容器化 --随时随地部署 ✅ 生产准备就绪 --错误处理、日志记录 ✅ 有据可查 --5个详细指南+示例
演出
- LLM回复: 1-3秒(RTX 4070上的骆驼3)
- GitHub搜索: \<每次查询1秒
- 文件读取: 典型文件\<100ms
- 总体工作流程: 复杂任务需要3-5秒
后续步骤
- 运行演示 → 查看正在使用的工具
- 阅读文档 → 了解MCP
- 探索脚本 → 学习模式
- 自定义工具 → 添加您自己的
- 部署 → 推动生产
资源
- MCP官员: https://modelcontextprotocol.io
- 工具注册表: https://smithery.ai
- github: https://github.com/modelcontextprotocol
总结
你有一个 全功能AI代理 这可以:
- 🔍 实时研究
- 📊 智能分析数据
- 🔗 连接多个工具
- 📈 扩大生产规模
- 🛠️ 扩展新功能
开始探索: docker compose exec teamalpha-agent python mcp_tool_demo.py
______________________________________________________________________
内置: 朗链+Ollama+MCP+Docker 状态: 生产准备就绪✅ 维护: 积极更新
