Miro板小部件管理服务器

Widgets MCP Server是一个实现Model Context Protocol (MCP)的服务,通过REST API与Miro板小部件集成,使AI系统能够通过创建和管理便签以及检索审计日志与Miro板交互。

  • by MaratMingazov
  • Java
  • 本地部署
  • 更新于
在 GitHub 查看 MaratMingazov/widgets-mcp-server

使用说明

MCP服务器小部件

概述

MCP服务器小部件 是实现 模型上下文协议(MCP) 通过REST API与Miro板部件集成。它使AI系统能够通过创建和管理便签以及检索审计日志与Miro板进行交互。该服务器提供了AI模型可用于自动化电路板操作和分析电路板活动的工具。

用例

  • 董事会小部件管理:自动创建和删除Miro板上的便签。
  • 审计日志分析:检索和分析董事会活动日志以跟踪更改和事件。
  • 人工智能驱动的协作:使用大型语言模型来协助使用MCP协议创建板内容和活动监控。

MCP服务器连接

当Claude连接到Widgets MCP服务器时,会发生以下初始化序列:

2026-01-27T14:05:30.097Z [info] [widgets-mcp-server] Server started and connected successfully
2026-01-27T14:05:30.160Z [info] [widgets-mcp-server] Message from client: {"method":"initialize","params":{"protocolVersion":"2025-06-18","clientInfo":{"name":"claude-ai","version":"0.1.0"}},"jsonrpc":"2.0","id":0}
2026-01-27T14:05:31.496Z [info] [widgets-mcp-server] Message from server: {"jsonrpc":"2.0","id":0,"result":{"protocolVersion":"2024-11-05","serverInfo":{"name":"widgets-mcp-server","version":"1.0"}}}
2026-01-27T14:05:31.497Z [info] [widgets-mcp-server] Message from client: {"method":"tools/list","params":{},"jsonrpc":"2.0","id":1}
2026-01-27T14:05:31.504Z [info] [widgets-mcp-server] Message from server: {
    "jsonrpc":"2.0","id":1,
    "result":{
        "tools":[
            {
                "name":"create StickyNote",
                "description":"create a sticky note widget (sticker) on a miro board",
                "inputSchema":{
                    "properties":{
                        "boardKey":{"type":"string","description":"Miro board key for a sticker creation"},
                        "text":{"type":"string","description":"The text to be displayed on the sticker"},
                        "x":{"type":"integer","format":"int32","description":"Sticker position x coordinate"},
                        "y":{"type":"integer","format":"int32","description":"Sticker position y coordinate"}
                    }
                }

            },
            {
                "name":"delete StickyNote",
                "description":"delete a sticky note widget (sticker) on a miro board",
                "inputSchema":{
                    "properties":{
                        "boardKey":{"type":"string","description":"Miro board key for a sticker creation"},
                        "stickyNoteId":{"type":"integer","format":"int64","description":"StickyNote id for deletion"}
                    }
                }
            },
            {
                "name":"get audit logs",
                "description":"retrieve audit logs for a miro board with pagination",
                "inputSchema":{
                    "properties":{
                        "boardKey":{"type":"string","description":"Miro board key for audit logs retrieval"},
                        "offset":{"type":"integer","format":"int32","description":"Offset for pagination (starting from 1)"},
                        "limit":{"type":"integer","format":"int32","description":"Limit of records to retrieve (default 20)"
                        }
                    }
                }
            }
        ]}}

此日志显示:

  1. Claude与MCP服务器之间的服务器初始化和握手
  2. 协议版本协商(客户端使用2025-06-18,服务器响应2024-11-05)
  3. 工具发现-客户端请求可用工具,并收到三个工具及其模式的列表

安装

您可以从以下网址下载预编译的JAR文件 发布 页面或自己构建项目。

选项1:使用预构建的JAR

  1. 从下载最新版本 发布 页面。
  2. 放置 .jar 将文件放在所需位置。

选项2:从源代码构建

git clone https://github.com/MaratMingazov/widgets-mcp-server.git
cd widgets-mcp-server
mvn clean package

结果 .jar 文件将位于 target/widgets-mcp-server-1.0.0.jar.

配置

在运行服务器之前,请确保您有以下可用服务:

  • 便签服务 运行于 http://localhost:8080
  • 审计日志服务 运行于 http://localhost:8050

这些端点可以在中配置 src/main/java/com/github/maratmingazov/config/AppConfiguration.java.

连接MCP服务器

如果您正在使用 克劳德桌面版 在MacOS或Linux的应用程序中,您可以在以下位置找到配置文件:

~/Library/Application\ Support/Claude/claude_desktop_config.json

将以下配置添加到文件中:

{
  "mcpServers": {
    "widgets-mcp-server": {
      "command": "java",
      "args": [
        "-jar",
        "/path/to/widgets-mcp-server-1.0.0.jar"
      ]
    }
  }
}

替换 /path/to/widgets-mcp-server-1.0.0.jar 与您的实际路径 .jar 文件。

工具

便签

  • 创建StickyNote -在Miro板上创建便签小部件(贴纸)

    • boardKey (必填):用于贴纸创建的Miro板键
    • text (必填):标签上显示的文本
    • x (可选):贴纸位置x坐标
    • y (可选):贴纸位置y坐标
  • 删除StickyNote -从Miro板上删除便签小部件(贴纸)

    • boardKey (必填):用于删除贴纸的Miro板键
    • stickyNoteId (必填):用于删除的StickyNote id

审计日志

  • getAuditLogs -使用分页检索Miro板的审计日志

    • boardKey (必填):用于检索审计日志的Miro板密钥
    • offset (可选):分页偏移量(从1开始,默认值:1)
    • limit (可选):要检索的记录限制(默认值:20)

Claude使用getAuditLogs工具检索和显示审核日志信息的示例

示例用法

以下是一个示例提示,您可以使用它来指示Claude或其他LLM代理与Miro板进行交互:

I want you to create sticky notes on a Miro board and then retrieve the audit logs.
Please follow these steps:
1 - Create a sticky note with text "Task 1: Research"
2 - Create another sticky note with text "Task 2: Implementation"
3 - Retrieve the audit logs to see the recent changes on the board

建筑

服务器由以下组件构建:

  • 弹簧靴4.0.1 -应用框架
  • Spring AI MCP服务器入门版1.0.0-M6 -MCP协议实现
  • Java 17 -运行时环境

服务器作为非web应用程序运行(使用 web-application-type: none)并使用MCP协议通过stdio进行通信。

许可证

本项目根据 许可证 文件。


请随时在 问题 页面。