DeepSeek dsh Browser Automation ⚡ (MCP + Nullprint)
Learn DeepSeek dsh browser automation with MCP browser automation + Nullprint MCP. Set up an agent harness, automate a safe browser profile—get started!

How to Drive a Real Browser Profile with DeepSeek dsh and MCP
Browser automation often starts small: open a page, check its title, or see which profiles are running. The hard part is turning that into something you can trust - without wiring up a custom integration for every single action you want to automate.
DeepSeek's dsh agent harness can connect to tools via the Model Context Protocol (MCP). When you connect it to Nullprint, you can send a plain-language request that creates a browser profile, starts it, navigates to a page, reads the result, and then closes the profile. That can be very useful - as long as the MCP config actually loads, the agent is editing the profile you expect, and you understand what data is flowing through the agent.
This guide walks through the setup, calls out the configuration detail that most often causes a "works on my machine" silent failure, and shows how to verify and test the connection. It also covers remote setups and practical safety boundaries. The commands and behavior described here were tested with dsh 0.2.1-rc.2 and nullprint-mcp 0.1.3. Since dsh is a pre-release, check the current project docs if anything changed.
Understand the Setup Before Installing
This integration is basically three moving parts working together:
dsh, DeepSeek's agent harness, which takes a task and coordinates tool calls.- MCP, the protocol
dshuses to talk to external tools. - Nullprint, which manages browser profiles and exposes browser actions through its MCP server.
In practice, it works like this: you describe a task, dsh picks the relevant Nullprint tools, and Nullprint runs actions inside a browser profile. For example, the agent can create a profile, start it, visit a page, inspect the page title, and close the profile when it's done.
That's different from running a one-off browser script. Here, the agent interprets your request and decides which tools to use. So the request needs to be specific, and tool permissions should be treated like permissions - not suggestions. "Open shop-01 and go to example.com" is fairly bounded. A broad "browse around, make changes, and handle accounts" request is not.
Check the package source
Install DeepSeek's harness from npm. There's a dsh package on PyPI, but it isn't the official DeepSeek harness referenced in this guide. Using the wrong package manager or package name can send you down a totally unrelated setup.
Also, this setup assumes Nullprint is already running and signed in on the same machine for the local case. The MCP server reads Nullprint's local connection file, so you don't need to copy ports or API keys between local services by hand.
Know which dsh profile you are editing
dsh has two modes that matter here:
- Web mode opens a chat page in your browser.
- Headless mode runs a task from the command line and exits.
These modes use different profiles and different configuration. If you add the MCP server to the headless profile, it won't automatically show up in web mode. Decide which mode you're actually going to use before editing anything.
There's also a small gotcha: the profile's configuration folder is created only after that profile runs at least once. Start the mode you plan to use before you go looking for (or editing) its configuration file. Otherwise, you'll edit a path that doesn't exist yet.
Install dsh and Configure the MCP Server
You'll need Node.js, a DeepSeek API key, and a working Nullprint installation signed in on the same machine. The commands below install the harness and MCP server, then make the API key available to dsh:
npm install -g @deepseek-ai/dsh
export DEEPSEEK_API_KEY=sk-your-key
pipx install nullprint-mcp
Use your real API key in your shell environment. Don't paste it into a command you plan to share, and don't save it in a public log. Install and start Nullprint separately, then sign in there before you try any browser actions.
Initialize the profile you will use
For headless mode, run a small task once. For web mode, start the web interface. This is what gives dsh a chance to create the right profile directory and the configuration files.
Once the profile exists, edit its cordis.patch.yml file. The path is:
~/.dsh/profiles/<web or headless>/cordis.patch.yml
Swap <web or headless> with the profile you plan to use. Then add the Nullprint MCP server like this:
- insert:
- id: mcp-nullprint
name: '@deepseek-ai/dsh-mcp-client'
config:
serverName: nullprint
transport: stdio
command: nullprint-mcp
args: []
That - insert: wrapper matters. In this patch format, - insert: means "add a new entry." If you add a bare entry like - id: mcp-nullprint, it may be treated as a modification to an existing entry. If there's no matching entry, the patch can effectively be ignored - dsh may still start normally, just without the Nullprint tools.
So don't stop at "it starts." Confirm the server definition is actually present in the resolved configuration before asking the agent to use it.
Check the resolved configuration
Dump the resolved config for the same profile you edited:
dsh --profile headless --dump-config
If you configured web mode, use the corresponding web profile name instead. Search the output for mcp-nullprint. If it's missing, check the file path, profile name, YAML indentation, and the insert wrapper before you waste time debugging the browser itself.
When it's loaded, the tools will show up with names like:
mcp__nullprint__profile_startmcp__nullprint__session_goto
The exact tool list depends on the MCP server version. The naming pattern can help, but the resolved configuration dump is the first thing to check when a tool call fails.
Run a Browser Task and Verify the Result
Once the MCP server is configured and Nullprint is running, try a bounded headless task:
dsh --profile headless 'Use Nullprint to create a new profile, open example.com, tell me the page title, then close the profile.'
The intended sequence is straightforward: dsh asks Nullprint to create a profile, starts it, navigates to the page, reads the title via the available browser evaluation tool, and closes the profile. The new profile should appear in the Nullprint app.
This test checks more than "can dsh reach an MCP server." It exercises the whole workflow - from profile creation to cleanup. If you only test a single navigation call, you can miss problems in profile startup or shutdown.
Keep the first request narrow
For the first run, use a public, low-risk page such as example.com. Avoid accounts with personal data, payment info, or sensitive business records. The goal is to validate the connection and the sequence - not to see how much control you can hand to the agent.
After the basic flow works, you can try narrower operational tasks like:
- List my profiles and identify which ones are running.
- Open
shop-01and navigate toexample.com. - Visit a public page, report its title, and then close the profile.
Profile names are case-sensitive. If the agent requests a profile name with different capitalization, it may not find the profile you meant. Use the exact name shown in Nullprint, especially if you have profiles that represent different environments or accounts.
Troubleshoot in a useful order
If it doesn't work, start outside-in:
- Confirm the right profile was initialized. Web mode and headless mode don't share configuration.
- Inspect the configuration dump. Make sure
mcp-nullprintshows up in the resolved output. - Check the MCP entry structure. The server definition needs to be under
- insert:with correct YAML indentation. - Confirm Nullprint is running and signed in. The local connection depends on a working Nullprint install.
- Check the tool name and profile capitalization. MCP won't "fix" mismatches in tool names or profile capitalization.
- Reduce the request to one action at a time. Try listing profiles first, then start one, then navigate. This helps pinpoint which step is failing.
Don't begin by swapping ports or pasting credentials into local config. In the same-machine setup, nullprint-mcp reads Nullprint's local connection file automatically. Adding extra connection settings can create a second problem without solving the real one.
Remote Access, Security, and Operational Limits
A local setup is easier because the MCP server can discover Nullprint's local connection details. If dsh runs on a different machine than the Nullprint daemon, you'll need to configure the remote endpoint and API key using NULLPRINT_DAEMON_URL and NULLPRINT_API_KEY.
One important environment-variable behavior: when dsh launches an MCP server, it removes inherited environment variables whose names include strings like KEY, TOKEN, SECRET, or PASSWORD. That means exporting NULLPRINT_API_KEY in your shell may not be enough. Pass the variables explicitly in the MCP server config instead:
env:
NULLPRINT_DAEMON_URL: !!js process.env.NULLPRINT_DAEMON_URL
NULLPRINT_API_KEY: !!js process.env.NULLPRINT_API_KEY
This pulls values from the process environment without writing the key into the YAML file itself. Don't paste a live API key into a YAML file that might get committed, backed up somewhere, or shared with another person. Use environment variables or a proper secret-management system, and restrict access to the machine/account that can use it.
Treat the browser profile as a privileged environment
The agent operates inside a signed-in browser profile. That's convenient, but it changes the risk profile. A signed-in session can expose private email, customer accounts, internal dashboards, or admin controls. Tool access isn't just "load a webpage" - it's access to whatever that browser session can reach.
There's also a data-flow issue: everything you send to dsh, and every page content it reads, goes through DeepSeek's servers. Don't use sensitive profiles unless you're comfortable with that data flow and it's allowed under your organization's policies and privacy requirements. In the UK or EU, that may mean reviewing GDPR obligations and your data-processing rules. Compliance depends on your actual setup - not on the fact that you're using MCP.
For anything high-impact, keep a human in charge of the risky steps:
- Enter logins, passwords, and 2FA codes yourself in the browser window.
- Keep payments, password changes, account deletion, and other consequential actions under direct human control.
- Use a separate, least-privileged profile for automation when you can.
- Ask the agent to close the profile when the task finishes.
- Start with public pages and low-sensitivity workflows while you're validating the integration.
These aren't theoretical edge cases. Agents can misread instructions, and pages can contain unexpected content. Restricting what a profile can access usually prevents "small mistake" from turning into a big one. It's typically safer to give the agent access to a narrow test profile than to tell it, in vague terms, to avoid anything dangerous.
Understand the limits of a pre-release integration
The tested versions - dsh 0.2.1-rc.2 and nullprint-mcp 0.1.3 - are specific points in time. Pre-release tooling doesn't guarantee that newer releases keep the same configuration format or behavior. Treat the examples here as version-dependent. If tool names or config formats differ, check the DeepSeek harness repository and the Nullprint dsh guide.
Also separate reliability from capability. A successful tool call shows the agent can trigger an action through the integration. It doesn't prove it interpreted a complex request correctly, read all relevant parts of a page, or finished a consequential workflow safely. Keep tasks specific, inspect results, and structure the workflow so mistakes are recoverable.