Token导航 LogoToken导航TokenDH.com
Distri MCP logo
AI代理HTTP官方级别未说明来源级核验

Distri MCP

MCP Server

Distri是一个用Rust构建的开源AI代理框架,支持通过Markdown定义代理,将产品功能作为工具连接,并通过CLI、API服务器或嵌入React UI运行。

工具数

0

提示词数

0

GitHub Stars

7

资源数

0
开源AI代理Rust工具集成

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

distrihub

提供方

distrihub

最后核验

2026/5/17 20:44

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

迪斯特里

![](https://img.shields.io/badge/Platform-macOS%20%7C%20Linux%20%7C%20Windows-blue?style=flat-square) ![](https://img.shields.io/badge/Runtime-Rust-orange?style=flat-square) ![](https://img.shields.io/badge/Protocol-A2A-green?style=flat-square)

Distri是一个用Rust构建的开源AI代理框架。在markdown中定义代理,将产品功能连接为工具,并从CLI、API服务器或嵌入React UI中运行它们。

文档 · 网站 · 云 区

Distri Dashboard

______________________________________________________________________

为什么分心

  • 代理作为降价 --在单一界面中定义行为、工具和模型设置 .md 使用TOML frontmatter文件
  • 内置工具系统 --内置(搜索、shell、浏览器)、动态HTTP工具、外部客户端工具和MCP支持
  • 技能 --按需知识文档代理在运行时通过以下方式加载 load_skill,在上下文压缩后自动重新注入
  • 分代理 --代理将任务委托给具有独立上下文和令牌预算的专门子代理
  • 远程执行 --在沙盒容器中运行代理,以隔离不受信任的代码或资源
  • React SDK --进来吧 `` 具有流媒体、工具渲染器、语音和开发人员模式的组件
  • A2A兼容 --实施 A2A协议 用于代理发现和调用
  • 自托管 --使用SQLite在您自己的基础设施上运行。不需要外部依赖。

______________________________________________________________________

安装

# Install script (macOS / Linux)
curl -fsSL https://distri.dev/install.sh | sh

# Homebrew
brew tap distrihub/distri && brew install distri

# Verify
distri --version

Other platforms

直接下载:

# darwin-arm64 | darwin-x86_64 | linux-arm64 | linux-x86_64
TARGET=darwin-arm64
curl -L "https://github.com/distrihub/distri/releases/latest/download/distri-${TARGET}.tar.gz" -o distri.tar.gz
sudo tar -xzf distri.tar.gz -C /usr/local/bin distri

Windows(PowerShell):

Invoke-WebRequest https://github.com/distrihub/distri/releases/latest/download/distri-windows-x86_64.zip -OutFile distri.zip
Expand-Archive distri.zip -DestinationPath $Env:LOCALAPPDATA\distri -Force
$Env:Path += ";$Env:LOCALAPPDATA\distri"

______________________________________________________________________

安装后,启动服务器和web UI:

distri serve

第一次运行会下载匹配的 distri-server 二进制和UI捆绑包来自

进入 ~/.distri/。自动打开浏览器 http://localhost:7777.

服务选项

标志行为
distri serve默认:解析+生成分布式服务器,提供用户界面,打开浏览器
--port 8080覆盖端口(默认7777)
--no-uiAPI开启模式(无web界面)
--no-browser不要自动打开浏览器
--server-version 0.5.3固定特定服务器版本
--ui-version 0.5.7固定特定UI版本

生命周期命令

命令行为
distri serve解析+生成分发服务器,提供用户界面
distri update在兼容范围内拉取最新的服务器+UI
distri update --pre允许预发布版本
distri version打印已安装的CLI/服务器/UI版本
distri uninstall擦拭 ~/.distri/{bin, ui, cache}

______________________________________________________________________

快速开始

运行内置代理

distri run search --task "What are the top programming languages in 2026?"

定义自己的代理

创建 agents/my_agent.md:

---
name = "my_agent"
description = "A helpful assistant with web search"
max_iterations = 15

[tools]
builtin = ["final", "search"]
---

# My Agent

You are a helpful assistant. Use the search tool to find current information.

{{task}}

运行它

# Interactive chat
distri tui my_agent

# Single task
distri run --agent my_agent --task "Find the latest SpaceX launch date"

# Start as API server
distri serve --port 8080

推送到Distri Cloud

distri login
distri agents push agents/my_agent.md

______________________________________________________________________

内置代理

代理目的示例
搜索网络搜索+抓取distri run search --task "latest AI news"
快速搜索快速单查询查找distri run fast_search --task "population of Tokyo"
网络浏览器自动化+抓取distri run web --task "scrape HN top 5 stories"
代码沙盒代码执行distri run code --task "sum of primes below 1000"
深度研究分代理委托的多阶段研究distri run deepresearch --task "state of quantum computing"
分布指挥大师distri run distri --task "find and calculate..."
编码员全编码代理(shell+web+文件)distri run coder --task "build a REST API"
代理设计者设计新的代理定义distri run agent_designer --task "design a stock alert agent"
需要 BROWSR_BASE_URLBROWSR_API_KEY 用于搜索、浏览器和shell工具。在Distri Cloud上自动配置。

______________________________________________________________________

代理定义格式

代理是TOML frontmatter的markdown文件:

---
name = "my_agent"
description = "What this agent does"
max_iterations = 25
context_size = 80000
sub_agents = ["search", "code"]     # delegate to other agents

[tools]
builtin = ["final", "search", "load_skill"]
external = ["Read", "Write", "Edit"]  # client-side tools

[[tools.dynamic]]
name = "my_api"
type = "http"
description = "Call my API"
config = { base_url = "$API_URL", headers = { "Authorization" = "Bearer $TOKEN" } }

[[available_skills]]
id = "*"
name = "*"
---

# System Prompt

Your instructions here. Supports Handlebars templates:
- {{task}} — the user's message
- {{> skills}} — available skills listing
- {{> connections}} — available connections

代理定义文档 对于完整的模式。

______________________________________________________________________

技能

技能是代理按需加载的可重用指令文档:

---
name = "data_pipeline"
description = "How to run the data transformation pipeline"
tags = ["data", "etl"]
context = "inline"
---

# Data Pipeline

## Steps
1. Fetch data with `my_api` tool...
2. Transform using Python...
# Push skills
distri skills push skills/data_pipeline.md
distri skills list

客服电话 load_skill("data_pipeline") 在运行时。两种模式:

  • 内联 (默认)--注入对话的内容在上下文压缩后仍然有效
  • 叉子 --以技巧为指导培养孤立的儿童代理

______________________________________________________________________

React SDK(DistriJS)

在React应用程序中嵌入代理:

npm install @distri/react
import { useAgent, Chat } from '@distri/react';

function App() {
  const { agent } = useAgent({ agentIdOrDef: 'my_agent' });
  return ;
}

功能:SSE流媒体、使用自定义渲染器执行工具、语音I/O、开发人员模式、浏览器端文件工具(IndexedDB支持的读/写/编辑/Glob/Grep)。

DistriJS文档 完整的集成指南。

______________________________________________________________________

CLI参考

服务器和UI

distri serve                        # Start server + UI on port 7777
distri serve --port 8080            # Custom port
distri serve --no-ui                # API-only
distri update                       # Pull latest server + UI
distri version                      # Show versions
distri uninstall                    # Clean ~/.distri/

代理与技能管理

distri                              # Interactive TUI
distri run --task "..." [--agent A] # Run a task
distri run --task "..." --remote    # Run in sandboxed container

distri agents list / push / delete  # Manage agents
distri skills list [-a] / push      # Manage skills

调试和工具

distri traces list / show ID [-v]   # Debug with trace viewer
distri tools list / invoke          # Inspect and test tools

连接和配置

distri connections list / token     # OAuth connections
distri secrets list / set / delete  # Manage secrets
distri workflows run / push         # DAG workflows

distri login                        # Auth with Distri Cloud
distri profile list / use / config  # Multi-profile management

______________________________________________________________________

建筑

distri/
├── distri-types/          # Shared type definitions
├── distri-cli/            # CLI binary
├── distri/                # Client library
├── distri-formatter/      # Output formatting
│
├── server/
│   ├── distri-core/       # Agent engine (orchestrator, loop, tools, LLM)
│   ├── distri-server/     # HTTP server (actix-web, A2A endpoints)
│   ├── distri-stores/     # Storage backends (SQLite, Postgres)
│   ├── distri-auth/       # Auth providers
│   ├── distri-parsers/    # Parsing utilities
│   └── agents/            # Built-in agent definitions (.md)
│
├── distrijs/              # TypeScript SDK
│   ├── @distri/core       # Agent client, A2A streaming
│   ├── @distri/react      # React hooks, Chat component, browser tools
│   └── @distri/components # Shared UI (shadcn/ui)
│
└── samples/               # Example applications
    ├── maps-demo/         # Google Maps + AI chat
    └── scraper/           # Web scraping agent

执行流程

User message → AgentOrchestrator
  → Load agent definition
  → Create ExecutorContext (thread, task, run)
  → AgentLoop
    → PlanningStrategy.plan() → LLM produces plan
    → ExecutionStrategy.execute_step() per step
      → Tool calls (builtin, dynamic, external, MCP)
      → Event streaming (SSE)
    → Loop until final tool or max iterations
  → Return result

______________________________________________________________________

发展

# Build
cargo build

# Run tests
cargo test

# Test a specific crate
cargo test -p distri-core

# DistriJS development
cd distrijs && pnpm install && pnpm dev

______________________________________________________________________

样品

示例类型描述
地图演示React/Vite带有AI聊天功能的交互式谷歌地图
爬虫CLI/RustWeb抓取和数据提取代理

______________________________________________________________________

许可

______________________________________________________________________

链接

目录标签

目录标签

开源AI代理Rust工具集成本地部署Markdown定义

接入字段

传输方式(transport,传输协议)

HTTP

鉴权方式(authType,认证方式)

oauth

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

HTTPoauth部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP