AI Skill Hub 推荐使用:塔式MCP工具 是一款优质的MCP工具。AI 综合评分 7.5 分,在同类工具中表现稳健。如果你正在寻找可靠的MCP工具解决方案,这是一个值得深入了解的选择。
塔式MCP工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
塔式MCP工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/joshrotenberg/tower-mcp
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"--mcp--": {
"command": "npx",
"args": ["-y", "tower-mcp"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 塔式MCP工具 执行以下任务... Claude: [自动调用 塔式MCP工具 MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"__mcp__": {
"command": "npx",
"args": ["-y", "tower-mcp"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
Tower-native Model Context Protocol (MCP) implementation for Rust.
tower-mcp provides a composable, middleware-friendly approach to building MCP servers using the Tower service abstraction. Unlike framework-style MCP implementations, tower-mcp treats MCP as just another protocol that can be served through Tower's Service trait.
This means:
| Feature | Description |
|---|---|
full | Enable all optional features |
http | HTTP transport with SSE support (adds axum, hyper) |
websocket | WebSocket transport for full-duplex communication |
childproc | Child process transport for spawning subprocess MCP servers |
oauth | OAuth 2.1 resource server support -- JWT validation, protected resource metadata (requires http) |
jwks | JWKS endpoint fetching for remote key sets (requires oauth) |
http-client | HTTP client transport for connecting to remote MCP servers |
oauth-client | OAuth 2.0 client-side token acquisition -- client credentials grant, auto-discovery, token caching (requires http-client) |
testing | Test utilities (TestClient) for in-process testing |
dynamic-tools | Runtime registration/deregistration of tools, prompts, and resources |
proxy | Multi-server aggregation proxy (McpProxy) |
macros | Optional proc macros (#[tool_fn], #[prompt_fn], #[resource_fn], #[resource_template_fn]) |
resilience | Re-export tower-resilience circuit breaker, rate limiter, and bulkhead layers |
stateless | SEP-1442 stateless MCP mode (experimental) -- serve requests without sessions |
Example with features:
[dependencies]
tower-mcp = { version = "0.9", features = ["full"] }
Add to your Cargo.toml:
[dependencies]
tower-mcp = "0.9"
use tower_mcp::{ToolBuilder, CallToolResult};
use schemars::JsonSchema;
use serde::Deserialize;
#[derive(Debug, Deserialize, JsonSchema)]
struct AddInput {
a: i64,
b: i64,
}
let add = ToolBuilder::new("add")
.description("Add two numbers")
.read_only() // Hint: this tool doesn't modify state
.handler(|input: AddInput| async move {
Ok(CallToolResult::text(format!("{}", input.a + input.b)))
})
.build();
use tower_mcp::{McpRouter, ToolBuilder, CallToolResult};
use schemars::JsonSchema;
use serde::Deserialize;
// Define your input type - schema is auto-generated
#[derive(Debug, Deserialize, JsonSchema)]
struct GreetInput {
name: String,
}
// Build a tool with type-safe handler
let greet = ToolBuilder::new("greet")
.title("Greet")
.description("Greet someone by name")
.handler(|input: GreetInput| async move {
Ok(CallToolResult::text(format!("Hello, {}!", input.name)))
})
.build();
// Create router with tools
let router = McpRouter::new()
.server_info("my-server", "1.0.0")
.instructions("This server provides greeting functionality")
.tool(greet);
// The router implements tower::Service and can be composed with middleware
A full-featured MCP server for querying crates.io is available as a standalone project: cratesio-mcp. A demo instance is deployed at https://cratesio-mcp.fly.dev -- connect with any MCP client that supports HTTP transport.
The repo includes 24 focused examples organized by topic:
| Category | Examples |
|---|---|
| **Getting started** | [getting_started](examples/getting_started.rs) -- tools, resources, prompts, stdio transport |
| **Transports** | [http_server](examples/http_server.rs), [websocket_server](examples/websocket_server.rs), [axum_embedding](examples/axum_embedding.rs) -- mount MCP under /mcp inside an existing axum app |
| **Middleware** | [middleware](examples/middleware.rs) (transport, per-tool, per-resource, per-prompt, guards), [rate_limiting](examples/rate_limiting.rs), [capability_filtering](examples/capability_filtering.rs), [tool_selection](examples/tool_selection.rs) |
| **Authentication** | [http_auth](examples/http_auth.rs), [oauth_client](examples/oauth_client.rs), [external_api_auth](examples/external_api_auth.rs) |
| **Clients** | [client_cli](examples/client_cli.rs), [http_client](examples/http_client.rs), [http_sse_client](examples/http_sse_client.rs) |
| **Bidirectional** | [sampling_server](examples/sampling_server.rs), [client_handler](examples/client_handler.rs) |
| **Dynamic** | [dynamic_capabilities](examples/dynamic_capabilities.rs) -- runtime tool/prompt/resource registration |
| **Advanced** | [proxy](examples/proxy.rs), [resource_templates](examples/resource_templates.rs), [structured_output](examples/structured_output.rs), [error_handling](examples/error_handling.rs), [testing](examples/testing.rs) |
| **Real-world** | [weather_server](examples/weather_server.rs) -- external API integration |
| **Macros** | [tool_macro](examples/tool_macro.rs) -- #[tool_fn], #[prompt_fn], #[resource_fn] |
Clone the repo and the .mcp.json configures example servers automatically:
```bash git clone https://github.com/joshrotenberg/tower-mcp cd tower-mcp
Enable with features = ["macros"]. The macros generate builder code -- you can always eject to the builder pattern for full control.
use tower_mcp::{tool_fn, prompt_fn, resource_fn, resource_template_fn};
use tower_mcp::{CallToolResult, McpRouter};
use tower_mcp::protocol::{GetPromptResult, ReadResourceResult};
#[derive(Debug, Deserialize, JsonSchema)]
struct AddInput { a: i64, b: i64 }
#[tool_fn(description = "Add two numbers")]
async fn add(input: AddInput) -> Result<CallToolResult, tower_mcp::Error> {
Ok(CallToolResult::text(format!("{}", input.a + input.b)))
}
#[prompt_fn(description = "Greet someone", args(name = "Name to greet"))]
async fn greet(args: HashMap<String, String>) -> Result<GetPromptResult, tower_mcp::Error> {
let name = args.get("name").cloned().unwrap_or_default();
Ok(GetPromptResult::user_message(format!("Hello, {name}!")))
}
#[resource_fn(uri = "app://config", description = "App configuration")]
async fn config() -> Result<ReadResourceResult, tower_mcp::Error> {
Ok(ReadResourceResult::text("app://config", "debug=true"))
}
// Each macro generates a constructor: add_tool(), greet_prompt(), config_resource()
let router = McpRouter::new()
.server_info("my-server", "1.0.0")
.tool(add_tool())
.prompt(greet_prompt())
.resource(config_resource());
高质量的MCP实现,值得关注
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ Apache 2.0 — 宽松开源协议,可商用,需保留版权声明和 NOTICE 文件,含专利授权条款。
总体来看,塔式MCP工具 是一款质量良好的MCP工具,在同类工具中具备一定竞争力。AI Skill Hub 将持续追踪其更新动态,建议收藏备用,结合自身场景选择合适时机引入使用。
| 原始名称 | tower-mcp |
| 原始描述 | 开源MCP工具:Tower-native Model Context Protocol (MCP) implementation。⭐6 · Rust |
| Topics | aijson-rpcmcprust |
| GitHub | https://github.com/joshrotenberg/tower-mcp |
| License | Apache-2.0 |
| 语言 | Rust |
收录时间:2026-05-27 · 更新时间:2026-05-30 · License:Apache-2.0 · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端