Graph Memory + Web Search MCP: The Best Agent Combo
Combining persistent graph memory MCP with web search MCP gives agents both historical context and current data.
Combining graph memory MCP with web search MCP gives AI agents two capabilities that neither provides alone: persistent historical context from the graph and real-time external data from the web. The agent remembers what it learned last week and verifies it against what is true today.
Why graph memory alone is not enough
Graph memory servers like Sandra store entities, relationships, and conversation history in a persistent knowledge graph. Your agent remembers that you chose PostgreSQL over MongoDB three months ago and why. But graph memory is a closed system. It only knows what you told it. It cannot check whether the PostgreSQL version you discussed is still current, whether the pricing changed, or whether a new alternative launched since your last conversation.
Why web search alone is not enough
Web search gives your agent access to current data but no memory of your project context. Every session starts cold. The agent searches for "best database for time series" without knowing you already evaluated and rejected InfluxDB last month. It wastes tokens re-discovering decisions you already made.
The combination: memory-aware search
With both servers running, the agent checks memory first: "We evaluated TimescaleDB on 2026-04-15 and chose it for the metrics pipeline." Then it searches the web: "TimescaleDB latest version 2026 pricing changes." The search is targeted because memory provides context. The memory stays current because search provides updates. Each server makes the other more useful.
Configure both in .mcp.json
{
"mcpServers": {
"memory": {
"command": "npx",
"args": ["-y", "sandra-memory-mcp"],
"env": {
"GRAPH_DB": "neo4j",
"NEO4J_URI": "bolt://localhost:7687",
"NEO4J_PASSWORD": "your-password"
}
},
"search": {
"type": "sse",
"url": "https://mcp.scavio.dev/mcp",
"headers": { "x-api-key": "YOUR_SCAVIO_KEY" }
}
}
}Agent workflow example
User asks: "Should we still use Stripe for payments?" The agent first queries graph memory for prior payment provider decisions. Memory returns: "Evaluated Stripe, Paddle, LemonSqueezy on 2026-02-10. Chose Stripe for international coverage. Concern: rising fees." The agent then searches for current Stripe pricing and any new competitors. It synthesizes both into an updated recommendation grounded in your project history.
import requests, os
SCAVIO_H = {'x-api-key': os.environ['SCAVIO_API_KEY']}
def memory_query(question: str) -> dict:
"""Query the graph memory for prior decisions."""
return requests.post('http://localhost:3100/query',
json={'question': question}).json()
def web_search(query: str) -> dict:
"""Search current web data via Scavio."""
return requests.post('https://api.scavio.dev/api/v1/search',
headers=SCAVIO_H,
json={'query': query, 'platform': 'google'}).json()
def research_with_context(topic: str) -> dict:
# Step 1: Check what we already know
history = memory_query(f"What decisions have we made about {topic}?")
# Step 2: Search for current information
current = web_search(f"{topic} latest updates 2026")
# Step 3: Store new findings back to memory
requests.post('http://localhost:3100/store', json={
'entity': topic,
'data': current.get('organic_results', [])[:3],
'timestamp': '2026-05-12'
})
return {'history': history, 'current': current}What gets stored in the graph
Entities: tools, libraries, vendors, team members, decisions. Relationships: "team chose X over Y because Z", "project depends on X version N", "X costs $N/month as of date". Timestamps on every edge so the agent knows when information was last verified. Stale edges (older than 30 days) trigger automatic web search verification.
Cost model
Graph memory runs locally: free. Scavio search: $0.005 per query. A typical session triggers 2-5 memory queries (free) and 1-3 web searches ($0.005-$0.015). Monthly cost for a solo developer averaging 20 sessions: roughly $0.30-$0.90. The Scavio Free tier (250 credits/month) covers most solo usage at zero cost.
When to add this combo
Add graph memory + web search when your AI assistant makes the same research mistakes repeatedly, when team decisions get lost between sessions, or when you need auditable reasoning chains that show what the agent knew and when. The setup takes five minutes. The payoff compounds with every session as the knowledge graph grows.