D Carmo MCP

MCP设计创作

提供方 d-carmo

设计创作 未标注 会话登录 社区 / 第三方 Claude DesktopClaude

一个基于Rust编写的模块化模型上下文协议服务器,支持stdio和流式HTTP两种传输方式,适用于多种客户端和会话管理场景。

一句话选型结论

按资料字段整理

D Carmo MCP 属于设计创作类 MCP 服务器,传输方式未标注,会话登录,可直接接入 Claude Desktop、Claude,没有现成安装命令,需按官方文档接入。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类设计创作 传输方式未标注 鉴权会话登录 部署方式未标注
GitHub 星标 0 仓库热度,无公开仓库时显示未标注
工具数 1 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

设计创作
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量1暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

支持客户端

适用场景

模型协议Rust本地部署Rust服务器模块化设计JSON-RPC流式传输

安装与配置

未标注 会话登录
上游未给出传输方式
  1. 1
    准备运行环境

    按官方文档确认运行环境(常见为 Node.js 或 Python),装好后再执行安装命令。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后客户端会列出约 1 个工具,随便调一个只读工具确认能返回结果。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
出图与素材

生成配图、图标与素材。

设计稿处理

读取设计稿、批量改尺寸或导出。

内容生成

按主题生成文案与视觉草稿。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 资料标注 1 个工具,职责相对集中,接入后不容易误操作。
  • 已适配 Claude Desktop、Claude,换客户端不用重新研究配置。

先想清楚的地方

  • 没有现成安装命令,需要按官方文档自己填启动命令和参数。
  • 使用前要准备好会话登录对应的凭据,并按最小权限配置。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在设计创作场景里让模型直接调用外部能力的人。
  • 已经在用 Claude Desktop、Claude 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 不方便管理密钥或第三方授权的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
D Carmo MCP当前 1 未标注 未标注 无 2026-05-17
Cursor Talk To Figma MCP Da1c7911 40 未标注 未标注 无 2026-05-17
Blender MCP 17 stdio · 本地进程 本地部署 有 2026-05-18
Nova Canvas MCP Server 2 stdio · 本地进程 本地部署 有 2026-05-17
Figma Context MCP 3aaa8d28 未标注 未标注 支持远程部署 无 2026-05-17
kreuzberg 未标注 stdio · 本地进程 本地部署 有 2026-04-12

服务器档案

设计创作
字段来自项目仓库与公开索引,中文说明由本站标注
提供方d-carmo上游标注的维护方 d-carmo
分类设计创作本站按上游分类展示
连接方式未标注上游未给出传输方式
鉴权方式会话登录远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时未标注 · 未标注本地安装时用到的包标识与运行时
部署类型未标注上游给出的部署形态
最近核验2026-05-17上游最后核验时间

详细介绍

15.9 KB
来自项目仓库与上游目录的原文,未做删改

mcp_server

]

A modular Model Context Protocol server written in Rust.

Supports two transports (selected at runtime via .env):

Transport When to use
stdio Claude Desktop, CLI clients, default
Streamable HTTP Web clients, multi-session, remote access

Contents

  • Architecture
  • How auto-discovery works
  • Configuration (.env)
  • Transports
  • stdio
  • Streamable HTTP
  • Testing
  • stdio
  • Streamable HTTP
  • Build
  • Adding a new Tool
  • Writing tests
  • Adding a new Resource
  • Adding a new Prompt
  • Running tests

