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

MCP Execution

MCP Server

将MCP服务器转换为可执行、类型安全的TypeScript工具,实现按需加载以节省98%的token使用。

工具数

0

提示词数

0

GitHub Stars

42

资源数

0
代码执行RustClaude类型安全Claude

安装说明

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

作者 / 组织

bug-ops

提供方

bug-ops

最后核验

2026/5/17 20:21

快速接入

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

详细介绍

MCP代码执行

![Crates.io](https://crates.io/crates/mcp-execution-cli) ![docs.rs](https://docs.rs/mcp-execution-core) ![CI](https://github.com/bug-ops/mcp-execution/actions/workflows/ci.yml) ![codecov](https://codecov.io/gh/bug-ops/mcp-execution) ![MSRV](https://blog.rust-lang.org/2025/01/23/Rust-1.91.0.html) ![License](LICENSE.md)

使用渐进加载模式将任何MCP服务器转换为可执行的、类型安全的TypeScript工具。实现 98%的代币节省 只装载你需要的东西。

\[!提示\] 受...启发 Anthropic的工程博客文章 关于使用MCP执行代码。

问题

传统的MCP集成从服务器加载所有工具(约30000个令牌),即使您只需要一两个。这浪费了上下文窗口空间并减慢了AI代理的速度。

解决方案

渐进式加载为每个工具生成一个TypeScript文件(每个约500-1500个令牌)。AI代理通过简单的方法只发现和加载他们需要的东西 lscat 命令。

结果: 98%的代币节省 + 自主执行 + 型式安全

安装

来自crates.io(推荐)

cargo install mcp-execution-cli

Pre-built binaries

下载自 :

# macOS (Apple Silicon)
curl -L https://github.com/bug-ops/mcp-execution/releases/latest/download/mcp-execution-cli-macos-arm64.tar.gz | tar xz

# macOS (Intel)
curl -L https://github.com/bug-ops/mcp-execution/releases/latest/download/mcp-execution-cli-macos-amd64.tar.gz | tar xz

# Linux (x86_64)
curl -L https://github.com/bug-ops/mcp-execution/releases/latest/download/mcp-execution-cli-linux-amd64.tar.gz | tar xz

# Linux (ARM64)
curl -L https://github.com/bug-ops/mcp-execution/releases/latest/download/mcp-execution-cli-linux-arm64.tar.gz | tar xz

# Windows (x86_64)
# Download mcp-execution-cli-windows-amd64.zip from releases page

From source

git clone https://github.com/bug-ops/mcp-execution
cd mcp-execution
cargo install --path crates/mcp-cli

As a library

将单个板条箱添加到您的项目中:

cargo add mcp-execution-core          # Foundation types
cargo add mcp-execution-introspector  # MCP server analysis
cargo add mcp-execution-codegen       # TypeScript generation
cargo add mcp-execution-files         # Virtual filesystem
cargo add mcp-execution-skill         # SKILL.md generation

或添加到 Cargo.toml:

[dependencies]
mcp-execution-core = "0.7"
mcp-execution-introspector = "0.7"
mcp-execution-codegen = "0.7"
\[!重要\] 需要Rust 1.91或更高版本才能从源代码构建。

用法

生成TypeScript工具

# 1. Configure MCP server in ~/.claude/mcp.json
# 2. Generate tools
mcp-execution-cli generate --from-config github

# Output: ~/.claude/servers/github/
#   - createIssue.ts
#   - updateIssue.ts
#   - ... (one file per tool)

渐进式加载

# List available tools
ls ~/.claude/servers/github/

# Load only what you need (98% token savings!)
cat ~/.claude/servers/github/createIssue.ts

# Execute autonomously
node ~/.claude/servers/github/createIssue.ts --repo="owner/repo" --title="Bug"
\[!注意\] 每个工具文件都包含完整的TypeScript接口和JSDoc文档。

主要特点

特性描述
98%的代币节省加载1个工具(约500个令牌)与所有工具(约30000个令牌)
自主执行生成的文件直接通过Node.js CLI运行
类型安全来自MCP JSON模式的完整TypeScript接口
迅速的比目标快526倍(10个工具为0.19ms)
100%MCP兼容通过以下方式与所有MCP服务器配合使用 rmcp SDK
经过彻底测试626次测试,通过率100%

工作区板条箱

板条箱描述
mcp执行核心基础类型、特征和错误处理
mcp执行内省者使用rmcp SDK进行MCP服务器分析
mcp执行代码生成器使用渐进加载生成TypeScript代码
mcp执行文件用于代码组织的虚拟文件系统
mcp执行技巧Claude代码的SKILL.md生成
mcp执行服务器用于渐进式加载生成的MCP服务器
mcp执行cli命令行界面

依赖图:

mcp-execution-cli → {mcp-execution-codegen, mcp-execution-introspector, mcp-execution-files, mcp-execution-core, mcp-execution-skill}
mcp-execution-server → {mcp-execution-codegen, mcp-execution-introspector, mcp-execution-files, mcp-execution-core, mcp-execution-skill}
mcp-execution-codegen → {mcp-execution-introspector, mcp-execution-core}
mcp-execution-files → mcp-execution-codegen
mcp-execution-introspector → {rmcp, mcp-execution-core}
mcp-execution-skill → mcp-execution-core

CLI命令

mcp-cli自述文件 供充分参考。

# Generate TypeScript tools from config (recommended)
mcp-execution-cli generate --from-config github

# Preview what would be generated without writing to disk
mcp-execution-cli generate --from-config github --dry-run

# Introspect MCP server from config
mcp-execution-cli introspect --from-config github

# Introspect with detailed schemas
mcp-execution-cli introspect --from-config github --detailed

# Manual configuration (alternative)
mcp-execution-cli introspect docker --arg=run --arg=-i --env=TOKEN=xxx

# Shell completions
mcp-execution-cli completions bash
\[!提示\] 使用 --from-config 从加载服务器设置 ~/.claude/mcp.json 而不是手动参数。

演出

指标目标已实现
10个工具生成\ \[!注意\]
所有发展如下 微软Rust指南.

MSRV政策

支持的最低Rust版本: 1.91

MSRV的增加被认为是次要的版本升级。

许可证

根据以下任一许可 Apache许可证2.0MIT许可证 由您选择。

目录标签

目录标签

代码执行RustClaude类型安全本地部署按需加载Token优化MCP集成TypeScript生成

支持客户端

Claude

接入字段

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

未说明

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

token

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

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

0

权限和风险

未说明token部署方式未说明

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

安装前确认

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

仍需确认:installCommand

来源信息

继续浏览同类 MCP