dsh-notion-workspaces: Bind Notion (Official MCP) Separately per DSH Workspace

Preface

When using Notion inside DSH, the common approach is to install a plugin like dsh-notion-mcp that connects the entire environment to a single Notion workspace. In real-world development, there are often multiple DSH workspaces: personal notes, client projects, and learning repositories each get their own path, yet you also want them to correspond to separate, isolated spaces on the Notion side. Holding just one OAuth grant globally means authorizing again overwrites the previous one, which doesn’t match the everyday pattern of “one cwd, one context.” DSH also doesn’t offer workspace-scoped credentials that can be layered on ad hoc — the <cwd>/.env in a project actually has lower priority than the managed credential store, and the desktop host starts one service that handles multiple workspaces.

Below we introduce the community plugin dsh-notion-workspaces (maintained by moyu-777), categorized as a “network tool” in the DSH plugin directory SkillHub. Through the official Notion MCP, it maps “DSH workspace path → Notion workspace authorization” into the agent scope, so each workspace’s session only sees its own set of Notion tools.

What This Is

dsh-notion-workspaces, current version 0.1.0 (MIT), can be summarized in one sentence: it binds each DSH workspace to its own Notion workspace via the official Notion MCP at https://mcp.notion.com, and provides a settings UI for per-workspace authorization.

The gap it fills is fairly clear: dsh-notion-mcp keeps only one Notion grant for the entire DSH environment (the credential ref is fixed to NOTION_OAUTH, a single serverName, and the MCP client is mounted at the profile-global scope); this plugin, by contrast, gives each binding its own credential ref, serverName, and OAuth callback port, and mounts the MCP client into the context of the agent corresponding to that workspace.

How It Works

Binding relationships are stored in $DSH_HOME/notion-workspaces.json; the OAuth grant for each binding is stored separately in the DSH credential store ($DSH_HOME/.credentials.yaml), one ref per binding.

  1. On agent/created, the session’s header.cwd is used to select the applicable binding.
  2. The MCP client is mounted only under this agent, so the mcp__<serverName>__* tools appear only in that workspace’s session; unbound workspaces see no Notion MCP tools at all.
  3. Access tokens are refreshed in the background; agents still holding old tokens are remounted to avoid continuing requests with expired tokens.

Diagnostics can be written to $DSH_HOME/notion-workspaces-diag.log (safe to delete at any time). The plugin’s own documentation states there is no telemetry and no install-time script; network access is limited to https://mcp.notion.com (OAuth discovery, dynamic client registration, token exchange and refresh, MCP streaming).

Installation and Activation

The repository is pure JavaScript (lib/, client/) with no build script declared, so no allowBuilds approval is needed during installation. It requires Node 22.13+ and a DSH profile with a web service (such as desktop or web); a minimal profile can still use CLI paths like dsh notion-workspaces login (see README).

Replace desktop with the profile you actually run agents on (e.g. web, headless):

dsh plugin --profile desktop add github:moyu-777/dsh-notion-workspaces

After installation, the plugin reads and writes credentials and files under $DSH_HOME with the permissions of the current dsh process; before enabling it, review the GitHub source code and the LICENSE / NOTICE yourself.

Configuration Steps

  1. Click Notion at the bottom of the sidebar, next to Settings (the Notion workspaces page in Settings is the same editor).
  2. Add a binding and select the DSH workspace from the list.
  3. Click Authorize. The browser opens the Notion consent page; approve the workspace you want to connect. The callback lands on the running host’s 127.0.0.1:<port>.
  4. Repeat these steps for every DSH workspace that needs Notion. Once binding is complete, tools named like mcp__notion_study__* will appear in that workspace’s session (<serverName> depends on the binding).

Use Cases and Notes

Who it’s for: developers or teams maintaining multiple workspaces within a single DSH installation, where each workspace should connect to a different Notion workspace; when you need to distinguish from a “global single Notion authorization” approach, this plugin is worth evaluating first.

Environment: requires access to https://mcp.notion.com. Peer dependencies include @deepseek-ai/cordis, @deepseek-ai/dsh-credentials, @deepseek-ai/dsh-mcp-client, and others (see the repository’s package.json for details).

Known limitation: there is no extension point on the hover menu (…) of an individual workspace row in the sidebar — sidebar.workspaces has a single slot already occupied by the built-in component, and the client slot has no “single-workspace menu item” slot either, so the entry points can only be the Notion button at the bottom of the sidebar and the Settings page.

Attribution: this is an independent community plugin with no affiliation, endorsement, or sponsorship from Notion Labs, Inc.; using Notion services is still subject to Notion’s own terms. The OAuth implementation is adapted from mingzeng’s dsh-notion-mcp (MIT), and this repository retains the corresponding copyright notice in NOTICE.

Conclusion

If your pain point is “multiple workspaces, multiple Notions, and authorizations that shouldn’t overwrite each other,” dsh-notion-workspaces performs the mapping at the agent scope, which is the design direction explicitly stated in the README. To learn more, open the directory page SkillHub plugin page and the source repository github.com/moyu-777/dsh-notion-workspaces.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye