Convo History MCP
Fetches conversations from PostgreSQL and renders them as beautifully formatted, human-readable terminal output.
README
Convo History MCP
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 messagesclick- User interactions (rendered as[clicked: option_1])output_list- Option menus with emojis and descriptionsrecommendation- 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.
Recommended Servers
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.