DeepSeek Pi MCP
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 Pi MCPstart a coding task to implement a sorting algorithm"
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 Pi MCP
An MCP server that gives local AI agents access to DeepSeek V4 through Pi's coding-agent SDK and provider layer.
Setup
Install dependencies and build:
npm install
npm run buildStore a DeepSeek API key using Pi's credential flow (/login in Pi, selecting DeepSeek). The server intentionally reads Pi's stored deepseek credential and does not accept keys from MCP callers.
Configure approved workspaces as a JSON array of existing directories:
$env:DEEPSEEK_MCP_WORKSPACE_ROOTS = '["C:\\work\\projects"]'If DEEPSEEK_MCP_WORKSPACE_ROOTS is unset, the server defaults to its own working directory at launch. For a global install (e.g. registered once at user scope in Claude Code), leave it unset — each MCP client spawns the server with cwd set to the calling project's directory, so the allowed workspace tracks whichever project invoked it.
Start the stdio server:
npm startAn MCP client can launch the built entrypoint directly. For example:
{
"mcpServers": {
"deepseek-pi": {
"command": "node",
"args": ["C:\\path\\to\\deepseek-pi-mcp\\dist\\index.js"],
"env": {
"DEEPSEEK_MCP_WORKSPACE_ROOTS": "[\"C:\\\\work\\\\projects\"]"
}
}
}
}For a custom Pi data directory, set PI_AGENT_DIR to the directory containing auth.json and models.json.
Governance settings
Variable | Effect |
| When truthy, |
| A JSON policy merged over every caller policy. The result is never weaker than the floor. |
| Path to the same JSON. Takes precedence over the inline variable. |
Both are read once at startup, and the floor's provenance is reported so a caller can tell an absent floor from a configured one.
Related MCP server: Serena
Task policies
start_coding_task accepts a policy describing what the Pi agent may do. The server merges the administrator floor over it and returns the enforced result as policy on every snapshot, alongside toolCalls — a ledger of every allowed and blocked call with its reason.
{
"tools": ["read", "write", "edit", "grep", "find", "ls", "bash"],
"excludeTools": [],
"allowPaths": ["src/**"], // optional; a path must match one
"denyPaths": [".claude/**"], // always beats allowPaths
"confineToWorkspace": true, // every path argument must resolve inside the workspace
"bash": { "mode": "allowlist", "allow": ["^npm test$"], "deny": [] },
"appendSystemPrompt": "…caller's contract text…",
"maxToolCalls": 200,
"timeoutMs": 600000
}Enforcement happens in a tool_call gate that runs after Pi validates the arguments and before the tool executes; a denial reaches the model as a normal tool error carrying the reason, so the agent can react to it rather than silently believing it succeeded. Paths are resolved against the workspace and canonicalized over their longest existing prefix, so .. traversal, absolute paths, and symlinks — whether the link is the final component or an intermediate directory — are all caught.
Globs use ** to cross separators and * within a segment; dir/** also matches dir itself. Merging is designed so a caller can only narrow: deny lists union, allow lists apply as a conjunction (a value must satisfy the floor's set and the caller's), tool lists intersect, the stricter bash mode wins, and numeric caps take the minimum.
Two defaults are worth knowing. A call that supplies no policy keeps the server's historical behavior — all seven tools, unrestricted shell — still subject to the floor. A call that supplies a policy is fail-closed: bash is off and confineToWorkspace is true unless asked for otherwise.
MCP tools
deepseek_chatsends a normalized conversation to eitherdeepseek-v4-flashordeepseek-v4-pro. The model is required on every call. Tool definitions are forwarded and returned tool calls are not executed by this server.start_coding_taskstarts an asynchronous Pi coding session in an approved workspace and returns a task ID.send_coding_task_messagesends a new prompt to an idle task or queuessteer/follow_upinput while it is running.get_coding_task_statusreturns state, recent events, latest assistant text, and Pi usage/cost statistics.get_coding_task_resultreturns the same bounded transcript and final result, withresultAvailableindicating whether the task has settled.await_coding_taskblocks until a task settles or the deadline elapses, then returns the final snapshot. A task that hits the deadline is cancelled rather than left running against the workspace.cancel_coding_taskaborts an active task.close_coding_taskdisposes of a session and removes it from memory.
Coding sessions are resumable only while this server process is alive. Extensions discovered inside a workspace are not loaded, so a repository cannot register its own tools into a governed session.
What the policy layer does not do
Bash is the escape hatch.
confineToWorkspaceconstrains the file tools only. A shell command cancdelsewhere or use absolute paths, so path confinement is only meaningful whenbash.modeisofforallowlist. Declaringunrestrictedtogether withconfineToWorkspace: trueis rejected as a self-contradiction, and any merge that still produces that pairing is reported inpolicy.advisories.An allowlist is not a shell parser.
^npm teston its own would also admitnpm test & del ., so allowlist mode rejects any command containing; & | < >(backtick)% ^,$(,${, or a newline. Legitimate commands needing those characters cannot be allowlisted.An allowed command still runs arbitrary code.
npm testexecutes whatever the project's test script and its dependencies do. The gate controls which command runs, never what that command then does. A workspace whose scripts are untrusted defeats the bash allowlist by construction.grepandfindpatterns are confined but not content-filtered. Their path arguments are checked, but a wildcard sweep inside the workspace can still read a file thatdenyPathswould block a directreadfrom. Omit those tools when read denial has to be airtight.This is a policy layer, not an OS sandbox. Pi still runs with the server user's permissions. It stops a cooperative agent from wandering outside its brief; it is not a containment boundary against a hostile one. The floor binds the calling agent, not the machine's owner, who can always reconfigure and restart the server.
Development
npm run typecheck
npm run build
npm testThis 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 Servers
- AlicenseAqualityDmaintenanceProvides LLM Agents with AI-powered mentorship for code review, design critique, writing feedback, and brainstorming using the Deepseek API, enabling enhanced output in various development and strategic planning tasks.531Apache 2.0
- AlicenseAqualityAmaintenanceA fully featured coding agent that uses symbolic operations (enabled by language servers) and works well even in large code bases. Essentially a free to use alternative to Cursor and Windsurf Agents, Cline, Roo Code and others.2927,995MIT
- Alicense-qualityBmaintenanceLocal-first memory, pipelines, learning, feedback, and safe code tools for AI coding agents.MIT
- Alicense-qualityDmaintenanceA self-improving coding agent MCP server that enables code execution, semantic memory, and reusable skills via sub-agents, turning your AI client into a meta-operating system.2AGPL 3.0
Related MCP Connectors
Helps AI coding agents integrate MetaMask Embedded Wallets (Web3Auth) SDKs.
Non-custodial DeFi for AI agents: swaps, concentrated liquidity (V3/V4) zaps + ranges, 5 EVM chains
Package intelligence MCP for AI agents — 22 tools, 19 ecosystems, AGPL SDK, free.
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/lebobo88/deepseek-pi-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server