Obsidian MCP Server — Setup, Daily Use & Cloud Migration
Architecture

YOUR WINDOWS MACHINE (local, free)
├── Obsidian App (vault + Local REST API plugin on port 27124)
├── obsidian-mcp-server (HTTP on port 3010, translates MCP ↔ REST)
├── Docker
│ └── n8n container (connects to MCP via host.docker.internal:3010)
└── Cloudflare Tunnel (exposes n8n UI only, NOT the MCP server)Security: Port 3010 is only accessible from your machine + Docker containers. Windows Firewall blocks all external access. Cloudflare tunnel only routes n8n (port 5678). The MCP server is invisible to the internet.
One-Time Setup
1. Install prerequisites (already done if Claude Code works)
2. Create the .env config file
Edit .env.obsidian-mcp and paste your Obsidian API key:
- Open Obsidian > Settings > Community Plugins > Local REST API > copy the API Key
- Replace
PASTE_YOUR_OBSIDIAN_API_KEY_HEREwith your actual key
3. Ensure Docker can reach the host
Check your docker-compose.yml has:
Docker Desktop on Windows usually has this by default, but add it explicitly.
4. Configure n8n MCP Client Tool node
In n8n, on the MCP Client Tool node attached to your Obsidian AI Agent:
| Setting | Value |
|---|---|
| Endpoint | http://host.docker.internal:3010/mcp |
| Server Transport | HTTP Streamable |
| Authentication | None |
| Tools to Include | Selected → pick read-only tools |
5. First test
- Open Obsidian
- Double-click
start-obsidian-mcp.bat - Wait for:
StreamableHttp endpoint: http://localhost:3010/mcp - Optional health check (same terminal or another shell):
Expected response: ok
4. In n8n, open the MCP Client Tool node — tools should now list in the dropdown
5. Run the Obsidian AI Agent node — it should fetch vault context
Daily Commands (3 terminals)
Every time you start your workflow:
Terminal 1: Start Obsidian MCP Server (recommended: watchdog)
Watchdog will health-check /healthz and auto-restart bridge on repeated failures.
Alternative (manual, no watchdog):
Terminal 2: Start n8n Docker
Terminal 3: Start Cloudflare Tunnel
Order matters:
- Obsidian must be open FIRST (REST API needs the app)
- MCP server starts SECOND (needs Obsidian REST API)
- n8n starts THIRD (needs MCP server to list tools)
- Cloudflare tunnel can start anytime (only routes n8n UI)
Shutdown:
- Ctrl+C in Terminal 1 (stops MCP server)
docker compose downin Terminal 2 (stops n8n)- Ctrl+C in Terminal 3 (stops tunnel)
- Close Obsidian whenever
Security Model
Local (current setup) — already secure
| Layer | Protection |
|---|---|
| Windows Firewall | Blocks port 3010 from external access by default |
| Docker bridge network | Only containers on the same Docker network can reach host.docker.internal |
| Cloudflare Tunnel | Only routes port 5678 (n8n), NOT port 3010 (MCP) |
| Obsidian REST API | Requires API key (MCP server uses it internally) |
Nobody on the internet can reach your MCP server. It's local-only.
Cloud (when you migrate) — add JWT auth
When moving to cloud, uncomment these in .env.obsidian-mcp:
Then in n8n:
- MCP Client Tool > Authentication > Bearer Auth
- Create credential with the JWT token
Cloud Migration Guide
When you'd move to cloud
- You want 24/7 uptime (workflows run while your PC is off)
- You want to trigger workflows from webhooks without your PC being on
The hard constraint
Obsidian MCP server needs the Obsidian desktop app running (for the Local REST API). This means cloud deployment requires either:
Option A: Keep MCP local, move only n8n to cloud (recommended, free)
CLOUD (VPS / Oracle Free Tier)
├── n8n (Docker)
└── Cloudflare Tunnel (exposes n8n)
YOUR PC (local)
├── Obsidian (must be open)
├── obsidian-mcp-server (HTTP mode)
└── Tailscale (private VPN, free tier)
└── n8n connects to MCP via Tailscale IPWhy this works:
- Oracle Cloud Free Tier: 4 ARM CPUs, 24GB RAM, always free
- Tailscale: free for personal use (up to 100 devices)
- Your MCP server stays on your PC, only accessible via Tailscale private network
- n8n on cloud calls
http://<your-tailscale-ip>:3010/mcp
Limitation: Your PC must be on for the Obsidian overlay to work.
- If your PC is off, the overlay fails gracefully and n8n uses Portfolio API only.
Setup steps:
- Get Oracle Cloud Free Tier account
- Create an ARM instance (Ampere A1, 4 OCPUs, 24GB RAM)
- Install Docker + n8n on the instance
- Install Tailscale on both your PC and the cloud instance
- Update n8n MCP Client Tool endpoint to:
http://<pc-tailscale-ip>:3010/mcp - Enable JWT auth on MCP server (since traffic crosses the network now)
- Set up Cloudflare tunnel on the cloud instance for n8n UI
Option B: Full cloud with vault sync (advanced, free)
CLOUD (VPS)
├── n8n (Docker)
├── obsidian-mcp-server (Docker sidecar)
├── Obsidian vault files (synced via Git)
└── File-based vault reader (no Obsidian app needed)Approach: Instead of depending on the Obsidian desktop app, sync your vault files to the cloud via Git:
- Push vault to a private GitHub repo (or use Obsidian Git plugin)
- Clone the vault on the cloud instance
- Use a file-based MCP server that reads markdown directly
(e.g.,
stevenstavrakis/obsidian-mcpwhich can work with raw files) - Set up a cron job to
git pullevery 10 minutes
Tradeoff: You lose real-time vault access (10-min delay) but gain full independence from your PC.
Option C: Hybrid — Portfolio API for cloud, Obsidian overlay when local
This is what we already built. The workflow runs fine with just Portfolio API. When your PC is on and MCP server is running, the overlay adds fresh vault context. When your PC is off, the overlay silently falls back.
This is the recommended default. Zero cloud cost. Zero risk. Full quality when local.
Free Tier Reference
| Service | Free Tier | What to use it for |
|---|---|---|
| Oracle Cloud | 4 ARM CPUs, 24GB RAM, 200GB disk, always free | n8n + Docker hosting |
| Tailscale | 100 devices, free for personal | Private VPN between PC and cloud |
| Cloudflare Tunnel | Free, unlimited | Expose n8n UI publicly |
| GitHub | Free private repos | Vault sync (Option B) |
| Render | 750 hours/month free (spins down) | Alternative to Oracle if no ARM support needed |
| Fly.io | 3 shared VMs free | Alternative lightweight hosting |
Troubleshooting
MCP server won't start
- Is Obsidian open? The Local REST API plugin needs the app running.
- Is the API key correct in
.env.obsidian-mcp? - Is port 3010 already in use? Check:
netstat -ano | findstr :3010
n8n can't connect to MCP server
- Is the MCP server running? Check Terminal 1 for the StreamableHttp endpoint line.
- Is Docker Desktop running?
host.docker.internalneeds Docker Desktop. - Check health endpoint from host:
curl http://localhost:3010/healthz(must returnok). - Try from inside Docker:
docker exec -it <n8n-container> curl http://host.docker.internal:3010/healthzdocker exec -it <n8n-container> curl http://host.docker.internal:3010/mcp
- If you see intermittent timeout (
MCP error -32001):- If watchdog is running, wait one cycle (~20-60s) for auto-restart.
- If no recovery, restart Obsidian app.
- Restart watchdog or rerun
start-obsidian-mcp.ps1.
Tools not listing in n8n dropdown
- Connection must work first (see above)
- Try switching Tools to Include to "All", save, then switch back to "Selected"
- Close and reopen the MCP Client Tool node
Obsidian overlay skipped in workflow output
- Check
_meta.obsidianOverlayin the Personal Context Builder output - If it says
skipped: MCP server was unreachable or returned empty data - This is safe — workflow continues with Portfolio API only