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., "@MCP Knowledge Vault Search Toolsearch for notes about quantum computing algorithms"
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.
MCP Knowledge Vault Search Tool
This tool provides an MCP (Model Context Protocol) server that allows you to search your personal knowledge vault using hybrid semantic and keyword matching. The server connects to the Fondu Knowledge Vault API to retrieve relevant information from your personal knowledge base.
Features
Hybrid Search: Combines semantic vector search with keyword matching
Reranking: Uses reranking models to prioritize the most relevant results
Flexible Authentication: Multiple authentication methods with priority-based resolution
Production Ready: Comprehensive error handling and logging
MCP Compatible: Works with Claude Desktop and other MCP clients
SSE Transport: Server-Sent Events for real-time communication
Prerequisites
Python 3.8+
Access to Fondu Knowledge Vault API
Valid authentication token
Installation
Clone this repository:
Set up virtual environment and install dependencies:
Authentication Setup
The server supports multiple authentication methods with the following priority order:
1. Explicit Parameter (Highest Priority)
Pass the token directly when calling the tool.
2. Environment Variables
Set one of these environment variables:
3. Configuration Files
Create a config file at one of these locations:
~/.fondu/config.yaml(recommended)~/.config/fondu/config.yamlconfig.yaml(in project directory)
Example config file:
4. Token Files
Save your token in one of these files:
~/.fondu/token~/.config/fondu/token.fondu_token
Starting the MCP Server
Method 1: Direct Python (Recommended)
Method 2: Using the run script
The server will start on http://127.0.0.1:8080 with the following endpoints:
/- Homepage/health- Health check/sse- Server-Sent Events endpoint for MCP/messages/- Message handling endpoint
Claude Desktop Configuration
To use with Claude Desktop, add this to your ~/Library/Application Support/Claude/claude_desktop_config.json:
Alternative using the run script:
Available Tools
gather_relevant_user_knowledge
Search your knowledge vault using hybrid semantic and keyword matching.
Parameters:
query(string, required): Natural language query for semantic search and rerankingauth_token(string, optional): Authentication token (if not set via env/config)keywords(string, optional): Specific terms to prioritize in keyword matchingtop_k(integer, optional): Number of results to return (default: 10)
Returns: A formatted string containing the most relevant results from your knowledge vault, including source information and metadata when available.
Example Response:
Testing
Server Health Test
Tool Functionality Test
Create a test script to verify the tool works:
Configuration Examples
Example configuration files are provided:
config.yaml.example- Server configuration templateclaude_desktop_config.json.example- Claude Desktop setup template
Copy these files and customize with your settings:
Error Handling and Logging
The server provides comprehensive error handling:
Missing Auth Token: Clear error message with setup instructions
API Errors: Graceful handling of network issues and API failures
Invalid Tokens: Proper 403 error handling
Debug Logging: Detailed logs for troubleshooting
Logs are written to:
Standard error output (visible when running the server)
/tmp/error_log.txt(fallback error logging)
API Configuration
The server connects to:
Production API:
https://api.youfondu.com/v1/knowledge/search_knowledge_vaultProtocol: HTTPS with Bearer token authentication
Timeout: 30 seconds for API requests
Format: JSON request/response
Troubleshooting
Common Issues
Authentication Errors
Verify your token is valid and not expired
Check token is properly set via environment variable or config file
Ensure no extra whitespace in token files
Connection Issues
Verify internet connectivity
Check if API endpoint is accessible:
curl -I https://api.youfondu.comEnsure no firewall blocking outbound HTTPS
MCP Client Issues
Restart Claude Desktop after configuration changes
Check that absolute paths are used in configuration
Verify Python virtual environment is properly activated
Server Startup Issues
Ensure all dependencies are installed:
pip install -r requirements.txtCheck port 8080 is not already in use
Verify Python 3.8+ is being used
Debug Mode
To enable debug logging, set the environment variable:
Testing Authentication Methods
You can test different authentication methods:
Development
To contribute or modify the server:
Setup Development Environment
python3 -m venv .venv source .venv/bin/activate pip install -r requirements.txtRun Tests
python test_mcp_server.py python test_tool_functionality.pyCode Structure
mcp_fondu_search_user_context/server.py- Main server implementationrequirements.txt- Python dependenciesrun.sh- Convenience script for starting serverconfig.yaml.example- Configuration templateclaude_desktop_config.json.example- Claude Desktop setup template
Dependencies
Core dependencies:
fastapi>=0.109.2- Web frameworkuvicorn>=0.27.1- ASGI serverhttpx>=0.26.0- HTTP clientmcp>=1.3.0- Model Context ProtocolPyYAML>=6.0- YAML configuration support
See requirements.txt for complete dependency list.
Deployment
AWS App Runner
This server is ready for deployment to AWS App Runner. See DEPLOYMENT.md for detailed deployment instructions.
Quick Deploy:
Push code to your Git repository
Create App Runner service pointing to your repository
Set
FONDU_AUTH_TOKENenvironment variableDeploy!
The server includes:
✅ App Runner configuration (
apprunner.yaml)✅ Docker support (
Dockerfile)✅ Health check endpoint (
/health)✅ Environment variable configuration
✅ Production-ready logging
✅ Auto-scaling support
Other Cloud Platforms
The server can be deployed to any platform that supports:
Python 3.8+
Environment variables
HTTP/HTTPS traffic on port 8080
Tested platforms:
AWS App Runner ✅
Docker containers ✅
Traditional VPS hosting ✅
License
[Add your license information here]