Introduction

DeepSeek Harness (DSH) supports extending capabilities through plugins. If you need to connect Chinese legal data when building or running agents locally, the huayu-yuandian-legal-data plugin provides an official integration solution. It introduces the aggregated MCP entry point of the Yuandian Open Platform into DSH and ships four official Skills for regulations, cases, enterprises, and securities compliance.

Plugin Overview

  • Plugin name: huayu-yuandian-legal-data
  • Maintainer: yuandian-ailaw
  • Version: 0.1.5
  • Compatibility: DeepSeek Harness >=0.1.2-rc.1 <0.2.0, Node.js >=22.19.0

Core Capabilities

This plugin mainly solves the problem that the Yuandian Open Platform interfaces cannot be directly called in a DSH environment.

  1. MCP entry point integration
    By default, it connects to the aggregated MCP entry point of the Yuandian Open Platform (https://open.chineselaw.com/mcp). After installation, the plugin attempts to discover and register all tools under this entry point.

  2. Official Skill integration
    It ships with four official Skills, covering major legal research scenarios:

    • prc-legal-research-law-search: Search for laws, regulations, articles, and their effectiveness status.
    • prc-legal-research-case-search: Search for judgments, authoritative cases, and similar cases.
    • prc-legal-research-company-search: Query enterprise business registration, risks, litigation, equity, and intellectual property.
    • prc-legal-research-securities-compliance: Search for securities regulations, regulatory cases, and listed company announcements.
  3. Tool registration and authentication

    • Naming: The registered name for MCP tools is mcp__yuandian__<original tool name>.
    • Authentication methods: Supports OAuth (Authorization Code + PKCE S256) and API Key authentication.
    • Connection mechanism: Supports bounded tool pagination, duplicate cursor checks, notifications/tools/list_changed, full-generation recovery, bounded exponential backoff reconnection, invocation timeouts, and cancellation.

Installation and Configuration

Install from a Local Directory

Run the following command in the terminal to use a local directory as the plugin source:

dsh plugin --profile web add /absolute/path/to/huayu-yuandian-legal-data

Install from a tarball

If you have already obtained the officially published archive, install it with the following command:

dsh plugin --profile web add /absolute/path/to/huandu-yuandian-legal-data-0.1.5.tgz

Configure Authentication

After installation, the DSH settings page will show a “Huayu Yuandian Legal Data” entry. The default configuration uses automatic authentication mode: if no credentials are configured during installation and initial load, the plugin remains idle and does not initiate an MCP connection. The plugin only establishes a connection after the user clicks “Start OAuth Authorization” in the settings page or saves an API Key.

The following is a common configuration example (YAML format). Modify it according to your needs:

- id: huayu-yuandian-legal-data
  config:
    endpoint: https://open.chineselaw.com/mcp
    serverName: yuandian
    auth:
      mode: auto
      callbackPort: 1455
      openBrowser: true
      timeoutMs: 300000
    httpTimeoutMs: 60000
    toolCallTimeoutMs: 60000
    failOnStartupError: true
    reconnect:
      enabled: true
      initialDelayMs: 500
      maxDelayMs: 30000
      maxAttempts: 10

If you need to force API Key usage on a server or in CI, override auth.mode to api-key and provide the corresponding credentials in the startup environment variables.

Usage Examples

  1. First-time authorization: Click “Start OAuth Authorization” on the DSH settings page. A browser will open; after authorization is completed, the plugin automatically establishes the connection.
  2. API Key mode: Save the API Key in the settings page; the plugin will then use that Key directly for MCP calls.
  3. Calling tools: In DSH interactions, you can directly call the registered tools (for example, mcp__yuandian__law_search).

Notes

  1. Functional boundary: The current plugin only bridges MCP tools; it does not bridge resources or prompts.
  2. Side-effect protection: If reauthorization is required while running, failed tool calls are not automatically replayed, to avoid repeatedly executing operations with side effects.
  3. Data disclaimer: The legal data returned by tools should be verified with respect to source, timeliness, and applicable scope, and does not constitute legal advice without review by qualified professionals.
  4. License: The project’s original code uses the MIT License. The Skills and brand Logo distributed with the package are separately licensed and are not covered by the MIT License.

Conclusion

This plugin provides DSH users with a standard entry point for connecting to Huayu Yuandian Chinese legal data. It is suitable for developers who need to handle Chinese legal research, compliance inquiries, and similar tasks in a local environment. Full catalog information and the source repository are listed below.

  • Catalog page: https://www.skillhub.cn/plugins/yuandian-ailaw/yuandian_dsh_plugin
  • GitHub repository: https://github.com/yuandian-ailaw/yuandian_dsh_plugin