Introduction¶
In DeepSeek Harness (DSH), integrating the Exa search into the ctx.web seam typically involves handling API keys, provider IDs, and profile configurations. The official package @deepseek-ai/dsh-web-search-exa follows the Exa REST search path; if no key is configured, this provider becomes unavailable.
@tonydua/dsh-web-search-exa provides a zero-configuration variant under the same seam: it defaults to anonymous MCP and automatically switches to Exa REST search when a key is configured.
Plugin Positioning¶
It is an npm package @tonydua/dsh-web-search-exa, maintained by TonyDua, licensed under MIT, and requires Node.js >=18.
This package implements DSH’s WebSearchProvider, registered on the ctx.web seam. Existing web_search / web_fetch tools, prompt sections, and result cards remain unchanged.
Core Capabilities¶
- Key-free by default: Search goes through Exa’s hosted MCP service at
mcp.exa.ai/mcpwithout sending credentials. - Auto-switch to REST with a key: When
EXA_API_KEYis set, it automatically uses Exa’sPOST /searchREST API. - Seam compatibility: Acts as a drop-in provider for dsh
ctx.web, without altering existingweb_search/web_fetchtool behavior. - Switchable provider ID: Coexists with the official
@deepseek-ai/dsh-web-search-exain the same profile viaproviderId. - npm available: MIT licensed, ESM, bundled types.
Installation and Enabling¶
First, install it into the target dsh profile:
dsh plugin --profile web add @tonydua/dsh-web-search-exa
If no API key is configured, the official DeepSeek search provider is unavailable, and DSH seam will automatically select this provider without requiring a key.
If an Exa API key is already configured, you need to explicitly select Exa in $DSH_HOME/profiles/web/cordis.patch.yml:
- id: web
name: '@deepseek-ai/dsh-web'
config:
searchProvider: exa
You can also select it at runtime via an environment variable:
DSH_WEB_SEARCH_PROVIDER=exa
For a local development checkout, you can install using the path:
dsh plugin --profile web add ../plugins/dsh-web-search-exa
After installation, the existing web_search tool will work through this provider without requiring additional tool configuration changes.
Typical Configuration¶
Configuration items exposed by this provider include:
providerId
apiKey
apiKeyEnv
apiURL
mcpURL
searchType
numResults
highlightsPerResult
If you only want to read the Exa key from environment variables, you can configure apiKeyEnv:
apiKeyEnv: EXA_API_KEY
To coexist as an anonymous provider with the official package, assign it a different provider ID, for example:
providerId: exa-anon
Then select this ID in the web seam:
searchProvider: exa-anon
Runtime selection is also possible:
DSH_WEB_SEARCH_PROVIDER=exa-anon
Coexistence with the Official Package¶
Both @tonydua/dsh-web-search-exa and @deepseek-ai/dsh-web-search-exa default to registering provider ID exa and use the same cordis plugin name web-search-exa.
If both packages are installed in the same profile without configuration changes, DSH will throw a WEB_DUPLICATE_PROVIDER error on startup; there is no silent override.
Coexistence requires explicit switching:
- The official
@deepseek-ai/dsh-web-search-exacontinues to useexa. - Configure this plugin with a different
providerId, such asexa-anon. - Select
exa-anonin thewebseam or$DSH_WEB_SEARCH_PROVIDER; to use the official package, selectexa.
Notes¶
The anonymous MCP path does not send credentials and is subject to Exa’s anonymous usage rate limits. If an HTTP 429 occurs, it will be exposed as WEB_PROVIDER_ERROR and prompt for API key configuration; once configured, it will automatically switch to the REST path.
The DSH host profile must ensure that @deepseek-ai/dsh-tools resolves to the same physical package instance; this provider itself does not depend on it. If other plugins in the host profile introduce @deepseek-ai/dsh-tools as a regular nested dependency, correct the dependency declaration first, or ensure the profile’s package manager resolves to a shared instance.
This plugin runs with the current dsh process permissions. Before installation, review the source code, dependencies, and MIT license to confirm they meet your usage requirements.
Links¶
GitHub repository: https://github.com/TonyDua/dsh-web-search-exa