Below introduces law-star-cn/lawstar-dsh-mcp, which is a plugin for DeepSeek Harness (DSH), intended to solve the cumbersome problem of accessing legal-domain data.
Introduction¶
When building legal agents or applications, integrating authoritative statute data usually requires handling complex authentication flows, such as OAuth authorization. DeepSeek Harness (DSH) supports flexible feature extension through its plugin mechanism. This plugin connects LawStar’s MCP interface with DSH’s storage domain and tool system, allowing users to integrate with a single API Key without configuring OAuth.
Plugin Positioning¶
- Name:
law-star-cn/lawstar-dsh-mcp - Maintainer:
law-star-cn - Category: Model Reasoning
- Positioning: A DeepSeek Harness plugin that provides one-click API Key access to LawStar statute data MCP.
Core Features¶
The plugin mainly provides the following capabilities:
- One-click integration: Providing a LawStar API Key enables statute data capabilities for the current session. The plugin connects through the Streamable HTTP single endpoint
https://api.law-star.com/mcp/pointand automatically injects theAuthorization: Bearer <key>header. - Covers six major tools:
law_semantic_search: semantic search of legal provisionslaw_semantic_clause: retrieval of original legal clause textlaw_statute_list: query statute listslaw_article_recognition: legal clause citation recognition (batch)law_hallucination_check: AI legal clause hallucination checking (batch)law_law_reference: batch retrieval of legal references
- Security and persistence: The API Key is stored in the DSH storage domain (
~/.dsh/storages), with directory permissions set to 0700. After restarting the Host, the Key is automatically restored and the connection reestablished. - Management via conversation: Three built-in management tools are provided for connecting, querying status, and disconnecting:
lawstar_connect: configure the Key and mount the serverlawstar_status: display endpoint, Key (masked), available toolslawstar_disconnect: clear local Key and disable tools
- Coexistence: Supports simultaneous installation and coexistence with other DeepSeek Harness plugins.
Installation and Enablement¶
Prerequisites: DeepSeek Harness (dsh CLI, web profile), Node.js ≥ 20.
Installation steps:
- Add the plugin using the official installation command:
dsh plugin --profile web add @law-star-cn/lawstar-dsh-mcp
dsh webmust be restarted for changes to take effect.
Notes:
During installation, peer dependencies warnings may appear (for example, @deepseek-ai/*). These peer dependencies are included with the DSH web profile, are host dependencies, and do not need to be installed separately; they can be ignored.
Typical Usage¶
After installation and restart, you can enter commands directly in the conversation to manage the connection.
- Connect: Enter “Connect to LawStar MCP” and include the API Key. The system triggers
lawstar_connect, configures the Key, and attempts to mount themcp-lawstarserver. - Check status: Enter “Check LawStar MCP connection status” to trigger
lawstar_status. This displays the endpoint, masked Key, and list of available tools. - Disconnect: Enter “Disconnect LawStar MCP” to trigger
lawstar_disconnect, which immediately clears local credentials and disables the tools.
Using MCP tools:
After a successful connection, the following tools are automatically mounted into the conversation (tool name prefix is mcp__lawstar__):
* Semantic search: Use mcp__lawstar__law_semantic_search, for example, query “punishment for the crime of accepting bribes”.
* Retrieve original text: Use mcp__lawstar__law_semantic_clause to retrieve original legal clause text by law name + article number.
Asynchronous delay: After a successful connection, MCP tools have an asynchronous mounting delay of several seconds. lawstar_connect polls and waits; if it times out, it may still show “mounting in the background”. It is recommended to use lawstar_status to confirm tools are ready before performing complex queries.
Applicable Scenarios and Notes¶
Applicable scenarios:
* Lawyers or legal practitioners who need to directly search the latest statutes and regulations in DSH conversations.
* Developers who need to batch-identify legal clause citations in text or verify the accuracy of AI-generated content.
Security and storage:
* The API Key is written only to ~/.dsh/storages (0700 permissions) and appears only in masked form in conversation history and logs (for example, abcd****wxyz).
* Never add the ~/.dsh directory to any Git repository.
Disconnection mechanism:
* Executing the disconnection operation immediately clears local credentials and disables the tools, ensuring data security.
Summary¶
law-star-cn/lawstar-dsh-mcp simplifies the integration of legal data in DSH by providing a one-click API Key access solution. It uses DSH’s storage domain for secure persistence of the Key and built-in conversational management tools to make connect and disconnect operations transparent and controllable.