Architecture```

src/
├── main.rs # Wires config → engine. Nothing else lives here.
├── config.rs # Reads .env / env vars → Config struct
├── server.rs # McpServer — implements rmcp::ServerHandler using
│ # all registered tools, resources, and prompts
├── engine/
│ ├── mod.rs # Dispatches to stdio or HTTP based on Config
│ └── http.rs # Streamable HTTP transport (Axum + rmcp)
├── tools/
│ ├── mod.rs # McpTool trait + ToolRegistration + all_tools()
│ ├── count_lines.rs # Counts lines in files by extension
│ └── query_db.rs # Executes user-scoped SELECT queries against MySQL
├── resources/
│ └── mod.rs # McpResource trait + ResourceRegistration + all_resources()
└── prompts/
└── mod.rs # McpPrompt trait + PromptRegistration + all_prompts()


### How auto-discovery works

Three layers work together so that dropping a file into a folder is enough:

1. **`build.rs`** — runs before `rustc` on every `cargo build`.  It scans
   `src/tools/`, `src/resources/`, and `src/prompts/` and writes one
   `pub mod ;` line per `.rs` file into `OUT_DIR/_modules.rs`.

2. **`include!`** — each `mod.rs` has a single
   `include!(concat!(env!("OUT_DIR"), "/_modules.rs"))` that pulls in
   the generated declarations.  The Rust compiler sees every file in the
   folder without any manual work.

3. **`inventory` crate** — each plugin file calls `inventory::submit!` once
   at module level.  At link time the linker collects all submissions.
   `all_tools()` / `all_resources()` / `all_prompts()` iterate over them at
   startup.

---

## Configuration (`.env`)

Copy `.env` and edit as needed.  All values have built-in defaults.

| Variable | Default | Description |
|---|---|---|
| `MCP_PORT` | `3333` | TCP port for the Streamable HTTP transport |
| `MCP_LISTENING_ADDRESS` | `127.0.0.1` | Bind address for the Streamable HTTP transport |
| `MCP_COMMUNICATION` | `stdio` | Transport: `stdio` or `Streamable_HTTP` |
| `DB_URL` | — | MySQL host (e.g. `localhost`) — required for `query_db` |
| `DB_NAME` | — | MySQL database name — required for `query_db` |
| `DB_USER` | — | MySQL username — required for `query_db` |
| `DB_PASSWORD` | _(empty)_ | MySQL password — required for `query_db` |

Example — run as an HTTP server on all interfaces:```env
MCP_COMMUNICATION=Streamable_HTTP
MCP_LISTENING_ADDRESS=0.0.0.0
MCP_PORT=3333

Transports

stdio

The default. The client spawns this binary as a subprocess. JSON-RPC
messages are exchanged over stdin/stdout separated by newlines.
eprintln! (stderr) is used for all logging so as not to corrupt the
protocol channel.

MCP client configuration example (Claude Desktop / .mcp.json):```json
{
"mcpServers": {
"mcp-server": {
"command": "/path/to/target/release/mcp_server"
}
}
}


### Streamable HTTP

Implements the Streamable HTTP transport
from the MCP spec (2025-11-25).

The server mounts a single endpoint at `/mcp`:

| Method | Purpose |
|---|---|
| `POST /mcp` | Send a JSON-RPC message.  Response is `application/json` or `text/event-stream` depending on message type. |
| `GET /mcp` | Open a persistent SSE stream for server-initiated messages. |
| `DELETE /mcp` | Explicitly close the session. |

Session management (`MCP-Session-Id`), `MCP-Protocol-Version` header
validation, SSE keep-alive, and stream resumption are all handled internally
by rmcp's `StreamableHttpService`.

---

## Testing

The examples below cover both transports and exercise tools, resources, and
prompts. Adapt the tool name, resource URI, and prompt name to whatever you
have registered.

---

### stdio

The binary reads one JSON-RPC message per line from `stdin` and writes
responses to `stdout`. Pipe a newline-delimited sequence of messages directly
to the binary using a here-document.

#### Initialize```bash
./target/release/mcp_server << 'EOF'
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"curl-test","version":"0.0.1"}}}
EOF

Confirm initialisation (notification — no response)```bash

./target/release/mcp_server << 'EOF'
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"curl-test","version":"0.0.1"}}}
{"jsonrpc":"2.0","method":"notifications/initialized"}
EOF


#### Tools — list```bash
./target/release/mcp_server &lt;&lt; &#x27;EOF&#x27;
{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;id&quot;:1,&quot;method&quot;:&quot;initialize&quot;,&quot;params&quot;:{&quot;protocolVersion&quot;:&quot;2025-11-25&quot;,&quot;capabilities&quot;:{},&quot;clientInfo&quot;:{&quot;name&quot;:&quot;curl-test&quot;,&quot;version&quot;:&quot;0.0.1&quot;}}}
{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;notifications/initialized&quot;}
{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;id&quot;:2,&quot;method&quot;:&quot;tools/list&quot;}
EOF

Tools — call (count_lines)```bash

./target/release/mcp_server << 'EOF'
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"curl-test","version":"0.0.1"}}}
{"jsonrpc":"2.0","method":"notifications/initialized"}
{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"count_lines","arguments":{"path":"/tmp","extension":"rs"}}}
EOF


#### Tools — call (`query_db`)

Executes a user-scoped SELECT query against MySQL. The query must contain
`:user_id` exactly once so results are always filtered to the given user.```bash
./target/release/mcp_server &lt;&lt; &#x27;EOF&#x27;
{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;id&quot;:1,&quot;method&quot;:&quot;initialize&quot;,&quot;params&quot;:{&quot;protocolVersion&quot;:&quot;2025-11-25&quot;,&quot;capabilities&quot;:{},&quot;clientInfo&quot;:{&quot;name&quot;:&quot;curl-test&quot;,&quot;version&quot;:&quot;0.0.1&quot;}}}
{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;notifications/initialized&quot;}
{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;id&quot;:2,&quot;method&quot;:&quot;tools/call&quot;,&quot;params&quot;:{&quot;name&quot;:&quot;query_db&quot;,&quot;arguments&quot;:{&quot;user_id&quot;:&quot;1&quot;,&quot;query&quot;:&quot;SELECT * FROM Entries WHERE user_id = :user_id&quot;}}}
EOF

