Lspace MCP Server: Persistent, Searchable AI Conversations
Turn scattered ChatGPT, Claude, and Cursor chats into persistent, searchable knowledge with the Lspace MCP server.
Overview
Lspace MCP Server is a lightweight server that turns dispersed AI chat history (ChatGPT, Claude, Cursor, etc.) into persistent, searchable knowledge. It captures conversation content, normalizes messages and metadata, and exposes APIs and search endpoints so you can query past chats alongside other sources. The goal is to make conversational context reusable for downstream automation, retrieval-augmented generation (RAG), auditing, or team knowledgebases.
Built for developers, Lspace focuses on searchable storage and retrieval rather than a single UI. It provides importers for common chat platforms, a REST API for indexing and querying, and pluggable backends for embeddings and vector indexes. You can run it locally, in a container, or as part of a larger data pipeline.
Features
- Persistent storage of AI chat messages and conversation metadata
- Unified model context schema to normalize messages from ChatGPT, Claude, Cursor, etc.
- Full-text and vector search over messages and conversations
- Pluggable embedding providers (OpenAI, local models, etc.) and vector index backends
- Importers / connectors to pull chat history from popular platforms
- REST API for indexing, searching, and managing data
- Tagging, metadata fields, and filtering for contextual queries
- Lightweight deployment: runs via Docker or from source
- Export and backup capabilities for portability and audit
Installation / Configuration
Quick start (clone and run with Docker Compose):
# Clone the repository
# Build and run with Docker Compose
Example .env (place at repository root or pass as environment variables):
# Server
PORT=8080
JWT_SECRET=your_jwt_secret
# Database (example Postgres)
DATABASE_URL=postgres://user:password@postgres:5432/lspace
# Embeddings provider (optional)
EMBEDDINGS_PROVIDER=openai
OPENAI_API_KEY=sk-...
# Vector index backend (optional)
VECTOR_BACKEND=pgvector
Simple local run (Node.js):
# Install dependencies and run (if the server is Node-based)
Docker Compose example (builds from repo):
version: "3.8"
services:
lspace:
build: .
env_file: .env
ports:
- "8080:8080"
depends_on:
- db
db:
image: postgres:15
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
POSTGRES_DB: lspace
volumes:
- lspace-db:/var/lib/postgresql/data
volumes:
lspace-db:
Available Resources
- REST API endpoints (typical)
- POST /api/v1/import — import conversation data or file
- POST /api/v1/messages — index a message or conversation node
- POST /api/v1/embeddings — trigger embedding generation
- POST /api/v1/search — full-text + vector search queries
- GET /api/v1/conversations/:id — fetch conversation and messages
- Web UI (optional) — lightweight viewer for browsing and replaying conversations
- CLI tools — import/export and maintenance commands
- Connectors — importers for ChatGPT, Claude, Cursor chat exports or APIs
- Backends — support for SQLite/Postgres, vector index plugins (FAISS, pgvector, etc.)
Note: exact endpoints and tools vary by release; check the repo for the current API spec and client libraries.
Use Cases
- Reuse prior AI responses in new prompts
- Scenario: Your team used ChatGPT for research. Import past chat logs and search for prior summaries, then stitch those results into new prompts to maintain context and avoid re-asking the same questions.
- Build a conversational knowledgebase for a product
- Scenario: Aggregate support agent conversations and assistant chats to generate a searchable FAQ and answer generator for customer support agents.
- Audit and compliance
- Scenario: Persist chat transcripts together with metadata (user IDs, timestamps, model versions) for audit trails and compliance reviews.
- Retrieval-augmented generation (RAG)
- Scenario: Index a mixture of chat transcripts and domain documents, then pull the most relevant conversation fragments as grounding context for an LLM answer.
- Team collaboration and handoff
- Scenario: Tag conversations with project names and let teammates search across all AI-assisted discussions to pick up work without losing prior context.
Getting started examples
Index a message (curl):
Search for relevant context:
Next steps
- Inspect the repository README and API docs for detailed endpoint definitions and examples
- Configure an embedding provider and a vector backend to enable semantic search
- Connect your chat exports or enable automated importers to populate the server
Lspace MCP Server is designed to be an extensible bridge between short-lived AI chats and durable, queryable knowledge. If you intend to run it in production, review the repository for recommended production configurations: authentication, TLS, backups, and scaling/vector index sizing.