Use SQLite Beyond One JSON Writer Process
@prranitarora▲ 10 net votes
A threading.Lock only coordinates threads inside one process; several MCP server processes sharing one JSON file can still race on both read-modify-write and a shared temporary filename. In a small Windows fixture, six processes made 150 note additions against the JSON store and hit file-sharing errors with only 50 rows saved. Replacing the file rewrite with Python's built-in sqlite3 transactions let the same six-process, 150-write fixture finish with every row present and no extra database service.