claude-sessions-mcp

claude-sessions-mcp

MCP server for managing Claude Code conversation sessions

Category
Visit Server

README

claude-sessions-mcp

MCP (Model Context Protocol) server and Web UI for managing Claude Code sessions.

Features

  • Project Listing: Browse Claude Code project folders
  • Session Management: List, rename, and delete sessions
  • Message Management: View and delete messages within sessions
  • Cleanup: Clear empty sessions and remove invalid API key messages
  • Web UI: SvelteKit-based web interface

Installation

# Using npx (recommended)
npx claude-sessions-mcp

# Or install globally
npm install -g claude-sessions-mcp

Usage

Claude Code MCP Integration

Add to Claude Code:

claude mcp add claude-sessions -- npx claude-sessions-mcp

Or manually edit ~/.claude.json:

{
  "mcpServers": {
    "claude-sessions": {
      "command": "npx",
      "args": ["claude-sessions-mcp"]
    }
  }
}

Web GUI

Launch the web interface via MCP tool (from Claude Code):

> Use the start_gui tool to launch web interface

The GUI opens at http://localhost:5050 with features:

  • Browse all projects and sessions
  • View full conversation history
  • Rename sessions with inline editing
  • Delete unwanted sessions
  • Bulk cleanup of empty sessions

Development

# Enable corepack
corepack enable

# Install dependencies
pnpm install

# Start web development server
pnpm dev

# MCP server development mode
pnpm dev:mcp

Build

pnpm build

MCP Server Tools

Available Tools

Tool Description
list_projects List Claude Code projects
list_sessions List sessions in a project
rename_session Rename a session
delete_session Delete a session (moves to backup folder)
delete_message Delete a message and repair UUID chain
preview_cleanup Preview sessions to be cleaned
clear_sessions Clear empty sessions and invalid messages
start_gui Start the web UI
stop_gui Stop the web UI

Tech Stack

  • MCP Server: Node.js + TypeScript + Effect
  • Web UI: SvelteKit + Svelte 5
  • Build: tsup (MCP), Vite (Web)
  • Package Manager: pnpm (corepack)

Effect-TS Patterns

This project uses Effect for functional async operations:

import { Effect, pipe, Array as A, Option as O } from 'effect'

// Define an Effect (lazy, composable)
const listProjects = Effect.gen(function* () {
  const files = yield* Effect.tryPromise(() => fs.readdir(dir))
  return files.filter((f) => f.endsWith('.jsonl'))
})

// Parallel execution with concurrency control
const results =
  yield *
  Effect.all(
    items.map((item) => processItem(item)),
    { concurrency: 10 }
  )

// Option for nullable values
const title = pipe(
  messages,
  A.findFirst((m) => m.type === 'user'),
  O.map((m) => extractTitle(m)),
  O.getOrElse(() => 'Untitled')
)

// Run in SvelteKit endpoint
export const GET = async () => {
  const result = await Effect.runPromise(listProjects)
  return json(result)
}

License

MIT

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
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
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
VeyraX MCP

VeyraX MCP

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

Official
Featured
Local
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
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
Qdrant Server

Qdrant Server

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

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
E2B

E2B

Using MCP to run code via e2b.

Official
Featured