- PowerShell 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| deepseek.ps1 | ||
| mcp-config-example.jsonc | ||
| README.md | ||
| troubleshooting.md | ||
DeepSeek + Google Antigravity — Direct Integration Guide
The problem nobody talked about: Adding DeepSeek via MCP in Antigravity charges you twice — once for DeepSeek, once for Gemini orchestrating the call. This repo documents the better way.
Table of Contents
- The Double-Cost Problem
- What We Tried First
- The Solution
- Full Setup Guide
- Usage
- Audio + Research Workflow
- Cost Comparison
- Why Not MCP?
- Troubleshooting
- Files in This Repo
The Double-Cost Problem
When you connect DeepSeek as an MCP server inside Antigravity, here is what actually happens:
You → Gemini (charged) → DeepSeek MCP tool (charged) → Gemini again (charged) → You
Every DeepSeek call consumes:
- ✅ Your DeepSeek balance (expected)
- ❌ Your Gemini/Antigravity tokens (surprise cost)
This is because Gemini acts as the orchestrator — it reads your prompt, decides to call DeepSeek, sends the data, reads the result back, and then replies to you. All of that burns Gemini tokens.
As Antigravity itself confirmed:
"Every message we exchange — including the data I send to DeepSeek and the results I read back — consumes Gemini tokens. Using DeepSeek does not bypass my token usage; it adds a specialized tool that has its own separate cost."
What We Tried First (and Why It Failed)
Attempt 1 — MCP via npx @latest
"deepseek": {
"$typeName": "exa.cascade_plugins_pb.CascadePluginCommandTemplate",
"command": "npx",
"args": ["-y", "deepseek-mcp-server"],
"env": { "DEEPSEEK_API_KEY": "your-key" }
}
Error:
Error: DeepSeek MCP server connected via stdio: calling "initialize":
invalid character 'â' looking for beginning of value
Why: The @latest version prints a banner to stdout before the MCP handshake, polluting the stdio channel with non-JSON text. The â character is a sign of UTF-8 smart quote corruption.
Attempt 2 — Docker image
docker pull docker.io/dmontgomery40/deepseek-mcp-server:0.4.0
Error:
pull access denied for dmontgomery40/deepseek-mcp-server,
repository does not exist or may require 'docker login'
Why: The Docker image referenced in the README was never actually published to Docker Hub.
Attempt 3 — MCP via npx pinned to @0.3.1
"deepseek": {
"$typeName": "exa.cascade_plugins_pb.CascadePluginCommandTemplate",
"command": "npx",
"args": ["-y", "deepseek-mcp-server@0.3.1"],
"env": { "DEEPSEEK_API_KEY": "your-key" }
}
Result: Connected successfully — but this is where the double-cost problem was discovered. DeepSeek works as a tool but every call still burns Gemini tokens for orchestration.
Also note: DeepSeek does NOT appear in Antigravity's model dropdown. As of April 2026, Antigravity's model selector is a fixed curated list from Google's Vertex Model Garden. There is no "Add Custom Model" option and no OpenAI-compatible endpoint configuration available.
The Solution
Skip the MCP layer entirely. A PowerShell script calls DeepSeek's API directly:
You → deepseek.ps1 → DeepSeek API (charged once) → You
Zero Gemini tokens. Lower latency. Cheaper.
Full Setup Guide
Prerequisites
- Windows 10/11
- PowerShell 5.1+ (comes pre-installed with Windows)
- A DeepSeek API key from platform.deepseek.com
- Google Antigravity installed
Step 1 — Find your Antigravity config folder
The MCP config and scripts live here:
C:\Users\YOUR_USERNAME\.gemini\antigravity\
To find it automatically, run in PowerShell:
Get-ChildItem -Path "$env:APPDATA" -Recurse -Filter "mcp_config.json" 2>$null
Or inside Antigravity press Ctrl + Shift + P and type "Open MCP".
Step 2 — Get your DeepSeek API key
- Go to platform.deepseek.com
- Sign up or log in
- Navigate to API Keys
- Create a new key and copy it
Step 3 — Save the script
Copy scripts/deepseek.ps1 into:
C:\Users\YOUR_USERNAME\.gemini\antigravity\deepseek.ps1
Open the file and replace YOUR_DEEPSEEK_API_KEY with your real key:
$key = "sk-your-actual-key-here"
Step 4 — Create the ds shortcut
Create your PowerShell profile if it does not exist yet:
New-Item -Path $PROFILE -ItemType File -Force
Open it:
notepad $PROFILE
Add this line (update the username):
function ds { & "C:\Users\YOUR_USERNAME\.gemini\antigravity\deepseek.ps1" @args }
Save the file, then reload the profile:
. $PROFILE
Step 5 — Test it
ds -text "hello deepseek"
You should see a response printed directly in your terminal. If you do — you are done. DeepSeek is now a one-keyword command.
Step 6 — (Optional) Clean up your MCP config
Since you are no longer routing DeepSeek through Antigravity, remove the deepseek block from mcp_config.json:
// C:\Users\YOUR_USERNAME\.gemini\antigravity\mcp_config.json
{
"mcpServers": {
"your-mcp-server": {
"$typeName": "exa.cascade_plugins_pb.CascadePluginCommandTemplate",
"command": "npx",
"args": [
"-y",
"your-mcp-package@latest"
],
"env": {
"YOUR_ENV_VAR": "your-value"
}
}
}
}
Usage
# Ask a quick question
ds -text "What is retrieval augmented generation?"
# Analyze a research file
ds -file research.txt -prompt "Summarize the key findings"
# Process an audio transcript
ds -file audio.txt -prompt "Summarize this transcript"
# Extract action items
ds -file notes.txt -prompt "Extract all action items"
# Use the reasoning model for complex analysis
ds -file paper.txt -prompt "Critique this methodology" -model "deepseek-reasoner"
# Default (no prompt = general analysis)
ds -file document.txt
Audio + Research Workflow
DeepSeek does not transcribe audio natively. Use Whisper to transcribe first:
# Install Whisper (one time)
pip install openai-whisper
# Install ffmpeg (one time, required by Whisper)
winget install ffmpeg
# Transcribe audio to text
whisper audio.mp3 --model base --output_format txt
# Send transcript to DeepSeek
ds -file audio.txt -prompt "Summarize this transcript"
# Process research separately in the same session
ds -file research.txt -prompt "Extract key findings and methodology"
Each call is independent, each charged only to DeepSeek, zero Gemini tokens for either.
Cost Comparison
| Approach | DeepSeek Cost | Gemini Cost | Docker Needed | Auto-loads | Works |
|---|---|---|---|---|---|
| MCP via npx @latest | ✅ | ❌ also charged | ❌ | ✅ | ❌ encoding error |
| MCP via npx @0.3.1 | ✅ | ❌ also charged | ❌ | ✅ | ⚠️ double cost |
| Docker image | — | — | ✅ | — | ❌ image missing |
ds script (this repo) |
✅ | ✅ zero | ✅ no | ✅ | ✅ |
Why Not MCP?
MCP is great for giving AI agents access to tools. But in Antigravity's architecture:
- The active model (Gemini) is always the orchestrator
- Every tool call goes through Gemini's context window
- Every byte sent to DeepSeek and every byte received back is processed by Gemini
- You pay for all of it
- DeepSeek never appears in the model dropdown regardless — the list is fixed by Google
For direct tasks like research analysis and audio transcription, a direct API call is faster, cheaper, and simpler.
Troubleshooting
ds not found after opening a new terminal
. $PROFILE
PowerShell says "path not found" when opening profile
Profile does not exist yet. Create it:
New-Item -Path $PROFILE -ItemType File -Force
notepad $PROFILE
ds works in regular PowerShell but not Antigravity's built-in terminal
Antigravity's terminal may not auto-load your profile. Run once per session:
. $PROFILE
401 Unauthorized error
Your API key is wrong or expired. Get a new one at platform.deepseek.com and update deepseek.ps1.
File not found error
Pass the full path or navigate to the right directory first:
cd D:\Projects\Flumenty
ds -file research.txt -prompt "Summarize"
MCP invalid character 'â' error
Smart quotes corruption in your JSON config. Retype the affected block manually — do not paste from a browser. This is also why the ds script approach is better.
Files in This Repo
├── README.md # This file — full guide
├── scripts/
│ └── deepseek.ps1 # The PowerShell script
└── docs/
├── mcp-config-example.jsonc # Clean MCP config without DeepSeek
└── troubleshooting.md # Detailed troubleshooting reference
Tested On
- ✅ Google Antigravity (April 2026)
- ✅ Windows 11 / PowerShell 7
- ✅ DeepSeek API (deepseek-chat and deepseek-reasoner models)
- ✅ Node.js 20+
Contributing
Found a better way? PRs welcome. Especially interested in:
- macOS/Linux bash equivalent of the
dsscript - A version that saves conversation history between calls
- Auto-detection of file type (audio vs text)
- A wrapper that batches multiple files in one call
License
MIT