Superlinked MCP Server
Enables AI assistants to create and query multi-dimensional vector indexes from structured data files using Superlinked's vector search framework, supporting semantic search, recency, numerical, and categorical filtering.
README
Superlinked MCP Server
A Model Context Protocol (MCP) server that provides semantic search and RAG capabilities using Superlinked's vector search framework. This server enables AI assistants to create and query vector indexes from structured data files with support for multiple search dimensions (text similarity, recency, categories, and numbers).
Overview
This project creates an MCP server that wraps Superlinked's InMemoryExecutor, allowing any MCP-compatible client (like Claude Desktop) to perform sophisticated semantic search operations on structured data. The server provides tools to preview data files, create multi-dimensional vector indexes, and query them using natural language.
How It Works
The server uses Superlinked's vector search capabilities to create in-memory indexes that combine multiple search dimensions:
- Text Similarity: Semantic search using sentence transformers embeddings
- Recency: Time-based ranking for timestamp fields
- Number: Numeric value ranking (prices, ratings, etc.)
- Category: Categorical matching and filtering
When you create an index, the server:
- Analyzes your data file structure
- Creates appropriate vector spaces based on your column mapping
- Applies custom weights to each dimension
- Ingests the data into an in-memory index
- Makes it available for semantic queries
Features
- Multi-format support: CSV and JSON data files
- Flexible schema: Dynamic schema creation based on your data
- Multi-dimensional search: Combine text, time, numbers, and categories
- Custom weighting: Control the importance of each search dimension
- In-memory execution: Fast queries without external dependencies
- MCP compatibility: Works with any MCP client
Installation
Prerequisites
- Python 3.10+
- pip package manager
Setup
- Clone this repository:
git clone <repository-url>
cd rag_repo
- Install dependencies:
pip install -r requirements.txt
- Set required environment variable:
# Required for Streamlit demo
export ANTHROPIC_API_KEY=your_api_key_here
# Optional: Change Claude model (default: claude-haiku-4-5-20251001)
export CLAUDE_MODEL=claude-haiku-4-5-20251001
MCP Server Tools
The server provides three main tools:
1. preview_file
Preview the structure and contents of a data file before indexing. Use this tool to understand your data structure and decide which spaces to create for indexing.
Parameters:
file_path(string): Path to data file (CSV or JSON)rows(integer, optional): Number of sample rows to preview (default: 5)
Returns:
- Total row count
- Column names and data types
- Sample records
Example use case: "Show me what's in sample_data/business_news.json"
2. create_index
Create a searchable vector index from structured data.
Parameters:
file_path(string): Path to data file to indexcolumn_mapping(dict): Maps column names to space typestext_similarity: For text fields (semantic search)recency: For timestamp/date fields (Unix timestamps)number: For numeric fieldscategory: For categorical fields
weights(dict): Maps column names to weight values (0.0 to 1.0)- Higher weight = more influence on ranking
- Example:
{"description": 0.8, "timestamp": 0.3}
Returns:
- Index name (derived from filename)
- Column configuration
- Ingestion statistics
- Applied weights
Example use case: "Create an index from business_news.json with text search on the description field and recency on the date field. Put more weight on the description."
3. query_index
Search an index using natural language queries.
Parameters:
index_name(string): Name of the index (filename without extension)query_text(string): Natural language search querylimit(integer, optional): Maximum results to return (default: 5)
Returns:
- Array of results with:
id: Record identifierscore: Similarity scorefields: All indexed fields and their values
Example use case: "Search the business_news index for articles about strikes"
Integration with External MCP Clients
Claude Desktop
To use this server with Claude Desktop:
-
Locate your Claude Desktop configuration file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
- macOS:
-
Add the server configuration:
{
"mcpServers": {
"superlinked-rag": {
"command": "python",
"args": ["/absolute/path/to/rag_repo/mcp_server.py"],
"type": "stdio"
}
}
}
-
Restart Claude Desktop
-
The server tools will now be available to Claude. You can ask Claude to:
- Preview your data files
- Create vector indexes
- Perform semantic searches
Streamlit Demo App
This repository includes a Streamlit chatbot demo that uses the Claude Agent SDK as an MCP client. This demonstrates how to build a conversational interface with the MCP server.
Running the Demo
- Run the Streamlit app:
streamlit run streamlit_chatbot.py
-
Open your browser to the provided URL (typically
http://localhost:8501) -
IMPORTANT: small unfixed bug - right after fresh environment installation, the MCP server may not load on the first app start. Simply refresh the browser once after the Streamlit app loads — you only need to do this one time and it fix the problem.
Demo Features
- Real-time streaming: See AI reasoning steps as they happen
- Conversation memory: Multi-turn conversations with context
- Tool visualization: Watch the AI use MCP tools
- Interactive UI: Clean interface with execution step display
Example Conversation Flow
- "I have this file: sample_data/business_news.json. Show me what's in it."
- "Create an index for semantic search on the description field and time-based ranking on the date field."
- "Who wanted to have a strike?"
- "This news is old, put more weight on the date field."
- "Any news related to gas? What does it say?"
Resources
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。