deepseek-web
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@deepseek-webExplain the pros and cons of electric vehicles in detail."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
deepseek-local-server
OpenAI-compatible local server backed by chat.deepseek.com through Playwright (Chromium), with the Expert model and the DeepThink (reasoning) toggle enabled by default.
It drives the real DeepSeek Web UI in a persistent browser profile: you log in once, then any OpenAI-compatible client (or the bundled MCP tool) can send chat requests and get DeepThink answers back — no API key for the official API needed.
Architecture mirrors qwen-local-server — see plan.md for port notes and confirmed DOM selectors.
How it works
Client (OpenAI SDK / curl / MCP ask_deepseek)
│ HTTP POST /v1/chat/completions (Bearer token)
▼
deepseek-local-server serve ← FastAPI on 127.0.0.1:9874
│ serializes requests through a single browser worker
▼
Chromium (persistent profile, chat.deepseek.com)
│ selects Expert model → enables DeepThink toggle → sends → polls until the
│ answer is stable (stable_seconds) → extracts text
▼
Answer returned as a standard OpenAI chat completionKey points:
One browser, one request at a time. Requests are queued in the worker; the browser profile is launched lazily on the first request and reused afterwards.
Login is a persistent profile, not stored cookies. The profile lives in
%LOCALAPPDATA%\deepseek-local-server\browser-profile(Windows) — the same directory Chromium uses, so only one process may use it at a time. If anauthwindow is still open,servecannot launch its own Chromium ("profile is already in use").Expert model + DeepThink are on by default. Before every send the worker selects the "Expert" option in the top-bar model picker (Instant/Expert) and turns the DeepThink toggle on (
DEEPSEEK_LOCAL_SERVER_DEEPTHINK=1). Reasoning answers can take minutes — the default request timeout is 300 s.The server only listens on loopback and requires the local bearer token from
init.
Related MCP server: DeepSeek MCP Server
Setup (one-time)
# Windows PowerShell (note: PS 5.1 has no `&&` — use `;` or separate lines)
cd <path-to-repo>
pip install -e .[dev]
python -m playwright install chromiumLinux/macOS use ./.venv/bin/deepseek-local-server instead of ./.venv/Scripts/deepseek-local-server.exe.
Usage
1. Init (creates home dir + API token)
./.venv/Scripts/deepseek-local-server.exe initCreates %LOCALAPPDATA%\deepseek-local-server\ with browser-profile/, token, debug/.
2. Auth (log in once)
./.venv/Scripts/deepseek-local-server.exe authOpens a Chromium window → sign in to DeepSeek → wait until the chat input is visible → press Enter in the terminal (keep the window open until it closes). The profile is saved automatically; you will not need to log in again.
3. Serve (keep running)
In a separate terminal, leave this running:
./.venv/Scripts/deepseek-local-server.exe serveStarts the OpenAI-compatible endpoint at http://127.0.0.1:9874/v1.
4. Verify
./.venv/Scripts/deepseek-local-server.exe doctor
./.venv/Scripts/deepseek-local-server.exe chat "Reply with exactly: SERVICE_OK"doctor prints health + /v1/models; chat sends a real request through the browser.
A healthy end-to-end setup returns SERVICE_OK.
OpenAI-compatible API
$token = Get-Content "$env:LOCALAPPDATA\deepseek-local-server\token"
curl http://127.0.0.1:9874/v1/chat/completions `
-H "Authorization: Bearer $token" -H "Content-Type: application/json" `
-d '{"model":"deepseek-web","messages":[{"role":"user","content":"hi"}],"stream":false}'Any OpenAI SDK works with base_url="http://127.0.0.1:9874/v1" and api_key=<token>.
MCP tool (ask_deepseek)
Runs the same endpoint as a thin stdio MCP wrapper (server name deepseek-web,
single tool ask_deepseek(question, timeout_seconds, new_conversation=False, mode="expert")). It does not start serve
itself — keep serve running separately.
Calls continue the current conversation by default. The MCP process keeps successful
questions and answers in memory and sends the history so the backend can reuse the
active browser chat. Set new_conversation: true to clear history and start a new chat:
{"question": "Remember the code BLUE-CAT-42", "new_conversation": true}
{"question": "What code did I give you?"}
{"question": "Start a different topic", "new_conversation": true}Keep the MCP process alive between calls (Pi: lifecycle: "keep-alive"). Restarting
or reconnecting the process clears its history. Concurrent calls are serialized;
failed calls are not added to history. An explicit reset clears history even if its
request fails. The backend has one active browser chat: if another API/MCP client
replaces it, the next call restores the conversation from history in a new browser chat.
Use mode: "instant" to select Instant without enabling Expert or DeepThink:
{"question": "Give a short answer", "mode": "instant"}
{"question": "Continue", "mode": "instant"}The mode applies to each call and defaults to "expert"; it does not reset chat history.
It can be combined with new_conversation: true. The HTTP /v1/chat/completions
endpoint accepts the same optional mode field. Restart serve and reconnect the
MCP process after updating so both ends recognize the parameter.
Pi (~/.pi/agent/mcp.json):
"deepseek-web": {
"command": "<path-to-repo>/.venv/Scripts/python.exe",
"args": ["-m", "deepseek_local_server", "mcp"],
"cwd": "<path-to-repo>",
"lifecycle": "keep-alive",
"directTools": true,
"requestTimeoutMs": 600000
}Claude Code / Desktop (~/.claude.json or .mcp.json):
"deepseek-web": {
"type": "stdio",
"command": "<path-to-repo>/.venv/Scripts/deepseek-local-server.exe",
"args": ["mcp"]
}After editing the MCP config, restart the agent so it picks up the change.
Tests
./.venv/Scripts/py.test.exe -q # 26 testsConfiguration (environment variables)
All optional; defaults in parentheses.
Variable | Default | Meaning |
|
| Home dir (profile, token, debug) |
|
| Bind address (loopback only, enforced) |
|
| Port |
|
| Target page |
|
| Run Chromium headless (careful: login needs a visible window) |
|
| Per-request browser timeout |
|
| Answer must be unchanged this long before it's accepted |
|
| Poll interval |
|
| Prompt size cap |
|
| Model id exposed via the API |
|
| DeepThink (reasoning) toggle; Expert model is always selected |
|
| Block heavy page resources for speed |
Troubleshooting
BrowserType.launch_persistent_context: Target ... closed/ "profile is already in use" — another Chromium (usually theauthwindow) still holds the profile. Close it and retry.deepseek-local-server is not initialized(fromask_deepseek) — runinit.Could not reach deepseek-local-server at http://127.0.0.1:9874(fromask_deepseek) — startservein a separate terminal.Timed out after ~300 s — normal for long DeepThink answers; raise
DEEPSEEK_LOCAL_SERVER_TIMEOUT_SECONDSor pass a largertimeout_secondstoask_deepseek.Login expired / page changed — re-run
authand log in again.
Project layout
src/deepseek_local_server/
cli.py # init / auth / serve / doctor / chat / mcp
config.py # Settings from env, validation, paths
auth.py # local API token
service.py # request queue + browser worker orchestration
browser/ # Playwright manager, DOM selectors, worker (send/poll/parse)
api/ # FastAPI app: /health, /v1/models, /v1/chat/completions
openai/ # OpenAI schema/content helpers
mcp_server.py # ask_deepseek stdio MCP wrapper
tests/ # 26 unit tests (config, dom, content, chat mode, tool protocol, MCP server, browser manager)Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
- QuallaaOAuthcom.quallaa
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Stealth web browser for agents: search, fetch, click, download and type in persistent MCP sessions.
Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only
Related MCP Servers
- AlicenseAqualityAmaintenanceEnables integration of DeepSeek's language models with MCP-compatible applications, offering features like chat completion, custom model selection, and parameter control for enhancing language-based interactions.7495351MIT
- AlicenseDqualityDmaintenanceAllows seamless integration of DeepSeek's language models with MCP-compatible applications like Claude Desktop, supporting features such as model selection, temperature control, and multi-turn conversations with automatic model fallback.24952MIT
- AlicenseAqualityDmaintenanceEnables using DeepSeek models as a small, cheap supervised worker from any MCP-compatible client, providing fast flash and deep reasoning tools for bounded tasks.253MIT
- AlicenseAqualityBmaintenanceBridges MCP clients to the DeepSeek API for chat completions and model discovery, with an optional locked-down bridge that delegates prompts to local CLI harnesses like Claude, Codex, or opencode.425MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/arnyigor/deepseek-local-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server