Dsr Mcp Server

io.github.grupo-avispa由 GitHub 账号 grupo-avispa 发布v1.0.1更新于 Nov 3, 2026

An MCP server that provides tools for interacting with Deep State Representation (DSR) graphs.

概览

AI 生成的概览

让助手查询、修改并导出用于机器人感知与场景理解的 Deep State Representation(DSR)图。

可以做什么
  • 检查 DSR 连接状态,读取整张图或按类型筛选节点
  • 查看单个节点的属性与边,或列出全部边
  • 插入节点与边,并设置或更新节点和边的属性
  • 从图中删除节点与边
  • 将当前图状态保存为 JSON 文件
  • 通过只读资源读取节点、按类型筛选的节点、单个节点及边
适用场景
适用于已运行 DSR 图的机器人感知或场景理解环境,希望助手查看、标注或清理节点与关系,或将图快照导出为 JSON 的场景。
运行要求
以 stdio(或 HTTP 模式)在本地运行,需要 Python 3.12+、fastmcp 框架和 Cortex DSR 库,且 Cortex 需在虚拟环境中构建。需要可访问的 DSR 服务器,通过 DSR_AGENT_ID、DSR_NAME、SERVER_HOST 和 SERVER_PORT 配置。仅支持桌面端。
安装前请注意
多个工具会写入图:insert_node、insert_edge、insert_edge_attribute、update_node、delete_node 和 delete_edge 可能改动或删除实时的机器人感知数据,使用前请确认目标。save_graph 会把 JSON 文件写入交互选择的路径。请只连接你有权修改的 DSR 实例。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Dsr Mcp Server,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

DSR MCP Server

[License] [Build]

An MCP (Model Context Protocol) server that provides a comprehensive set of tools to query, manipulate, and analyze Deep State Representation (DSR) graphs. This server enables AI assistants to interact with robot perception and scene understanding data through standardized MCP tools with real-time graph operations and intelligent node relationship management.

Tools

Tool NameDescriptionParameters
check_dsr_connectionCheck DSR connection and return status information—
get_all_nodesRetrieve all nodes from the DSR graph—
get_nodes_by_typeFilter nodes by their type (e.g., robot, person, room)node_type: str
get_node_detailsGet detailed information about a specific node including attributes and edgesnode_identifier: str
get_all_edgesRetrieve all edges from the DSR graph—
insert_nodeInsert a new node into the DSR graphname: str, node_type: str
insert_edgeInsert a new edge between two nodes in the DSR graphorigin_id: str, destination_id: str, edge_type: str
insert_edge_attributeInsert or update an attribute for an edge in the DSR graphorigin_id: str, destination_id: str, attribute_name: str, attribute_value: str, attribute_type: str = 'string'
update_nodeUpdate a node with new attributes in the DSR graphnode_id: str, attribute_name: str, attribute_value: str, attribute_type: str = 'string'
delete_nodeDelete a node from the DSR graphnode_id: str
delete_edgeDelete an edge from the DSR graphorigin_id: str, destination_id: str, edge_type: str
save_graphSave the current state of the DSR graph to a JSON fileInteractive file path selection

Resources

Resources provide read-only, efficient access to DSR graph data. They are ideal for querying information without modifying the graph state.

Resource URIDescriptionReturns
dsr://nodesAll nodes in the DSR graph with basic informationJSON with nodes array, count, and DSR name
dsr://nodes/type/{type}Nodes filtered by type with full details (attributes, edges)JSON with detailed nodes array, count, and type
dsr://nodes/{node_id}Detailed information about a specific nodeJSON with node details, attributes, and connected edges
dsr://edgesAll edges in the DSR graphJSON with edges array, count, and DSR name

Environment Variables

VariableDefaultDescription
DSR_AGENT_ID42Unique agent identifier for DSR connection
DSR_NAMEmcp_serverTarget DSR graph name to connect to
SERVER_HOST127.0.0.1Server host address
SERVER_PORT3000Server port number

Installation

Dependencies

  • fastmcp: MCP server framework (>= 2.2.7)
  • Cortex: DSR library for graph operations
  • Python: 3.12+ required

Note: You must build Cortex inside the virtual environment to ensure compatibility.

bash
cd dsr_mcp_serversource .venv/bin/activatecd ${CORTEX_DIR} && make -p build && cd buildcmake .. && make -j$(nproc) && sudo make install

Install with uv (recommended)

Clone the repository and install with uv:

bash
git clone https://github.com/grupo-avispa/dsr_mcp_server.gitcd dsr_mcp_serveruv sync

Or install directly from the repository:

bash
uv add git+https://github.com/grupo-avispa/dsr_mcp_server.git

Install with pip

Install the package in mode:

bash
git clone https://github.com/grupo-avispa/dsr_mcp_server.gitcd dsr_mcp_serverpython3 -m pip install .

Or install directly from the repository:

bash
python3 -m pip install git+https://github.com/grupo-avispa/dsr_mcp_server.git

Usage

Running with uv

bash
uv run dsr_mcp_server

Running with pip installation

bash
python3 -m dsr_mcp_server

The server will start and attempt to initialize the DSR connection automatically using the configured parameters.

Configuration example for Claude Desktop/Cursor/VSCode

Using uv (recommended)

Add this configuration to your application's settings (mcp.json):

json
{  "dsr mcp server": {    "type": "stdio",    "command": "uv",    "args": [      "run",      "--directory",      "/path/to/dsr_mcp_server",      "dsr_mcp_server"    ],    "env": {      "DSR_AGENT_ID": "42",      "DSR_NAME": "your_dsr_graph_name"    }  }}
Using pip installation
json
{  "dsr mcp server": {    "type": "stdio",    "command": "python3",    "args": [      "-m",      "dsr_mcp_server"    ],    "env": {      "DSR_AGENT_ID": "42",       "DSR_NAME": "your_dsr_graph_name"    }  }}
HTTP Server Mode

For HTTP transport integration:

json
{  "servers": {    "dsr_mcp_server": {      "type": "http",      "url": "http://localhost:3000/mcp"    }  }}

Technical Notes

  • Connection to DSR is performed with automatic initialization and connection monitoring.
  • Node attributes are filtered to exclude internal rendering properties (color, depth, height, level, etc.) for cleaner output.
  • Edge relationships support various types including spatial (near), ownership (has), identity (is), and association (is_with) semantics.
  • Graph operations maintain consistency through the DSR library's built-in validation mechanisms.
  • All tools return standardized JSON responses with success/error status and detailed information.
  • Interactive file selection for graph export operations through MCP elicit mechanism.
  • Resources provide read-only, idempotent access to DSR graph data with efficient caching and lower overhead compared to tools. Use resources for querying data and tools for modifications.

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes following the coding conventions
  4. Add tests if applicable
  5. Submit a pull request

Support

For issues, questions, or contributions, please refer to the project's issue tracker or contact the development team.

来源:README.md,提交 fba845f

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.0.1最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分