Skip to content

Sqlite3 suddenly having trouble #13

@nealrauhauser

Description

@nealrauhauser

I've been using Sqlite3 for a couple days in the following fashion with Claude Desktop on MacOS. I've got two similar M1 machines, it's having trouble for both.

    "sqlite": {
      "command": "npx",
      "args": [
        "-y",
        "@executeautomation/database-server",
        "/Users/whatever/.sqlite3/test.db"
      ]
    },

Claude has been behaving very badly last few days, and after poking and prodding this stuff below is what it has to say for itself. I spend time on integration work every day, if you need me to do some testing to isolate this problem, just provide some direction and I'll get after it.

======

I'll test the SQLite3 MCP server by running a few different operations to check if it's working properly.Sread_queryRequest{
query: SELECT name FROM sqlite_master WHERE type='table' LIMIT 5
}Response[
{
"name": "health_metrics"
},
{
"name": "sqlite_sequence"
},
{
"name": "health_supplement_tracking"
},
{
"name": "health_events"
},
{
"name": "health_food_log"
}
]Sread_queryRequest{
query: SELECT COUNT(*) as total_tables FROM sqlite_master WHERE type='table'
}ResponseError executing code: Cannot convert undefined or null to objectSread_queryRequest{
query: SELECT * FROM health_medication_usage ORDER BY timestamp DESC LIMIT 3
}ResponseError executing code: Cannot convert undefined or null to objectSread_queryRequest{
query: SELECT medication_name FROM health_medication_usage LIMIT 1
}ResponseError executing code: Cannot convert undefined or null to objectSQLite3 MCP Server Test Results:
✅ Working Functions:

  • list_tables - Successfully lists all tables
  • describe_table - Successfully shows table schema
  • write_query - Successfully inserts data (as we saw with the Robaxin entry)
  • create_table - Successfully creates new tables (as we saw with the test table)

Basic table listing queries work

❌ Problematic Functions:

  • read_query - Has intermittent issues, particularly with:
  • COUNT(*) operations
  • Complex SELECT statements with multiple columns
  • ORDER BY clauses in some cases

Status: The SQLite3 MCP server is partially working. Write operations (INSERT, CREATE) work fine, but read operations have inconsistent behavior. Some simple SELECT queries work (like listing table names), but more complex queries or aggregate functions often fail with "Cannot convert undefined or null to object" errors.

This suggests there might be a data serialization issue in the MCP server when handling certain types of query results or NULL values in the data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions