dsh-cloudflare-connector
In a curated listMaintenance: Activebeings-labs/dsh-cloudflare-connector
Cloudflare access for DeepSeek Harness agents and plugin developers.
$ dsh plugin add dsh-cloudflare-connectorInstall
dsh has no central install command — add this plugin’s entry (documented in its README) to your profile or patch config, then restart.
How installs work4
stars
4
forks
JavaScript
Language
MIT
License
2026-11-13
Created
2026-11-15
Last push
README
@beings-labs/dsh-cloudflare-connector
Cloudflare access for DeepSeek Harness agents and plugin developers. Sign in through your browser, use the official MCP tools, or call a typed shared service from your own plugin. No Cloudflare API token to create or manage.
The connector talks to the official Cloudflare API MCP server. It keeps the upstream MCP protocol and tool contracts; the shared plugin API is an additional local integration, not a new server or replacement protocol.
Why use it?
- Browser sign-in: Cloudflare OAuth with PKCE, using DSH's existing local web server.
- Agent-ready tools: upstream tools exposed as
mcp__cloudflare_connector__*, with their input schemas preserved. - Built for plugin developers: one shared connection, public TypeScript types, and direct API requests without nested model-facing tool calls.
- Explicit permissions: identity and account discovery by default; resource access requires additional browser consent.
- Persistent sessions: private credential storage, automatic token refresh, and reconnection after restart.
Quick start · Permissions · Configuration · Troubleshooting · Plugin API
Quick start
1. Install in your DSH profile
Install the released package in your DSH profile:
dsh plugin --profile <profile> add @beings-labs/dsh-cloudflare-connector
To use a local development checkout instead, run this from the repository:
npm ci
dsh plugin --profile <profile> add link:/absolute/path/to/dsh-cloudflare-connector
Replace <profile> with the profile you actually run, then restart DSH.
This connector uses its own tool, service, callback, and credential namespaces.
It is not a drop-in replacement for integrations built around another connector's tools.
Before you start: use Node.js 20 or newer and a DSH 0.2.x Desktop or local
Web profile with tools, systemPrompt, and webServer services. Browser OAuth requires a loopback
origin; a remotely hosted DSH Web server is not supported. To invoke tools
through chat, you also need a working model connection in DSH. That is separate
from Cloudflare authorization.
2. Sign in to Cloudflare
Ask your agent:
Call cloudflare_connector_status and cloudflare_connector_authorize.
Open the returned authorizationUrl and approve the requested permissions.
The browser callback completes authorization automatically; return to DSH.
Never paste API tokens, access tokens, or refresh tokens into chat.
The default grant is:
user:read account:read
This allows identity and account discovery, not access to every Cloudflare
resource. Other resource operations may require additional consent.
Cloudflare can also grant offline_access for token refresh; status reports the
actual granted scopes.
3. Verify with a read-only request
Ask your agent:
Test the Cloudflare connection, then list the accounts I can access. Do not modify any resources.
cloudflare_connector_status should report authorized: true and connected: true;
cloudflare_connector_test lists the discovered tools. Upstream tools such as
mcp__cloudflare_connector__execute, mcp__cloudflare_connector__whoami, and
mcp__cloudflare_connector__search are available when advertised by the server.
If the browser callback cannot reach DSH, call cloudflare_connector_finish with
{"code":"<full callback URL>"} through the local DSH tool. A raw code with
optional state is also accepted. Callback URLs contain sensitive, short-lived
parameters: do not share them in issues, logs, or other chats.
Permissions and authorization
When Cloudflare requests another scope, the connector prepares a consent URL
and reports authorization_required or HTTP 403 insufficient_scope.
- Call
cloudflare_connector_authorizeto retrieve the pending URL. - Open it and approve the requested permissions.
- Retry the original operation after authorization and reconnection complete.
The connector uses the server's exact challenged scope list and does not
automatically replay the refused operation.
A plain API 403 without a scope challenge does not start consent automatically.
Check the endpoint's documented permissions and availability rather than
repeatedly reconnecting with the same grant.
To request a known scope proactively, pass {"scopes":["zone.read"]} to
cloudflare_connector_authorize when no flow is pending. Repeated calls during a
pending flow return the same URL; they do not change its scopes. Pending flows
expire after ten minutes.
Scope names are not inferred from product names or API token permission labels.
The connector validates them against the authorization server's
scopes_supported discovery metadata when advertised, before registering a
client or returning a consent URL. For the default server, inspect its
OAuth metadata.
Unsupported scopes produce invalid_scope, not a new consent flow. Correct the
scope list; reconnecting with the same invalid scope will not help.
authorized means credentials are stored, not that every permission is granted.
Pending consent blocks remote calls. To abandon a flow or reduce permissions,
run cloudflare_connector_clear and authorize again with the desired configured scopes.
Clear deletes local credentials; revoke the upstream grant in Cloudflare separately
if needed. Clearing the connector does not sign you out of Cloudflare in your browser.
Agent helper tools
More in Plugin Tooling
dsh-context
by bowenliang123
Context dashboard tab + /context command showing context-window composition, per-turn history, compaction/prune events, per-message token costs
deepseek-harness-control-center
by feibi-mochi
Web control center for DSH: account monitoring, usage accounting, completion alerts, official recharge link, flexible layout, agent-assisted session controls (capability-gated)
dsh-context-doctor
by zhenyu98
DSH 上下文注入审计:统计 AGENTS.md 指令链/技能目录/工具 schema/MCP 的 token 成本,检测跨文件重复与 rank shadow 冲突;Web UI 圆环面板 + context_audit 工具
dsh-balance-plugin
by yxxbc
DeepSeek 余额监控与用量统计:CNY/USD 双余额池多账户查询、低余额告警、官方充值入口、Miyu 风格用量仪表盘、三方插件管理、query_api_quota 模型工具
