Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

Fetches conversations from PostgreSQL and renders them as beautifully formatted, human-readable terminal output.

README.md

Convo History MCP

![Python 3.13+](https://www.python.org/downloads/) ![MCP](https://modelcontextprotocol.io/) ![License](LICENSE) ![Code style: black](https://github.com/psf/black)

Render conversation history as beautiful, human-readable terminal output.

An MCP server that fetches conversations directly from PostgreSQL and displays them as elegantly formatted dialogues. Built for the Model Context Protocol.

Why Convo History MCP?

Ever stared at walls of JSON trying to debug a conversation? Yeah, us too.

Convo History MCP fetches conversation data straight from your database and renders it as clean, readable terminal output with proper alignment, text wrapping, and visual separation between user and assistant messages.

================================================================================
                     CONVERSATION: 26b2889f-1c8b-446e-ad85-917b378cfd80
================================================================================

                                                                          USER:
                    ------------------------------------------------------------
                                        What's the weather like in San Francisco?

--------------------------------------------------------------------------------
ASSISTANT:
--------------------------------------------------------------------------------
Based on current conditions, San Francisco is experiencing mild
temperatures around 65°F with partly cloudy skies. Perfect weather
for a walk along the Embarcadero!

================================================================================
                              END OF CONVERSATION
================================================================================

Quick Start

claude mcp add --transport stdio convo-history --scope local \
  -e 'DATABASE_URL=${DATABASE_URL}' \
  -- docker run -i --rm -e DATABASE_URL ghcr.io/rreinold/convo-history-mcp:latest

Or add to your ~/.claude.json:

{
  "mcpServers": {
    "convo-history": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-e", "DATABASE_URL",
        "ghcr.io/rreinold/convo-history-mcp:latest"
      ],
      "env": {
        "DATABASE_URL": "postgres://user:pass@host:5432/dbname"
      }
    }
  }
}

That's it. Claude Code will now have access to your conversation history.

Environment Variables

| Variable | Description | Required | |----------|-------------|----------| | DATABASE_URL | PostgreSQL connection string | Yes |

Database Schema

The server expects the following tables:

CREATE TABLE conversations (
    id UUID PRIMARY KEY,
    chat_session_id VARCHAR UNIQUE,
    created_at TIMESTAMP
);

CREATE TABLE conversation_messages (
    id UUID PRIMARY KEY,
    conversation_id UUID REFERENCES conversations(id),
    user_input JSONB,
    assistant_response JSONB
);

Message Format:

{
  "user_input": {"method": "chat", "message": "Hello!"},
  "assistant_response": {"answer": "Hi there! How can I help?"}
}

Supported Message Types:

  • chat - Standard text messages
  • click - User interactions (rendered as [clicked: option_1])
  • output_list - Option menus with emojis and descriptions
  • recommendation - Summaries with cost estimates

Features

| Feature | Description | |---------|-------------| | Direct DB Access | Fetches conversations via psql, no intermediate files | | Smart Text Wrapping | Preserves paragraphs, wraps to 60 chars | | Visual Alignment | User messages right-aligned, assistant left-aligned | | Rich Content | Supports options, recommendations, costs | | MCP Native | Built for Model Context Protocol |

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Databases servers.