MCP Variance Log
About
Logs statistical variations and unusual events in conversation structures to a SQLite database.
Details
- Author
- truaxki
- Categories
- Database, Other
Jump to
Setup
Install MCP Variance Log in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/truaxki/mcp-variance-log
Follow the installation instructions in the repository README, then restart your MCP client.
Agentic tool that looks for statistical variations in conversation structure and logs unusual events to a SQLite database. Built using the Model Context Protocol (MCP), this system is designed to be used with Claude Desktop or other MCP-compatible clients.
- Python ≥3.10
- MCP ≥1.2.0
- SQLite3
- UV (Python package installer and environment manager)
# Clone and install git clone https://github.com/truaxki/mcp-variance-log.git cd mcp-variance-log uv pip install -e .
Add to Claude Desktop config (%APPDATA%\Claude\claude_desktop_config.jsonon Windows):
{ "mcpServers": { "mcp-variance-log": { "command": "uv", "args": [ "--directory", "C:\\Users\\username\\source\\repos\\mcp-variance-log", # Update this path "run", "mcp-variance-log" ] } } }
Automatic Logging Process: - Silently monitor each interaction - When MEDIUM or LOW probability events occur, use this tool to log them - Each log includes context and reasoning - Logging happens without disrupting conversation flow
prompt: "What if I told you I could lift 1000 lbs?" { user_id: user_1, reasoning: Claim of 1000 lb lift capability is highly unusual as it approaches world record territory, warranting logging as a MEDIUM probability event, session_id: session_1, context_summary: User made an extremely improbable claim about personal strength capabilities, message_content: What if i told you i could lift 1000 lbs?, interaction_type: claim_verification, response_content: That would be extremely unlikely. The current world record for weight lifted by a human (deadlift) is 1,104.5 lbs, set by Hafthor Björnsson in 2020 under very specific conditions. Only a handful of people in history have lifted close to 1,000 lbs., probability_class: MEDIUM }
prompt: "What if I told you I'm a Data Scientist that can lift 1000 pounds?" { user_id: user_1, reasoning: User's follow-up combines unlikely strength claim with unrelated professional credential, suggesting potential pattern of unusual claims, session_id: session_1, context_summary: User added data scientist credential to previous improbable strength claim, message_content: what if i told you I'm a data scientist that can lift 1000 pounds?, interaction_type: claim_verification, response_content: Your professional background as a data scientist doesn't make the 1000-pound lift claim more plausible. Such a lift would still be near the all-time world record of 1,104.5 lbs., probability_class: LOW }
prompt: "Read-logs from this morning" ID | Time | Prob | Type | Context ------------------------------------------------------------------------------------------ 29 | 01-24 17:57 | LOW | claim_ | User added data scientist credential to pr... 28 | 01-24 17:56 | MEDIUM | claim_ | User made an extremely improbable claim ab...
prompt: "Can you search the logs for entry 29?" [{'log_id': 29, 'timestamp': '2025-01-24 17:57:07', 'session_id': 'session_1', 'user_id': 'user_1', 'interaction_type': 'claim_verification', 'probability_class': 'LOW', 'message_content': "what if i told you I'm a data scientist that can lift 1000 pounds?", 'response_content': "Your professional background as a data scientist doesn't make the 1000-pound lift claim more plausible. Such a lift would still be near the all-time world record of 1,104.5 lbs.", 'context_summary': 'User added data scientist credential to previous improbable strength claim', 'reasoning': "User's follow-up combines unlikely strength claim with unrelated professional credential, suggesting potential pattern of unusual claims"}]
- Ensure Python 3.10+ and UV are installed.
# Using pip (recommended for Windows) pip install uv # Using installation script (Linux/MacOS) curl -LsSf https://astral.sh/uv/install.sh | sh
git clone https://github.com/truaxki/mcp-variance-log.git cd mcp-variance-log uv pip install -e .
{ "mcpServers": { "mcp-variance-log": { "command": "uv", "args": [ "--directory", "PATH_TO_REPO/mcp-variance-log", "run", "mcp-variance-log" ] } } }
- Windows:%APPDATA%\Claude\claude_desktop_config.json
- MacOS:~/Library/Application Support/Claude/claude_desktop_config.json
- Linux:~/.config/Claude/claude_desktop_config.json
- log-query: Tracks conversation patterns
- HIGH: Common interactions (not logged)
- MEDIUM: Unusual patterns (logged)
- LOW: Critical events (priority logged)
- read-logs: View logs with filtering
- read_query: Execute SELECT queries
- write_query: Execute INSERT/UPDATE/DELETE
- create_table: Create tables
- list_tables: Show all tables
- describe_table: Show table structure
Located atdata/varlog.dbrelative to installation.
CREATE TABLE chat_monitoring ( log_id INTEGER PRIMARY KEY AUTOINCREMENT, timestamp DATETIME DEFAULT CURRENT_TIMESTAMP, session_id TEXT NOT NULL, user_id TEXT NOT NULL, interaction_type TEXT NOT NULL, probability_class TEXT CHECK(probability_class IN ('HIGH', 'MEDIUM', 'LOW')), message_content TEXT NOT NULL, response_content TEXT NOT NULL, context_summary TEXT, reasoning TEXT );
- Error: "Failed to connect to database"
- Check file permissions
- Verify path in config
- Ensure/datadirectory exists
- Error: "No module named 'mcp'"
- Run:uv pip install mcp>=1.2.0
- Install UV:curl -LsSf https://astral.sh/uv/install.sh | sh
- Error: "Failed to start MCP server"
- Verify config.json syntax
- Check path separators (use \ on Windows)
- Ensure UV is in your system PATH
- Fork the repository
- Create feature branch
- Submit pull request
Official MCP server for dbt (data build tool) providing integration with dbt Core/Cloud CLI, project metadata discovery, model information, and semantic layer querying capabilities.
Build robust data workflows, integrations, and analytics on a single intuitive platform.
Query and analyze data with MotherDuck and local DuckDB
Connect your LLM to the Firebolt Data Warehouse for data querying and analysis.
Enables AI assistants to query data from DataFocus using natural language.
An MCP server for Azure Data Explorer (Kusto) that enables AI assistants to interact with Kusto databases.
Data intelligence platform - query your database in natural language, build dashboards, and set up automated alerts that monitor your metrics 24/7.
MCP Persistence: your AI Agent now creates and manages databases on its own
An analytics server providing tools for interacting with the Microsoft Fabric data platform.
API-first engine and MCP server that transforms declarative YAML model definitions into optimized SQL for Postgres, Snowflake, ClickHouse, Dremio, and Databricks
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





