Labsco
memextech logo

Memex Targeted Search Server

from memextech

Performs targeted searches across Memex conversation history and project files.

๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeAdvanced setup

Memex Targeted Search Server

A Model Context Protocol (MCP) server that provides targeted search capabilities across Memex conversation history and project files.

Overview

This MCP server enables AI agents to efficiently search through:

  • Conversation History: 952+ conversation files from Memex with metadata, titles, summaries, and message content
  • Project Files: 516+ project directories in the user's workspace with various file types and technologies

Features

๐Ÿ” Core Search Tools

  1. search_conversations - Search conversation history by text, metadata, and filters
  2. get_conversation_snippet - Retrieve specific parts of conversations without context overload
  3. search_projects - Search project files by content, file types, and names
  4. get_project_overview - Get project summaries with technology detection
  5. find_command - NEW! Find specific commands, CLI usage, or code snippets from conversation history

๐ŸŽฏ Smart Context Management

  • Returns targeted snippets instead of full conversations
  • Limits search scope to prevent context explosion
  • Supports faceted filtering (dates, projects, file types)
  • Provides relevance scoring for search results

API Reference

search_conversations

  • Purpose: Search conversation history with flexible filtering
  • Parameters: query (required), limit, project, date_from, date_to
  • Returns: Array of conversation metadata with relevance scoring

get_conversation_snippet

  • Purpose: Retrieve specific message ranges from conversations
  • Parameters: conversation_id (required), message_start, message_count
  • Returns: Conversation snippet with message details

search_projects

  • Purpose: Search project files by content and metadata
  • Parameters: query (required), file_types, limit
  • Returns: Array of file matches with context

get_project_overview

  • Purpose: Analyze project structure and technology stack
  • Parameters: project_name (required)
  • Returns: Project summary with file counts and tech detection

find_command

  • Purpose: Find specific commands, CLI usage, or code snippets from conversation history
  • Parameters: query (required), command_type (cli/code/config/any), limit
  • Returns: Array of commands with context, confidence scoring, and conversation references

Architecture

Built with:

  • TypeScript - Type-safe development
  • MCP SDK - Official Model Context Protocol SDK
  • Node.js - Runtime environment
  • File System APIs - Direct file access for performance

Performance Considerations

  • Limits search scope to prevent overwhelming results
  • Uses streaming JSON parsing for large files
  • Implements intelligent file filtering
  • Caches frequently accessed metadata
  • Returns truncated content with full context available on demand

Agent Experience

The server is designed for optimal agent interaction:

  • Targeted Search: Find specific information without context overload
  • Faceted Filtering: Multiple search dimensions (date, project, file type)
  • Progressive Discovery: Start with summaries, drill down to details
  • Context Preservation: Maintain conversation and project relationships

Development

Running in Development

npm run dev

Building for Production

npm run build
npm start

Testing

The server includes comprehensive error handling and graceful degradation for:

  • Missing or corrupted conversation files
  • Inaccessible project directories
  • Invalid JSON parsing
  • Large file handling