Resources — list```bash

./target/release/mcp_server << 'EOF'
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"curl-test","version":"0.0.1"}}}
{"jsonrpc":"2.0","method":"notifications/initialized"}
{"jsonrpc":"2.0","id":2,"method":"resources/list"}
EOF


#### Resources — read

Replace the URI with one returned by `resources/list`.```bash
./target/release/mcp_server &lt;&lt; &#x27;EOF&#x27;
{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;id&quot;:1,&quot;method&quot;:&quot;initialize&quot;,&quot;params&quot;:{&quot;protocolVersion&quot;:&quot;2025-11-25&quot;,&quot;capabilities&quot;:{},&quot;clientInfo&quot;:{&quot;name&quot;:&quot;curl-test&quot;,&quot;version&quot;:&quot;0.0.1&quot;}}}
{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;notifications/initialized&quot;}
{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;id&quot;:2,&quot;method&quot;:&quot;resources/read&quot;,&quot;params&quot;:{&quot;uri&quot;:&quot;file:///config/settings.json&quot;}}
EOF

Prompts — list```bash

./target/release/mcp_server << 'EOF'
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"curl-test","version":"0.0.1"}}}
{"jsonrpc":"2.0","method":"notifications/initialized"}
{"jsonrpc":"2.0","id":2,"method":"prompts/list"}
EOF


#### Prompts — get

Replace the name and arguments with values returned by `prompts/list`.```bash
./target/release/mcp_server &lt;&lt; &#x27;EOF&#x27;
{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;id&quot;:1,&quot;method&quot;:&quot;initialize&quot;,&quot;params&quot;:{&quot;protocolVersion&quot;:&quot;2025-11-25&quot;,&quot;capabilities&quot;:{},&quot;clientInfo&quot;:{&quot;name&quot;:&quot;curl-test&quot;,&quot;version&quot;:&quot;0.0.1&quot;}}}
{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;notifications/initialized&quot;}
{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;id&quot;:2,&quot;method&quot;:&quot;prompts/get&quot;,&quot;params&quot;:{&quot;name&quot;:&quot;summarise&quot;,&quot;arguments&quot;:{&quot;text&quot;:&quot;Hello world&quot;}}}
EOF

Each response is written to stdout on its own line as it is processed.
Diagnostic/log output goes to stderr and will not interfere.


Streamable HTTP

Start the server first:```bash
MCP_COMMUNICATION=Streamable_HTTP ./target/release/mcp_server


Every request is a `POST /mcp`. The server returns a `MCP-Session-Id` header
in the `initialize` response; all subsequent requests must include that header.

#### 1. Initialize — capture the session ID```bash
curl -si -X POST http://127.0.0.1:3333/mcp \
  -H &#x27;Content-Type: application/json&#x27; \
  -H &#x27;MCP-Protocol-Version: 2025-11-25&#x27; \
  -d &#x27;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;id&quot;:1,&quot;method&quot;:&quot;initialize&quot;,&quot;params&quot;:{&quot;protocolVersion&quot;:&quot;2025-11-25&quot;,&quot;capabilities&quot;:{},&quot;clientInfo&quot;:{&quot;name&quot;:&quot;curl-test&quot;,&quot;version&quot;:&quot;0.0.1&quot;}}}&#x27; \
  -D /tmp/mcp_headers.txt

# Extract the session ID from the saved headers
SESSION_ID=$(grep -i &#x27;mcp-session-id&#x27; /tmp/mcp_headers.txt | awk &#x27;{print $2}&#x27; | tr -d &#x27;\r\n&#x27;)
echo &quot;Session: $SESSION_ID&quot;

2. Confirm initialisation (notification — no response body)```bash

curl -s -X POST http://127.0.0.1:3333/mcp \
-H 'Content-Type: application/json' \
-H 'MCP-Protocol-Version: 2025-11-25' \
-H "MCP-Session-Id: $SESSION_ID" \
-d '{"jsonrpc":"2.0","method":"notifications/initialized"}'


#### 3. Tools — list```bash
curl -s -X POST http://127.0.0.1:3333/mcp \
  -H &#x27;Content-Type: application/json&#x27; \
  -H &#x27;MCP-Protocol-Version: 2025-11-25&#x27; \
  -H &quot;MCP-Session-Id: $SESSION_ID&quot; \
  -d &#x27;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;id&quot;:2,&quot;method&quot;:&quot;tools/list&quot;}&#x27;

4. Tools — call (count_lines)```bash

curl -s -X POST http://127.0.0.1:3333/mcp \
-H 'Content-Type: application/json' \
-H 'MCP-Protocol-Version: 2025-11-25' \
-H "MCP-Session-Id: $SESSION_ID" \
-d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"count_lines","arguments":{"path":"/tmp","extension":"rs"}}}'


#### 5. Tools — call (`query_db`)

Executes a user-scoped SELECT query against MySQL. The query must contain
`:user_id` exactly once so results are always filtered to the given user.```bash
curl -s -X POST http://127.0.0.1:3333/mcp \
  -H &#x27;Content-Type: application/json&#x27; \
  -H &#x27;MCP-Protocol-Version: 2025-11-25&#x27; \
  -H &quot;MCP-Session-Id: $SESSION_ID&quot; \
  -d &#x27;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;id&quot;:4,&quot;method&quot;:&quot;tools/call&quot;,&quot;params&quot;:{&quot;name&quot;:&quot;query_db&quot;,&quot;arguments&quot;:{&quot;user_id&quot;:&quot;1&quot;,&quot;query&quot;:&quot;SELECT * FROM Entries WHERE user_id = :user_id&quot;}}}&#x27;

7. Resources — list```bash

curl -s -X POST http://127.0.0.1:3333/mcp \
-H 'Content-Type: application/json' \
-H 'MCP-Protocol-Version: 2025-11-25' \
-H "MCP-Session-Id: $SESSION_ID" \
-d '{"jsonrpc":"2.0","id":5,"method":"resources/list"}'


#### 8. Resources — read

Replace the URI with one returned by `resources/list`.```bash
curl -s -X POST http://127.0.0.1:3333/mcp \
  -H &#x27;Content-Type: application/json&#x27; \
  -H &#x27;MCP-Protocol-Version: 2025-11-25&#x27; \
  -H &quot;MCP-Session-Id: $SESSION_ID&quot; \
  -d &#x27;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;id&quot;:6,&quot;method&quot;:&quot;resources/read&quot;,&quot;params&quot;:{&quot;uri&quot;:&quot;file:///config/settings.json&quot;}}&#x27;

9. Prompts — list```bash

curl -s -X POST http://127.0.0.1:3333/mcp \
-H 'Content-Type: application/json' \
-H 'MCP-Protocol-Version: 2025-11-25' \
-H "MCP-Session-Id: $SESSION_ID" \
-d '{"jsonrpc":"2.0","id":7,"method":"prompts/list"}'


#### 10. Prompts — get

Replace the name and arguments with values returned by `prompts/list`.```bash
curl -s -X POST http://127.0.0.1:3333/mcp \
  -H &#x27;Content-Type: application/json&#x27; \
  -H &#x27;MCP-Protocol-Version: 2025-11-25&#x27; \
  -H &quot;MCP-Session-Id: $SESSION_ID&quot; \
  -d &#x27;{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;id&quot;:7,&quot;method&quot;:&quot;prompts/get&quot;,&quot;params&quot;:{&quot;name&quot;:&quot;summarise&quot;,&quot;arguments&quot;:{&quot;text&quot;:&quot;Hello world&quot;}}}&#x27;

10. End the session (optional)```bash

curl -s -X DELETE http://127.0.0.1:3333/mcp \
-H 'MCP-Protocol-Version: 2025-11-25' \
-H "MCP-Session-Id: $SESSION_ID"


---

## Build```bash
cargo build --release

The build script runs automatically — no manual steps required.


Adding a new Tool

  1. Create src/tools/.rs.

  2. Implement the McpTool trait:```rust
    use anyhow::Result;
    use serde_json::{json, Map, Value};
    use crate::tools::{BoxFuture, McpTool, ToolRegistration};

pub struct MyTool;

impl McpTool for MyTool {
fn name(&self) -> &'static str {
"my_tool" // unique snake_case identifier
}

fn description(&amp;self) -&gt; &amp;&#x27;static str {
    &quot;Does something useful&quot;
}

fn schema(&amp;self) -&gt; Map&lt;String, Value&gt; {
    // Must be a JSON Schema object with &quot;type&quot;: &quot;object&quot;
    json!({
        &quot;type&quot;: &quot;object&quot;,
        &quot;properties&quot;: {
            &quot;input&quot;: { &quot;type&quot;: &quot;string&quot;, &quot;description&quot;: &quot;The input value&quot; }
        },
        &quot;required&quot;: [&quot;input&quot;]
    })
    .as_object()
    .unwrap()
    .clone()
}

fn call(&amp;self, params: Map&lt;String, Value&gt;) -&gt; BoxFuture&lt;&#x27;_, Result&lt;String&gt;&gt; {
    Box::pin(async move {
        let input = params[&quot;input&quot;].as_str().unwrap_or(&quot;&quot;);
        Ok(format!(&quot;You said: {}&quot;, input))
    })
}

}


3. **Register** it at the bottom of the same file:```rust
inventory::submit! { ToolRegistration { factory: || Box::new(MyTool) } }
  1. Run cargo build — the tool is live. No other file needs editing.

Writing tests

Add a #[cfg(test)] module in the same file and test call directly:```rust

[cfg(test)]

mod tests {
use super::*;

#[test]
fn returns_expected_output() {
    let tool = MyTool;
    let params = serde_json::json!({ &quot;input&quot;: &quot;hello&quot; });
    let result = tokio::runtime::Runtime::new()
        .unwrap()
        .block_on(tool.call(params.as_object().unwrap().clone()))
        .unwrap();
    assert_eq!(result, &quot;You said: hello&quot;);
}

}


---

## Adding a new Resource

1. **Create** `src/resources/.rs`.

2. **Implement** the `McpResource` trait:```rust
use anyhow::Result;
use crate::resources::{BoxFuture, McpResource, ResourceRegistration};

pub struct ConfigResource;

impl McpResource for ConfigResource {
    fn uri(&amp;self) -&gt; &amp;&#x27;static str {
        &quot;file:///config/settings.json&quot;   // unique URI
    }

    fn name(&amp;self) -&gt; &amp;&#x27;static str {
        &quot;Application Settings&quot;
    }

    fn description(&amp;self) -&gt; Option&lt;&amp;&#x27;static str&gt; {
        Some(&quot;Current application configuration&quot;)
    }

    fn mime_type(&amp;self) -&gt; Option&lt;&amp;&#x27;static str&gt; {
        Some(&quot;application/json&quot;)
    }

    fn read(&amp;self) -&gt; BoxFuture&lt;&#x27;_, Result&lt;String&gt;&gt; {
        Box::pin(async move {
            // Read from disk, database, network, etc.
            Ok(r#&quot;{&quot;theme&quot;: &quot;dark&quot;}&quot;#.to_string())
        })
    }
}
  1. Register it:```rust
    inventory::submit! { ResourceRegistration { factory: || Box::new(ConfigResource) } }

4. **Run `cargo build`**.

---

## Adding a new Prompt

1. **Create** `src/prompts/.rs`.

2. **Implement** the `McpPrompt` trait:```rust
use anyhow::Result;
use serde_json::{Map, Value};
use crate::prompts::{
    BoxFuture, McpPrompt, PromptArg, PromptMessage, PromptRegistration, Role,
};

pub struct SummarisePrompt;

impl McpPrompt for SummarisePrompt {
    fn name(&amp;self) -&gt; &amp;&#x27;static str {
        &quot;summarise&quot;   // unique identifier
    }

    fn description(&amp;self) -&gt; Option&lt;&amp;&#x27;static str&gt; {
        Some(&quot;Summarise a piece of text&quot;)
    }

    fn arguments(&amp;self) -&gt; Vec&lt;PromptArg&gt; {
        vec![PromptArg {
            name: &quot;text&quot;,
            description: Some(&quot;The text to summarise&quot;),
            required: true,
        }]
    }

    fn get(&amp;self, args: Map&lt;String, Value&gt;) -&gt; BoxFuture&lt;&#x27;_, Result&lt;Vec&lt;PromptMessage&gt;&gt;&gt; {
        Box::pin(async move {
            let text = args[&quot;text&quot;].as_str().unwrap_or(&quot;(no text provided)&quot;);
            Ok(vec![PromptMessage {
                role: Role::User,
                text: format!(&quot;Please summarise the following:\n\n{}&quot;, text),
            }])
        })
    }
}
  1. Register it:```rust
    inventory::submit! { PromptRegistration { factory: || Box::new(SummarisePrompt) } }

4. **Run `cargo build`**.

---

## Running tests```bash
cargo test

Each module ships its own unit tests. The tool tests in particular exercise
the actual call logic end-to-end using a real filesystem.

常见问题

6 问
答案由本站依据条目字段整理,不引用上游原文
D Carmo MCP 怎么安装?

资料没有给出安装命令,请到官方仓库或文档按说明接入;这类条目多数是生态应用,或尚未发布可安装包。

D Carmo MCP 怎么在 Claude Desktop、Claude 里配置?

它的传输方式未标注,在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,配置才会生效。

D Carmo MCP 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

D Carmo MCP 需要 API Key 吗?

资料标注需要会话登录认证,使用前准备好对应凭据,并按最小权限配置。

D Carmo MCP 支持哪些客户端?

资料标注支持 Claude Desktop、Claude;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

D Carmo MCP 能提供哪些能力?

资料显示约 1 个工具;能力标签包括 模块化设计、Rust、Claude。具体工具清单以官方文档为准。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 2026-05-17。