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 分