@contextable/mcp

@contextable/mcp

A persistent AI memory server that enables storage and retrieval of context and project artifacts across conversations. It features full-text search, version history, and automatic content chunking using local SQLite or hosted cloud storage.

Category
Visit Server

README

@contextable/mcp

MCP (Model Context Protocol) server for AI memory. Store and retrieve context across AI conversations.

Features

  • Dual Transport Modes: Stdio (for Claude Desktop) or HTTP/SSE (for web clients)
  • Dual Storage Modes: Local SQLite or hosted Supabase cloud storage
  • Full-Text Search: FTS5-powered search across all artifacts
  • Version History: Automatic versioning with rollback support
  • Auto-Chunking: Large content automatically split into manageable parts
  • Topic Clustering: Automatic topic detection and filtering
  • Living Summaries: Auto-generated project status summaries

Installation

npm install -g @contextable/mcp

Or run directly:

npx @contextable/mcp

Storage Modes

Local Mode (Default)

Uses SQLite database stored locally at ~/.contextable/data.db. Your data stays on your machine.

npx @contextable/mcp
# or explicitly:
npx @contextable/mcp --local

Hosted Mode

Connects to the Contextable cloud service for synced storage across devices.

# Set your API key
export CONTEXTABLE_API_KEY=ctx_your_api_key_here

# Run in hosted mode
npx @contextable/mcp --hosted

Get your API key at: https://contextable.me/settings

Transport Modes

Stdio (Default)

Uses standard input/output for communication. This is the default mode and works with Claude Desktop.

npx @contextable/mcp

HTTP/SSE

Uses HTTP with Server-Sent Events for communication. This mode enables web-based clients to connect.

# Start HTTP server on default port 3000
npx @contextable/mcp --sse

# Custom port and host
npx @contextable/mcp --sse --port=8080 --host=0.0.0.0

The HTTP server provides:

  • GET /health - Health check endpoint
  • POST /mcp - MCP message endpoint
  • GET /mcp - SSE stream for server-to-client messages

Usage with Claude Desktop

Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

Local Mode

{
  "mcpServers": {
    "contextable": {
      "command": "npx",
      "args": ["@contextable/mcp"]
    }
  }
}

Hosted Mode

{
  "mcpServers": {
    "contextable": {
      "command": "npx",
      "args": ["@contextable/mcp", "--hosted"],
      "env": {
        "CONTEXTABLE_API_KEY": "ctx_your_api_key_here"
      }
    }
  }
}

Tools

Project Management

  • project_save - Create or update a project
  • project_list - List all projects
  • project_resume - Load a project with artifact summaries
  • project_analysis_get - Get cached AI analysis results

Artifact Management

  • artifact_save - Save content to a project (auto-chunks large content)
  • artifact_list - List artifacts with size estimates
  • artifact_get - Load full artifact content
  • artifact_delete - Archive an artifact
  • artifact_restore - Restore an archived artifact
  • artifact_archived - List archived artifacts
  • artifact_versions - Get version history
  • artifact_rollback - Rollback to previous version

Search

  • search - Full-text search across all artifacts

Environment Variables

General

Variable Default Description
CONTEXTABLE_MODE local Storage mode: local or hosted
CONTEXTABLE_LOG_LEVEL info Log level: debug, info, warn, error

Local Mode

Variable Default Description
CONTEXTABLE_DATA_DIR ~/.contextable Data directory
CONTEXTABLE_DB_PATH ~/.contextable/data.db Database path

Hosted Mode

Variable Default Description
CONTEXTABLE_API_KEY - Your API key (required for hosted mode)
CONTEXTABLE_API_URL https://api.contextable.me API URL

HTTP/SSE Transport

Variable Default Description
CONTEXTABLE_PORT 3000 HTTP server port
CONTEXTABLE_HOST 127.0.0.1 HTTP server host

Example Usage

Once configured, you can ask Claude to:

  • "Create a project called 'My App' for tracking my mobile app development"
  • "Save this design decision to the project"
  • "Search for authentication-related content"
  • "Show me the project summary"
  • "Load all security-related artifacts"

API

The package exports types and functions for programmatic use:

Local Storage (SQLite)

import { SQLiteAdapter, projectSave, artifactGet, search } from '@contextable/mcp';

// Create local storage
const storage = new SQLiteAdapter({ path: './my-data.db' });
await storage.initialize();

// Use tools
const ctx = { storage };
const result = await projectSave(ctx, {
  name: 'My Project',
  description: 'A test project',
});

await storage.close();

Hosted Storage (Supabase)

import { SupabaseAdapter, projectSave } from '@contextable/mcp';

// Create hosted storage
const storage = new SupabaseAdapter({
  supabaseUrl: 'https://api.contextable.me',
  supabaseServiceKey: process.env.SUPABASE_SERVICE_ROLE_KEY!,
  apiKey: process.env.CONTEXTABLE_API_KEY!,
});
await storage.initialize();

// Use tools - same API as local mode
const ctx = { storage };
const result = await projectSave(ctx, {
  name: 'My Project',
  description: 'A test project',
});

await storage.close();

Development

# Install dependencies
npm install

# Build
npm run build

# Run tests
npm test

# Type check
npm run typecheck

License

Apache 2.0 - See LICENSE for details.

Contributing

See CONTRIBUTING.md for guidelines.

Links

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured