Metadata-Version: 2.4
Name: datav-twinfabric-mcp
Version: 1.4.0
Summary: DataV.TwinFabric MCP Server: A server for DataV.TwinFabric integration via the Model Context Protocol (MCP).
Author-email: 橙唯 <chenchengju.ccj@alibaba-inc.com>
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: mcp[cli]>=1.4.1
Requires-Dist: fastmcp>=0.2.0
Requires-Dist: uvicorn
Requires-Dist: fastapi
Requires-Dist: pydantic>=2.6.1
Requires-Dist: dashscope
Requires-Dist: requests

# DataV TwinFabric MCP server

Python bridge for interacting with DataV TwinFabric using the Model Context Protocol (MCP).

## Setup

1. Make sure Python 3.10+ is installed
2. Install `uv` if you haven't already:
   ```bash
   curl -LsSf https://astral.sh/uv/install.sh | sh
   ```
3. Create and activate a virtual environment:
   ```bash
   cd datav-twinfabric-mcp
   uv venv
   source .venv/bin/activate  # On Unix/macOS
   # or
   source .venv\Scripts\activate     # On Windows
   ```
4. Install dependencies:
   ```bash
   uv pip install -e .
   ```

At this point, you can configure your MCP Client (Claude Desktop, Cursor, Windsurf) to use the Unreal MCP Server as per the [Configuring your MCP Client](README.md#configuring-your-mcp-client).

## Test on Cherry Studio
### Method 1

1. Add MCP server in Settings.
 ```
 {
  "mcpServers": {
    "twinfabric_mcp_server": {
      "name": "DataV TwinFabric MCP",
      "command": "uvx",
      "args": [
        "datav-twinfabric-mcp"
      ],
      "env": {
        "LOG_DIR": "D:/", // Log directory
        "UnrealClientId": "D225E4144B548E5B20463AA2A7D2F7A7",//MCP控制的DataV TwinFabric客户端的机器码，需要从客户端的Setting中获取
      }
    }
  }
}
 ```
2. Save and Start the server.
3. Switch to the default assistant page, add MCP server at the bottom, and start your conversations.

### Method 2

0. 本地启动MCP server时，从 pyproject.toml 移除以下内容：
 ```
[build-system]
requires = ["setuptools>=42", "wheel"]
build-backend = "setuptools.build_meta"

[tool.hatch.build]
include = ["datav_twinfabric_mcp/*.py"]
[project.scripts]
datav-twinfabric-mcp = "datav_twinfabric_mcp.twinfabric_mcp_server:run"
 ```
1. Add MCP server in Settings.
 ```
 {
  "mcpServers": {
    "twinfabric_mcp_server": {
      "name": "DataV TwinFabric MCP",
      "command": "uv",
      "args": [
        "--directory",
        "E://workspace//MCP//DTF-MCPServer//datav-twinfabric-mcp//datav_twinfabric_mcp//",
        "run",
        "twinfabric_mcp_server.py"
      ],
      "env": {
        "LOG_DIR": "D:/", // Log directory
        "UnrealClientId": "D225E4144B548E5B20463AA2A7D2F7A7",//MCP控制的DataV TwinFabric客户端的机器码，需要从客户端的Setting中获取
      }
    }
  }
}
 ```
2. Save and Start the server.
3. Switch to the default assistant page, add MCP server at the bottom, and start your conversations.
