TM

teamsparkai/mcpgraph

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

22 stars 2 forks 质量 68 趋势 10MIT

运行MCP服务器有向图的MCP服务器

概览

MCP服务器执行MCP服务器调用的有向图。 阅读以了解mcpGraph如何在保持无代码解决方案的安全性和可观察性的同时,提供代码模式的上下文效率和准确性。 观看视频,了解mcpGraph的实际操作,并探索mcpGraphUX的可视化调试能力。 观看视频,可以看到代理自主构建、测试和部署编排工具——“代码模式”,无需代码。 mcpGraph 是一个 MCP(模型上下文协议)服务器,它展示了由声明式 YAML 配置定义的工具。每个工具执行一个有向图,节点图可以调用其他 MCP 工具、转换数据并做出路由决策,而无需嵌入完整的编程语言。

概述(AI 翻译)

MCP服务器执行MCP服务器调用的有向图。

** 📖 了解更多:** 阅读 mcpGraph:“代码模式”的无代码替代方案,了解mcpGraph如何在保持无代码解决方案的安全性和可观察性的同时,提供代码模式的上下文效率和准确性。

** 🎥 观看演示:** 观看 mcpGraph 概述和 mcpGraphUX 演示 视频,了解 mcpGraph 的实际应用并探索 mcpGraphUX 的视觉调试能力。

** 🎥 观看演示:** 观看 mcpGraphToolkit 深度探索视频,观看代理自主构建、测试和部署编排工具——“代码模式”,无需代码。

概述

mcpGraph 是一个 MCP(模型上下文协议)服务器,它展示了由声明式 YAML 配置定义的工具。每个工具执行一个有向图,节点图可以调用其他 MCP 工具、转换数据并做出路由决策,而无需嵌入完整的编程语言。

主要功能:

  • 声明式配置:在YAML中定义工具及其执行图
  • 数据转换:使用JSONata表达式在节点间转换数据

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

mcpGraph

MCP server that executes directed graphs of MCP server calls.

📖 Learn More: Read mcpGraph: A No-Code Alternative to “Code Mode” to understand how mcpGraph provides the context efficiency and accuracy of Code Mode while maintaining the security and observability of a no-code solution.

🎥 Watch the Demo: Check out the mcpGraph Overview and mcpGraphUX Demo video to see mcpGraph in action and explore the visual debugging capabilities of mcpGraphUX.

🎥 Watch the Demo: Check out the mcpGraphToolkit Deep Dive video to see an agent autonomously build, test, and deploy orchestration tools—“Code Mode” without the code.

Overview

mcpGraph is an MCP (Model Context Protocol) server that exposes tools defined by declarative YAML configurations. Each tool executes a directed graph of nodes that can call other MCP tools, transform data, and make routing decisions, all without embedding a full programming language.

Key Features:

  • Declarative Configuration: Define tools and their execution graphs in YAML
  • Data Transformation: Use JSONata expressions to transform data between nodes
  • Conditional Routing: Use JSON Logic for conditional branching
  • Observable: Every transformation and decision is traceable
  • No Embedded Code: All logic expressed using standard expression languages (JSONata, JSON Logic)

Related Tools:

  • mcpGraphUX: A visual debugging and development environment for mcpGraph. Visualize graph structures, animate through active nodes during execution, set breakpoints, and inspect node inputs and outputs. See the mcpGraphUX repository for details.
  • mcpGraphToolkit: An MCP server that provides tools for building, testing, and managing mcpGraph tools. Use it to discover available MCP servers, test expressions, and create graph tools interactively. See mcpGraphToolkit Overview for details.

Example

Here’s a simple example that counts files in a directory:

version: "1.0"

# MCP Server Metadata
server:
  name: "fileUtils"
  version: "1.0.0"
  title: "File utilities"
  instructions: "This server provides file utility tools for counting files and calculating total file sizes in directories."

# Optional: Execution limits to prevent infinite loops
executionLimits:
  maxNodeExecutions: 1000      # Maximum total node executions (default: 1000)
  maxExecutionTimeMs: 300000   # Maximum execution time in milliseconds (default: 300000 = 5 minutes)

# MCP Servers used by the graph
mcpServers:
  filesystem:
    command: "npx"
    args:
      - "-y"
      - "@modelcontextprotocol/server-filesystem"
      - "./tests/counting"

# Tool Definitions
tools:
  - name: "count_files"
在 GitHub 查看完整 README

安装

npx -y mcpgraph -g /path/to/your/config.yaml
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "mcpgraph": { "command": "mcpgraph", "args": [ "-g", "/path/to/your/config.yaml" ] } } }