mcp-knowledge-assistant

mcp-knowledge-assistant

A custom MCP server providing semantic note memory (Qdrant + FastEmbed) and optional web search (Tavily) tools for a LangGraph ReAct agent.

Category
Visit Server

README

Project 3 — Custom MCP Server + LangGraph Agent (Fully-Free Stack)

A personal knowledge assistant built on the Model Context Protocol (MCP). A custom FastMCP server exposes tools (semantic note memory + web search); a LangGraph ReAct agent discovers and calls those tools over HTTP.

User Query -> LangGraph Agent -> MultiServerMCPClient -> MCP Server (FastMCP)
                                                          |-- Qdrant (notes)  + FastEmbed (local)
                                                          |-- Tavily (web)

Free stack (no paid keys)

Concern Original This setup (free)
Embeddings OpenAI FastEmbed BAAI/bge-small-en-v1.5 (local, no key)
Agent LLM Anthropic Claude OpenRouter free model (one free key)
Web search Tavily Tavily (free tier, optional)
Vector store Qdrant (Docker) Qdrant (Docker)

The note-memory tools (add_note, list_notes, search_notes) need no API key at all — embeddings run locally. Only the agent's LLM needs a (free) OpenRouter key.

Status on this machine

Component Status
venv + dependencies installed (venv/)
Qdrant (Docker, :6333) running
MCP server (:8001) running
Memory pipeline (no keys) VERIFIED via test_memory.py
Agent wiring VERIFIED via test_connection.py
Full agent run needs OPENROUTER_API_KEY in .env

1. Add your free OpenRouter key

Get one at https://openrouter.ai/keys, then put it in .env:

OPENROUTER_API_KEY=sk-or-...
# OPENROUTER_MODEL=meta-llama/llama-3.3-70b-instruct:free   # optional override
TAVILY_API_KEY=                                              # optional web search

The agent is a tool-calling ReAct agent, so the OpenRouter model must support function/tool calling. Good free options: meta-llama/llama-3.3-70b-instruct:free, qwen/qwen-2.5-72b-instruct, deepseek/deepseek-chat. If a model ignores tools, switch OPENROUTER_MODEL.

2. Start the MCP server (own terminal)

venv/Scripts/python mcp_server.py

Serves MCP at http://localhost:8001/mcp.

3. Verify without keys (optional)

venv/Scripts/python test_connection.py   # tool discovery + list_notes
venv/Scripts/python test_memory.py       # add -> list -> semantic search

4. Run the agent (needs OpenRouter key)

venv/Scripts/python mcp_agent.py "Save a note titled 'RAG Tips': Always use hybrid search"
venv/Scripts/python mcp_agent.py "What did I learn about retrieval?"
venv/Scripts/python mcp_agent.py "What notes do I have?"
venv/Scripts/python mcp_agent.py "Search the web for news about LangGraph 2026"   # needs Tavily

Compatibility fixes applied vs. the original handout

The handout code targets older library versions. Updated for current releases:

  1. Embeddings -> local FastEmbed (mcp_server.py). No OpenAI key; EMBED_DIM changed 1536 -> 384 to match bge-small-en-v1.5.
  2. Agent LLM -> OpenRouter via ChatOpenAI(base_url=...) (mcp_agent.py), replacing init_chat_model("anthropic:...").
  3. MultiServerMCPClient is not a context manager anymore (langchain-mcp-adapters 0.1.0+) — instantiated directly, then get_tools().
  4. qdrant.search() -> qdrant.query_points(...).points (qdrant-client 1.12+).

Inspect the server interactively (optional)

npx @modelcontextprotocol/inspector http://localhost:8001/mcp

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured