Skip to content

Commit

Permalink
Merge branch 'main' into add_rijksmuseum_mcp
Browse files Browse the repository at this point in the history
  • Loading branch information
r-huijts authored Jan 30, 2025
2 parents 5a0c4cf + 16dfe5a commit 784dca6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/sqlite/src/mcp_server_sqlite/server.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import os
import sys
import sqlite3
import logging
from contextlib import closing
Expand All @@ -9,6 +11,12 @@
from pydantic import AnyUrl
from typing import Any

# reconfigure UnicodeEncodeError prone default (i.e. windows-1252) to utf-8
if sys.platform == "win32" and os.environ.get('PYTHONIOENCODING') is None:
sys.stdin.reconfigure(encoding="utf-8")
sys.stdout.reconfigure(encoding="utf-8")
sys.stderr.reconfigure(encoding="utf-8")

logger = logging.getLogger('mcp_sqlite_server')
logger.info("Starting MCP SQLite Server")

Expand Down

0 comments on commit 784dca6

Please sign in to comment.