linkup-mcp
Optionally integrates with ElevenLabs for voice and music asset generation via the elevenlabs-gen CLI, enabling AI voice synthesis capabilities.
Provides Gmail integration as part of the stitch-bridge extras, enabling OAuth-based email access and management within the Stitch application.
Integrates with Ollama to run local AI models (e.g., llama3.2) for RAG (Retrieval Augmented Generation) and other inference tasks, providing privacy and zero API costs.
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., "@linkup-mcpSearch the web for recent AI research papers"
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.
Cursor Linkup MCP Server
Custom MCP (Model Context Protocol) server for Cursor IDE with:
π Web Search - Deep web searches using Linkup API
π RAG (Retrieval Augmented Generation) - Query documents using LlamaIndex with Ollama
β¨ Key Features
β Local AI - Uses Ollama (llama3.2) for complete privacy
β Zero API Costs - RAG tool is completely free (uses local models)
β Source Citations - Know where answers come from
β Multiple Document Types - Supports PDF, DOCX, MD, TXT, and more
β Cursor Integration - Works seamlessly in Cursor IDE
Related MCP server: Web Search MCP
π Prerequisites
Python 3.12+
uv package manager
Ollama installed locally with llama3.2 model
Linkup API key (optional, only for web search)
π Quick Start
1. Clone & Install Dependencies
git clone https://github.com/RanneG/linkup_mcp.git
cd linkup_mcp
uv syncDefault install (uv sync / pip install -e .) is Cursor MCP + RAG only (lighter venv). For stitch_rag_bridge.py, face/OAuth/Gmail, and server-side voice STT, add --extra stitch-bridge. For ElevenLabs voice/music asset generation (elevenlabs-gen CLI), add --extra elevenlabs β see docs/elevenlabs/README.md.
2. Install Ollama & Model
# Download from https://ollama.ai/download
# Then pull the model:
ollama pull llama3.23. Configure Environment (Optional)
Create a .env file for web search (RAG works without API keys):
LINKUP_API_KEY=your_linkup_api_key # Optional, for web_search tool4. Configure Cursor
Add to ~/.cursor/mcp.json (or C:\Users\<username>\.cursor\mcp.json on Windows):
{
"mcpServers": {
"linkup-server": {
"command": "C:\\Users\\YOUR_USERNAME\\AppData\\Local\\Microsoft\\WindowsApps\\python.exe",
"args": [
"-m", "uv", "run",
"--directory", "C:\\path\\to\\linkup_mcp",
"python", "server.py"
]
}
}
}Replace YOUR_USERNAME and path with your actual values.
5. Free local dev ports (optional)
If 8765 (Stitch bridge / bundled UI), 1420 (Tauri), or 5173 (Vite) are stuck after a crash, run Close-DevPorts.bat at the repo root (or .\scripts\Close-StitchDevPorts.ps1). Use -DryRun to list listeners without killing. This stops processes listening on those ports, not βlocalhostβ itself.
6. Restart Cursor & Use!
In Cursor's chat:
"Use the rag tool to tell me about [topic]"
"Use the rag_stitch tool to get a UI-ready answer payload"
"Search the web for [query]" (requires Linkup API key)
Local Whisper (no Linkup):
whisper_stt_statusthentranscribe_wav_filewith a path to a.wavfile. Requirespip install -e ".[stitch-whisper]"and a Cursor MCP restart.
7. Voice-to-prompt hotkey tool (offline)
Use voice_prompt_tool.py for one-shot dictation directly into your coding flow:
uv sync --extra stitch-whisper --extra voice-prompt
python voice_prompt_tool.py --hotkey ctrl+shift+vWhat it does:
global start/stop hotkey for microphone capture
local faster-whisper transcription (offline)
file reference extraction (
auth.ts->@auth.ts)prompt envelope copied to clipboard:
[FILE REFERENCE: ...][TASK: ...]
Optional direct paste after copy:
python voice_prompt_tool.py --autopasteπ Using the RAG Tool
Add documents to the data/ folder:
data/
βββ document1.pdf
βββ notes.md
βββ research/
βββ paper.pdfSupported: PDF, DOCX, TXT, MD, HTML, and more.
Stitch-style response shape
The rag tool now returns a JSON string with:
answer: final synthesized answer textconfidence:low,medium, orhighfallback:truewhen evidence is weak/insufficientsources: ranked source snippets (source_id,score,snippet)
The rag_stitch tool returns a UI-oriented JSON string:
state:answeredorfallbackanswerconfidence(low,medium, orhigh)source_cards(empty whenstateisfallbackso the UI stays clean)show_sources(falseon fallback)debug_retrieval_cards(only whenSTITCH_RAG_DEBUG=1and fallback β raw top chunks for debugging)
Repository split (Stitch production)
The Stitch desktop app (React + Tauri) is migrating to RanneG/stitch-app; linkup_mcp remains the MCP server and HTTP bridge for local RAG, OAuth, subscriptions, face, and in-app help. Cutover checklist and file inventory: docs/stitch/MIGRATION.md (see docs/stitch/README.md).
stitch-api-types (TypeScript)
NPM workspace packages/stitch-api-types publishes .d.ts for POST /api/rag/stitch, POST /api/rag/stitch-help, GET /api/health, and related payloads. Build from repo root: npm run build:stitch-api-types. stitch-app can depend on it with a file: path (see stitch-app docs/BACKEND.md).
Stitch HTTP bridge (for the Stitch desktop app)
Run a small Flask server that exposes the same payload as rag_stitch, plus optional local face verification (/api/face/*, DeepFace + OpenCV liveness β see face_verification/). Requires stitch-bridge extras:
uv sync --extra stitch-bridge
.\.venv\Scripts\python.exe stitch_rag_bridge.pyThen point the Stitch appβs Vite dev proxy at http://127.0.0.1:8765 (see stitch-app docs/BACKEND.md or integrations/stitch/README.md; proxy /api for RAG, face, auth, subscriptions, and help routes).
Who needs what: Anyone can run the Stitch UI from stitch-app with Node (see docs/RUNNING.md). linkup_mcp is required for /api/* backend capabilities (auth, data, RAG, face, server-backed Help).
Develop Stitch UI from this repo (optional)
Root scripts npm run dev:browser, npm run dev:desktop, npm run build:stitch-web, npm run build:stitch-app use scripts/run-stitch-ui.mjs, which resolves STITCH_APP_ROOT or sibling ../stitch-app only. See docs/stitch/MIGRATION.md.
Stitch single-window GUI
The canonical bundled flow now starts from stitch-app (Stitch.bat there). It uses this repo for backend bridge capabilities when needed.
Build the Stitch desktop bundle inside stitch-app (
npm run build).Run
Stitch.batfrom stitch-app root.Keep this repo available for the bridge runtime (
stitch_rag_bridge.py) on127.0.0.1:8765.
Stitch as a native desktop app (no long manual command chain)
Stitchβs apps/desktop package uses Tauri for a real windowed app (npm run dev there = tauri dev). Run these from stitch-app:
Goal | What to do |
One double-click (bridge + sync + Tauri) | Run |
Same from a terminal |
|
Bridge already running | Start Stitch from stitch-app and keep this repo bridge on |
Tauri only (you start the bridge yourself) |
|
Browser tab only (no Tauri) |
|
Packaged |
|
You need Node on PATH and a local stitch-app clone (sibling ../stitch-app or STITCH_APP_ROOT). The first Tauri dev run may compile Rust dependencies (one-time wait).
Quick regression run
To run the v1 prompt suite against your local PDF corpus:
python rag_regression.pyThis prints each response payload and a small summary (sourced count, fallback count, low-confidence count).
Stitch JSON contract tests
python -m unittest tests.test_rag_stitch_contract -vValidates rag_stitch_contract._to_stitch_view shapes (answered vs fallback, show_sources, optional debug_retrieval_cards).
If MCP-security prompts fall back, add the MCP landscape paper to data/:
π οΈ Project Structure
linkup_mcp/
βββ server.py # MCP entrypoint (stdio) β all MCP tools live here
βββ agents.py # spawn_agent sub-agent system (Ollama)
βββ rag.py # RAGWorkflow (LlamaIndex + Ollama)
βββ rag_heuristics.py # Pure scoring heuristics (unit-tested, no LLM imports)
βββ rag_runtime.py # Lazy shared RAG index (MCP + bridge)
βββ rag_stitch_contract.py # Stitch view JSON contract + guide-grounded help
βββ local_whisper_stt.py # faster-whisper loader/transcribe (MCP + bridge share it)
βββ stitch_rag_bridge.py # HTTP bridge ENTRYPOINT β owns Flask app, registers bridge/
βββ bridge/ # Bridge route modules (one per concern)
β βββ rag_routes.py # /api/rag/stitch, /api/rag/stitch-help, /api/stitch-user-guide
β βββ voice_routes.py # /api/voice/transcribe + STT engine selection
β βββ face_routes.py # /api/face/* (DeepFace imports deferred)
β βββ health.py # /health + /api/health (shared payload)
β βββ spa.py # /, /favicon.ico, optional built-SPA serving
β βββ cors.py # STITCH_ALLOWED_ORIGINS handling
β βββ errors.py # JSON error handler for /api/face|auth|subscriptions
βββ stitch_auth/ # Google OAuth (PKCE), sessions, subscriptions SQLite
βββ face_verification/ # Local 1:1 face match + liveness (used by bridge)
βββ integrations/stitch/ # Pointer README β UI lives in stitch-app repo
βββ docs/ # e.g. stitch_user_guide.md (bridge Help / Ask Stitch)
βββ data/ # Your documents
βββ tests/ # Contract + unit tests (see CI commands below)
βββ pyproject.toml # Dependencies + extras
βββ .cursorrules # AI context for Cursor
βββ .env # Environment variables (create this)Where to add things
Change | Where |
New MCP tool |
|
New bridge HTTP route | New/existing module in |
Auth / subscriptions route |
|
RAG scoring/threshold tweak |
|
Bridge JSON shape change |
|
stitch_rag_bridge.py must keep exporting app and register_stitch_spa_routes β stitch-app's stitch_gui.py imports them by name.
Test matrix
# Default profile (uv sync):
python -m unittest tests.test_rag_stitch_contract tests.test_rag_heuristics -v
# With stitch-bridge extra:
python -m unittest tests.test_face_storage tests.test_bridge_routes tests.test_stitch_auth_helpers -vπ§ How It Works
Cursor IDE β MCP Server (server.py)
β
ββββββββββββββ΄βββββββββββββ
β RAG Tool β Web Searchβ
β (rag.py) β (Linkup) β
ββββββββ¬βββββββ΄βββββββββββββ
β
Ollama (llama3.2) - runs locallyπ° Cost
Tool | Cost |
RAG | $0 (local Ollama) |
Web Search | ~$10-50/month (Linkup API) |
Ollama | $0 (runs locally) |
π Troubleshooting
MCP server not loading?
Check Ollama is running:
ollama listVerify path in
mcp.jsonCheck Cursor logs:
%APPDATA%\Cursor\logs\
Ollama connection refused?
ollama serveπ Privacy
β RAG Tool: 100% local, documents never leave your machine
β Ollama: Runs locally, no cloud API calls
β οΈ Web Search: Queries sent to Linkup servers
π Related Projects
Repository | Purpose |
Reusable Python RAG library | |
Production Docker API server |
π Resources
π License
MIT License - See LICENSE
π Credits
Original: patchy631/ai-engineering-hub
Linkup for web search
LlamaIndex for RAG
Ollama for local AI
Made with β€οΈ for Cursor IDE users
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.
Latest Blog Posts
- 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/RanneG/linkup_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server