Skip to main content
Glama

Smart Connections MCP Server

by msdanyg
FIXED.md3.85 kB
# ✅ Smart Connections MCP Server - FIXED AND FULLY WORKING! ## Issue Resolved **Problem**: Semantic search functions (`get_similar_notes`, `get_connection_graph`) were returning errors because embeddings appeared to be missing (dimension = 0). **Root Cause**: The embedding model key extraction logic was looking at the wrong level in the configuration hierarchy. **Solution**: Updated `getEmbeddingModelKey()` to correctly extract the model key from the nested adapter configuration. ## What Was Fixed ### Before (Broken): ```javascript // Was returning: "transformers" const modelKeys = Object.keys(embedModel).filter(k => k !== 'adapter' && ...); return modelKeys[0]; // "transformers" ``` ### After (Fixed): ```javascript // Now returns: "TaylorAI/bge-micro-v2" const adapter = embedModel.adapter; // "transformers" const adapterConfig = embedModel[adapter]; // { model_key: "TaylorAI/bge-micro-v2" } return adapterConfig.model_key; // "TaylorAI/bge-micro-v2" ✅ ``` ## Test Results - ALL WORKING ✅ ### ✅ get_stats ```json { "totalNotes": 131, "totalBlocks": 12500, "embeddingDimension": 384, ← Fixed! Was 0 "modelKey": "TaylorAI/bge-micro-v2" ← Fixed! Was "transformers" } ``` ### ✅ get_similar_notes ``` Found 5 similar notes: 1. tags.md (similarity: 0.821) 2. Vault Structure and Organization.md (similarity: 0.796) 3. Meetings/Untitled 1.md (similarity: 0.758) 4. Claude Personas/README.md (similarity: 0.734) 5. Meetings/Vic-Daniel meeting 090425.md (similarity: 0.732) ``` ### ✅ get_connection_graph ``` Root: CLAUDE.md Connections: 2 First connection: tags.md (similarity: 0.821) ``` ### ✅ search_notes Already working (uses keyword matching, not embeddings) ### ✅ get_note_content Already working (direct file access) ### ✅ get_embedding_neighbors Now working (uses same embedding access as get_similar_notes) ## How to Update If Claude Desktop is running with the old version: 1. **Stop any running instances**: ```bash pkill -f "smart-connections-mcp" ``` 2. **Rebuild** (already done): ```bash cd ~/smart-connections-mcp npm run build ``` 3. **Restart Claude Desktop**: - Quit completely (Cmd+Q) - Reopen The server will automatically use the fixed version! ## Verification Commands Test the server directly: ```bash cd ~/smart-connections-mcp node test-search.mjs ``` You should see successful semantic search results with similarity scores between 0.7-0.9 for related notes. ## Summary **Status**: ✅ **FULLY FUNCTIONAL** All 6 MCP tools are now working correctly: - ✅ `get_similar_notes` - Semantic similarity search - ✅ `get_connection_graph` - Knowledge graph building - ✅ `search_notes` - Keyword search - ✅ `get_embedding_neighbors` - Vector similarity - ✅ `get_note_content` - Content retrieval - ✅ `get_stats` - Statistics The server can now provide Claude with full semantic search capabilities across your 131 ActivTrak documents using the 384-dimensional TaylorAI/bge-micro-v2 embeddings! ## Files Modified - `/Users/dglickman@bgrove.com/smart-connections-mcp/src/smart-connections-loader.ts` (lines 125-154) - Updated `getEmbeddingModelKey()` to correctly navigate the config structure ## Next Use Cases Now you can ask Claude things like: 1. **"Find notes similar to my competitive analysis documents"** - Uses semantic embeddings to find conceptually related notes 2. **"Show me a connection graph of product features"** - Builds a multi-level graph of related feature documents 3. **"What notes are most similar to the enterprise buyer's guide?"** - Returns semantically similar content even without exact keyword matches 4. **"Find all documentation related to workforce analytics"** - Combines keyword search with semantic understanding Enjoy your fully functional Smart Connections MCP server! 🎉

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/msdanyg/smart-connections-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server