Skip to main content

MCP server for chat analysis using vector embeddings and knowledge graphs

Project description

MCP Chat Analysis Server

A Model Context Protocol (MCP) server that enables semantic analysis of chat conversations through vector embeddings and knowledge graphs. This server provides tools for analyzing chat data, performing semantic search, extracting concepts, and analyzing conversation patterns.

Key Features

  • 🔍 Semantic Search: Find relevant messages and conversations using vector similarity
  • 🕸️ Knowledge Graph: Navigate relationships between messages, concepts, and topics
  • 📊 Conversation Analytics: Analyze patterns, metrics, and conversation dynamics
  • 🔄 Flexible Import: Support for various chat export formats
  • 🚀 MCP Integration: Easy integration with Claude and other MCP-compatible systems

Quick Start

# Install the package
pip install mcp-chat-analysis-server

# Set up configuration
cp config.example.yml config.yml
# Edit config.yml with your database settings

# Run the server
python -m mcp_chat_analysis.server

MCP Integration

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "chat-analysis": {
      "command": "python",
      "args": ["-m", "mcp_chat_analysis.server"],
      "env": {
        "QDRANT_URL": "http://localhost:6333",
        "NEO4J_URL": "bolt://localhost:7687",
        "NEO4J_USER": "neo4j",
        "NEO4J_PASSWORD": "your-password"
      }
    }
  }
}

Available Tools

import_conversations

Import and analyze chat conversations

{
    "source_path": "/path/to/export.zip",
    "format": "openai_native"  # or html, markdown, json
}

semantic_search

Search conversations by semantic similarity

{
    "query": "machine learning applications",
    "limit": 10,
    "min_score": 0.7
}

analyze_metrics

Analyze conversation metrics

{
    "conversation_id": "conv-123",
    "metrics": [
        "message_frequency",
        "response_times",
        "topic_diversity"
    ]
}

extract_concepts

Extract and analyze concepts

{
    "conversation_id": "conv-123",
    "min_relevance": 0.5,
    "max_concepts": 10
}

Architecture

See ARCHITECTURE.md for detailed diagrams and documentation of:

  • System components and interactions
  • Data flow and processing pipeline
  • Storage schema and vector operations
  • Tool integration mechanism

Prerequisites

  • Python 3.8+
  • Neo4j database for knowledge graph storage
  • Qdrant vector database for semantic search
  • sentence-transformers for embeddings

Installation

  1. Install the package:
pip install mcp-chat-analysis-server
  1. Set up databases:
# Using Docker (recommended)
docker compose up -d
  1. Configure the server:
cp .env.example .env
# Edit .env with your settings

Development

  1. Clone the repository:
git clone https://github.com/rebots-online/mcp-chat-analysis-server.git
cd mcp-chat-analysis-server
  1. Install development dependencies:
pip install -e ".[dev]"
  1. Run tests:
pytest tests/

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Submit a pull request

See CONTRIBUTING.md for guidelines.

License

MIT License - See LICENSE file for details.

Related Projects

Support

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mseep_mcp_server_chat_analysis-0.1.0.tar.gz (15.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mseep_mcp_server_chat_analysis-0.1.0-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

File details

Details for the file mseep_mcp_server_chat_analysis-0.1.0.tar.gz.

File metadata

File hashes

Hashes for mseep_mcp_server_chat_analysis-0.1.0.tar.gz
Algorithm Hash digest
SHA256 79babd8974f7460df698e34c5768c083e4cb40051713c386fea8d552681eb619
MD5 769df79991347c1f975fe379de89b10b
BLAKE2b-256 00693b42bdf5c495667fb415dcf28e1f3a6557ffc48a1682bccde09151587dc3

See more details on using hashes here.

File details

Details for the file mseep_mcp_server_chat_analysis-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mseep_mcp_server_chat_analysis-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c25b07749630d0837adf898aecb8b293e56306cc61f85218b842b203ce4cc612
MD5 ed58ec433e72ad6c129157ed96682604
BLAKE2b-256 78adc6f7af183c7f85ec333f8dfd5a84a89ee1ef92b97c200e81b09c80549dd3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page