DSH HUB
首页插件商店插件包社区排行榜资源发布指南
插件源码
返回插件目录

baidu /

baidu/aiqicha-dsh-mcp-oauth

已验证

A DeepSeek Harness (DSH) plugin that connects the "Aiqicha Business Information" MCP service to DSH through OAuth sign-in.

★ 0 Stars0 Forks0 IssuesN/A 社区评分0 已确认安装
查看 GitHub项目主页
README来源: main@da08464f

aiqicha-dsh-mcp-oauth

A DeepSeek Harness (DSH) plugin that connects the "Aiqicha Business Information" MCP service to DSH through OAuth sign-in.

Once connected, the model can query company registration data, shareholders, outbound investments, business risks, intellectual property and more. The service endpoint is https://agent.aiqicha.com/mcp/aqc-all.

How it works

The plugin uses the OAuth 2.0 authorization code flow with PKCE (S256 only). The client obtains its client_id through dynamic client registration (RFC 7591), so no secret has to be applied for in advance.

  1. When the plugin activates without a valid authorization, it starts authorization and opens the browser automatically. You can also have the model call aiqicha_connect, which returns an authorization URL.
  2. Open the URL in a browser, sign in to your Aiqicha account and approve access. The browser is redirected back to a callback port on 127.0.0.1.
  3. The plugin exchanges the code for tokens and registers the Aiqicha MCP service with the DSH MCP manager. The model can then use its tools.
  4. Before the access token expires, the plugin replaces it with the refresh token automatically.

Within a DSH profile, the Aiqicha business, legal, and tender plugins share one authorization when using their default connection settings. Authorize from any plugin and the other enabled plugins connect automatically. Only one authorization is started when several plugins activate at the same time. Forced authorization updates the shared account, and disconnecting clears authorization for all three plugins. After upgrading from an older version, authorize once in the current profile. Custom OAuth or MCP settings continue to use separate authorization.

Tokens are stored only in the DSH credential provider. They never appear in logs, tool results or this repository.

Tools

Tool Purpose
aiqicha_connect Starts authorization and returns the authorization URL. Does nothing if already connected; pass force: true to authorize again.
aiqicha_status Shows the connection state: disconnected, pending, connected or reauth-required.
aiqicha_disconnect Revokes the tokens (best effort), unregisters the MCP service and clears local credentials.

reauth-required means the refresh token is no longer valid. Call aiqicha_connect again.

Configuration

Every option has a default, so you normally do not need to change anything. Override them in the profile patch when needed.

Option Default Description
issuer https://agent.aiqicha.com OAuth authorization server
resource https://agent.aiqicha.com/mcp/aqc-all MCP endpoint
clientName DeepSeek Harness - 爱企查 MCP Client name reported during dynamic registration
scope mcp Requested scope
serverName aiqicha Service name registered with the MCP manager
tokenRef AIQICHA_MCP_ACCESS_TOKEN Access token reference prefix in standalone mode
callbackPort 0 Local callback port. 0 prefers the previous port and falls back to a random port. A nonzero value uses standalone authorization
openBrowser true Whether to try to open the browser when authorization starts
autoConnect true Start authorization and open the browser automatically when the plugin activates without a valid grant; set to false to disable
authTimeoutMs 300000 Maximum time to wait for the user to authorize
refreshSkewSec 120 How many seconds before expiry the token is refreshed
requestTimeoutMs 15000 Timeout of a single network request

Usage

The package is published to npm as aiqicha-dsh-mcp-oauth. Install it into a DSH profile; a global npm install -g is not picked up by DSH.

Install from npm (recommended)

dsh plugin --profile web add aiqicha-dsh-mcp-oauth

Restart DSH afterwards. For the desktop client, fully quit it first and use the desktop profile:

dsh plugin --profile desktop add aiqicha-dsh-mcp-oauth

The package declares dsh.bundle, so the CLI registers it in dsh.profile.bundles of ~/.dsh/profiles/<profile>/package.json. If it does not show up there, add "aiqicha-dsh-mcp-oauth" to that array yourself and restart.

Install from GitHub

dsh plugin --profile web add github:baidu/aiqicha-dsh-mcp-oauth

Install from a local checkout

Clone the repository. No dependency installation is required: the runtime code statically imports only node: built-ins, and @deepseek-ai/schemastery is an optional dependency used for configuration validation and the settings form. Without any node_modules the plugin still loads and registers its tools, and configuration falls back to the built-in defaults (autoConnect, openBrowser, issuer, … can still be overridden in a profile patch).

git clone https://github.com/baidu/aiqicha-dsh-mcp-oauth.git
dsh plugin --profile web add "link:$(pwd)/aiqicha-dsh-mcp-oauth"

On Windows PowerShell, use "file:$((Get-Location).Path)" instead of the link: form. In the desktop client you can also click "Add plugin" on the Plugins page and choose the repository directory.

Without the CLI, write a patch file whose name is the absolute path of lib/index.js, and pass it with --patch when starting DSH:

# my.patch.yml
- insert:
    - id: aiqicha
      name: /absolute/path/to/aiqicha-dsh-mcp-oauth/lib/index.js
dsh web --patch ./my.patch.yml

Run npm install inside the checkout only when you want the settings form and typed validation.

After switching between a local directory and a package installation, fully quit and restart DSH: it may still resolve the old path. Do not keep both a link: installation and a package installation.

Verify

On activation the plugin opens the authorization page automatically and the state is pending. Ask the model to call aiqicha_status; the state becomes connected after authorization. If the page did not open, call aiqicha_connect to get the authorization URL.

Upgrade and uninstall

dsh plugin --profile web update aiqicha-dsh-mcp-oauth
dsh plugin --profile web remove aiqicha-dsh-mcp-oauth

After removing a package that was registered in dsh.profile.bundles, also drop it from that array.

Security

  • Only https URLs are accepted, except loopback addresses. The authorization server metadata and every endpoint are validated.
  • The callback server listens on 127.0.0.1 only and accepts GET /callback only. A request with a mismatched state is rejected and does not consume the authorization.
  • Authorization codes, tokens and PKCE verifiers never appear in logs or error messages.
  • A failed revocation does not block local cleanup.

Development

Requires Node.js 20 or later.

npm install
npm test

Tests use the built-in node:test, and the authorization server is simulated locally, so they do not reach the network. They cover PKCE, metadata discovery, callback validation, the full authorization flow, token refresh and rotation, reauth-required, disconnecting, and the absence of sensitive data in logs.

The host @deepseek-ai/dsh requires Node.js 24.9 or later.

License

Apache-2.0. See LICENSE.

—/ 5

暂无评分

已验证 DSH bundle

Commit da08464fe1fb

社区评论

还没有评论,来写第一条。

DSH HUB

社区维护的 DSH 插件索引。不是 GitHub 或 DeepSeek AI 的官方产品。

社区资源API关于