松弛mcp语言图模板/ ├─ README.md ├─ .env.example ├─ 需求.txt ├─ Dockerfile ├─ docker-compose.yml ├─ 生成文件 有很多钱—— ├─ .预调试配置.yaml └─ src/ ├─ main.py ├─ app.py ├─ 域名/ │ ├─ __初始化__南美国家巴拉圭的缩写(Paraguay) │ ├─ 实体/ │ │ ├─ __初始化__南美国家巴拉圭的缩写(Paraguay) │ │ └─ query.py │ └─ 服务/ │ ├─ __初始化__南美国家巴拉圭的缩写(Paraguay) │ └─ scorrer.py ├─ 应用程序/ │ ├─ __初始化__南美国家巴拉圭的缩写(Paraguay) │ ├─ 接口/ │ │ ├─ __初始化__南美国家巴拉圭的缩写(Paraguay) │ │ ├─ 工具_协议副本 │ │ └─ 图表_协议 │ └─ 使用案例/ │ ├─ __初始化__南美国家巴拉圭的缩写(Paraguay) │ └─ run_text_to_sql.py ├─ 基础设施/ │ ├─ __初始化__南美国家巴拉圭的缩写(Paraguay) │ ├─ config.py │ ├─ 日志.py │ ├─ http.py │ ├─ 松弛/ │ │ ├─ __初始化__南美国家巴拉圭的缩写(Paraguay) │ │ └─ 签名.py │ └─ 坚持不懈/ │ ├─ __初始化__南美国家巴拉圭的缩写(Paraguay) │ └─ memory_state.py ├─ 路由器/ │ ├─ __初始化__南美国家巴拉圭的缩写(Paraguay) │ ├─ slack.py │ ├─ agent.py │ └─ tools.py ├─ 代理商/ │ ├─ __初始化__南美国家巴拉圭的缩写(Paraguay) │ ├─ state.py │ ├─ graph.py │ └─ 节点/ │ ├─ __初始化__南美国家巴拉圭的缩写(Paraguay) │ ├─ query_rewriter_node.py │ └─ schema_agent_node.py └─ 工具/ ├─ __初始化__南美国家巴拉圭的缩写(Paraguay) ├─ mcp_rentime.py#伪mcp运行时:@tool装饰器+注册表 └─ mcp_tools.py#您的工具暴露在LLM/Slack中
测试/ ├─ __初始化__南美国家巴拉圭的缩写(Paraguay) ├─ test_slack_signature.py └─ test_graph_happy_path.py
Slack·MCP·LangGraph——简洁的架构模板
此存储库连接 Slack→ 快速API→ 工具(@tool)→ 图谱 清洁建筑。这 @tool 装饰器是通过一个小型的伪MCP运行时实现的,因此每个工具的行为都像 API调用 (无状态,执行→ 返回→ 关闭)。准备就绪后,将其替换为官方MCP SDK。
建筑(美人鱼)
flowchart LR
S[Slack Slash Command] -->|HTTP POST| F[FastAPI /slack/events]
F --> T[/Tools API /tools/invoke/]
T -->|@tool: text_to_sql| G[LangGraph Pipeline]
G --> R[SQL + Logs]
R --> F
F --> S
cp .env.example .env
make dev # or: docker compose up --build```