Registry / database / mcp-server-sqlite

mcp-server-sqlite

JSON →
library2025.4.25pypypiunverified

A specialized server implementation for the Minecraft Protocol (MCP) project, providing a persistent backend using SQLite. It extends `mcp-server` to manage user data and game state within an SQLite database. Current version is 2025.4.25, following a rapid release cycle often synchronized with Minecraft client updates or changes to the underlying MCP protocol.

pip install mcp-server-sqlite
INSTALL
IMPORT
SIG · MCP-SERVER-SQLITE
M
mcp-server-sqlite
databasepythonv2025.4.25
Install
7.0s avg
Import
Disk
70MB
Pass rate
8/ 10
Env Coverage8 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2025.4.25 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✓ —
✓ 8.25s
py 3.11
✓ —
✓ 7.15s
py 3.12
✓ —
✓ 6.15s
py 3.13
✓ —
✓ 6.25s
py 3.9
✕ build_error
✕ build_error
70MB installed
● package 70MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

MCPSQLiteServer
from mcp_server_sqlite.server import MCPSQLiteServer
from mcp_server_sqlite.server import MCPSQLiteServer
main
from mcp_server_sqlite import main
from mcp_server_sqlite import main
server
from mcp_server_sqlite import server
from mcp_server_sqlite import server

Initializes and runs a basic MCP server with SQLite persistence. By default, it creates `mcp_server.db` in the current working directory. For robust applications, always specify an absolute database file path and include error handling for graceful shutdown.

import logging from mcp_server_sqlite.server import MCPSQLiteServer # Configure basic logging for better visibility logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') # Initialize the SQLite MCP server. # By default, it creates 'mcp_server.db' in the current working directory. # For production, it's recommended to specify an explicit path: # server = MCPSQLiteServer(database_file='/var/lib/mcp/my_server.db') server = MCPSQLiteServer() print("Starting MCP SQLite server on 0.0.0.0:25565...") try: server.run() except KeyboardInterrupt: logging.info("Server stopped by user (KeyboardInterrupt).") except Exception as e: logging.error(f"An unexpected error occurred: {e}", exc_info=True)
Debug
Known issues
gotchaThe server defaults to creating `mcp_server.db` in the current working directory if no `database_file` is specified during initialization. Running the server from different directories will create separate, distinct database files, leading to data inconsistencies or loss if not explicitly managed.
fix
Always specify an absolute or relative path for `database_file` in the `MCPSQLiteServer` constructor, e.g., `MCPSQLiteServer(database_file='path/to/my_server.db')`.
affects: All versions
breakingAs `mcp-server-sqlite` heavily relies on the `mcp-server` base library, breaking changes or API shifts in `mcp-server` may indirectly break `mcp-server-sqlite`. The `YYYY.MM.DD` versioning of both projects suggests frequent updates that might not always be backward compatible with older `mcp-server` versions.
fix
Always pin both `mcp-server-sqlite` and `mcp-server` to specific versions in your `requirements.txt` to ensure compatibility. Consult the `mcp-server` documentation for its own breaking changes and update both libraries in sync.
affects: Potentially all major `YYYY` versions if `mcp-server` updates significantly.
gotchaIf the server's `run()` method is not wrapped in a `try...except` block (e.g., `KeyboardInterrupt` or other exceptions), the server will abruptly terminate without graceful shutdown, potentially leaving database connections open or causing data corruption.
fix
Wrap the `server.run()` call in a `try...except KeyboardInterrupt` and a general `except Exception` block to handle unexpected shutdowns gracefully, as shown in the quickstart example.
affects: All versions
Upgrade
Version history
2025.4.25latest on PyPI · released Apr 25, 2025
Audit
Dependencies
mcp-serverrequiredProvides the core Minecraft Protocol server logic; mcp-server-sqlite builds upon and extends its functionality.
Agent activity
20 hits · last 30 days
node
20
Resources