Skip to content

Commit 0938ae1

Browse files
author
依诺
committed
RealLoginUser
1 parent 3242293 commit 0938ae1

File tree

3 files changed

+10
-87
lines changed

3 files changed

+10
-87
lines changed

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ authors = [
88
]
99
requires-python = ">=3.10"
1010
dependencies = [
11-
"alibabacloud-dms-enterprise20181101>=1.72.0",
12-
"alibabacloud-dts20200101>=5.8.1",
11+
"alibabacloud-dms-enterprise20181101>=1.75.0",
1312
"httpx>=0.28.1",
1413
"mcp[cli]>=1.8.1",
1514
]

src/alibabacloud_dms_mcp_server/server.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ def create_client() -> dms_enterprise20181101Client:
127127
config.user_agent = "dms-mcp"
128128
return dms_enterprise20181101Client(config)
129129

130+
130131
async def add_instance(
131132
db_user: str = Field(description="The username used to connect to the database"),
132133
db_password: str = Field(description="The password used to connect to the database"),
@@ -370,6 +371,7 @@ async def nl2sql(
370371
logger.error(f"Error in nl2sql_explicit_db: {e}")
371372
raise
372373

374+
373375
# --- ToolRegistry Class ---
374376
class ToolRegistry:
375377
def __init__(self, mcp: FastMCP):
@@ -512,6 +514,7 @@ class AppState: pass
512514
uid = os.getenv("UID")
513515
if uid:
514516
app.state.real_login_uid = uid
517+
logger.info(f"RealLoginUid environment variable found: {uid}")
515518

516519
# Initialize default_database_id
517520
app.state.default_database_id = None

uv.lock

Lines changed: 6 additions & 85 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)