
Dapr MCP Server
io.github.dapr由 GitHub 账号 dapr 发布v0.0.3更新于 Nov 4, 2026
Dapr state, pub/sub, bindings, secrets, locks, crypto, conversation, actors, invocation as MCP tools
概览
这是一个 Go 编写的 MCP 服务器,连接 Dapr sidecar,把状态、发布订阅、绑定、密钥、锁、加密、actor 和服务调用等能力作为工具提供给 AI 助手。
- 可以做什么
- 查看 sidecar 的组件,并调用服务或 actor 方法
- 读取、保存、批量读取、删除状态条目,以及原子批量事务
- 发布发布订阅事件,可选附带请求头与 TTL 等元数据
- 从已配置的密钥存储中获取单个或批量密钥
- 加密与解密数据,获取和释放分布式锁
- 调用输出绑定访问外部系统,并把请求转交给下游 LLM
- 适用场景
- 适合助手与启用了 Dapr 的应用协同工作,需要读写其状态、发布事件、调用其他服务或 actor,或使用 Dapr 管理的密钥、锁与加密时。只有部署中实际存在的构建块才会注册对应工具。
- 运行要求
- 作为本地进程与 Dapr sidecar 一起运行,通过 dapr run 启动;可用容器镜像、发布版二进制,或用 Go 1.26.6+ 从源码构建。需要 DAPR_GRPC_PORT 指定 sidecar 的 gRPC 端口,若 sidecar 要求则还需 DAPR_API_TOKEN。可选参数可切换为 streamable HTTP 与健康检查。
安装
在 SourceWeft 中
- 打开 控制台中的 Dapr MCP Server,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
dapr-mcp-server
A Model Context Protocol (MCP) server that exposes Dapr's building blocks as tools for AI agents.
What it is
dapr-mcp-server is a Go MCP server that fronts a Dapr sidecar and hands AI agents a curated set of tools over every Dapr building block: state, pub/sub, secrets, service invocation, actors, bindings, distributed locks, cryptography, and conversation components. Tools register dynamically from the live component set — if your deployment has no pub/sub broker, the pub/sub tools aren't exposed.
Two transports are supported: stdio for local IDE integrations (Claude Desktop, Cursor, VS Code, Claude Code) and streamable HTTP for remote or shared deployments. Every tool call is annotated with OpenTelemetry spans, metrics, and optional log export; requests can be gated by OIDC, SPIFFE, Dapr Sentry, or a hybrid of the three.
Full documentation lives at docs.dapr.io / developing-ai / mcp.
Quick start
Run the binary next to a Dapr sidecar with dapr run (install it from Install):
With --http, connect any MCP client to http://localhost:8080/. The container image is meant for Kubernetes, where the Dapr sidecar injector adds the sidecar through the dapr.io/enabled: "true" and dapr.io/app-id pod annotations. For the complete walk-through (components, auth, OTEL, verification), see the getting started guide.
Install
The server is listed in the official MCP Registry as io.github.dapr/dapr-mcp-server, so MCP clients that browse the registry can install it as a container.
Configuration
The configuration guide has the full environment variable reference.
Logs are written as JSON to stderr, so they never mix with the stdio transport on stdout. /readyz returns 503 while the Dapr sidecar is unreachable.
Settings specific to the HTTP transport:
Documentation
AI coding agents contributing to this repo: see AGENTS.md. For human contributors: see CONTRIBUTING.md.
Tools at a glance
All tools, with links to their entries in the tool reference. Core tools are always registered; conditional tools register only when a matching Dapr component exists. The server follows components that Dapr hot-reloads: each time a client lists tools or calls get_components, it checks the sidecar, adds a building block's tools when its first component appears and removes them when its last one goes, and tells connected clients the tool list changed.
Development
See AGENTS.md for the full contributor / AI-agent playbook (build commands, tool-addition pattern, testing strategy, DCO flow).
Contributing
Contributions welcome — open issues via the issue templates, sign your commits per the DCO, and follow the pull request template. See CONTRIBUTING.md for the full workflow.
Security issues: do not open a public issue — follow the Dapr security disclosure process instead.
License
Apache 2.0 — see LICENSE.
来源:README.md,提交 93f9446
工具
0版本历史
1- v0.0.3最新Oct 14, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分