Skip to content

Commit 7d966b3

Browse files
authored
Merge pull request #9 from ydb-platform/fix-auth-modes
Fix readme instructions
2 parents e0b45af + 713cb9a commit 7d966b3

File tree

2 files changed

+18
-7
lines changed

2 files changed

+18
-7
lines changed

README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
"command": "uvx",
2525
"args": [
2626
"ydb-mcp",
27-
"--ydb-endpoint", "grpc://localhost:2136/local"
27+
"--ydb-endpoint", "grpc://localhost:2136",
28+
"--ydb-database", "/local"
2829
]
2930
}
3031
}
@@ -44,7 +45,8 @@
4445
"command": "pipx",
4546
"args": [
4647
"run", "ydb-mcp",
47-
"--ydb-endpoint", "grpc://localhost:2136/local"
48+
"--ydb-endpoint", "grpc://localhost:2136",
49+
"--ydb-database", "/local"
4850
]
4951
}
5052
}
@@ -70,7 +72,8 @@ To get started with YDB MCP, you'll need to configure your MCP client to communi
7072
"command": "python3",
7173
"args": [
7274
"-m", "ydb_mcp",
73-
"--ydb-endpoint", "grpc://localhost:2136/local"
75+
"--ydb-endpoint", "grpc://localhost:2136",
76+
"--ydb-database", "/local"
7477
]
7578
}
7679
}
@@ -92,7 +95,8 @@ To use login/password authentication, specify the `--ydb-auth-mode`, `--ydb-logi
9295
"command": "uvx",
9396
"args": [
9497
"ydb-mcp",
95-
"--ydb-endpoint", "grpc://localhost:2136/local",
98+
"--ydb-endpoint", "grpc://localhost:2136",
99+
"--ydb-database", "/local",
96100
"--ydb-auth-mode", "login-password",
97101
"--ydb-login", "<your-username>",
98102
"--ydb-password", "<your-password>"
@@ -113,7 +117,8 @@ To use access token authentication, specify the `--ydb-auth-mode` and `--ydb-acc
113117
"command": "uvx",
114118
"args": [
115119
"ydb-mcp",
116-
"--ydb-endpoint", "grpc://localhost:2136/local",
120+
"--ydb-endpoint", "grpc://localhost:2136",
121+
"--ydb-database", "/local",
117122
"--ydb-auth-mode", "access-token",
118123
"--ydb-access-token", "qwerty123"
119124
]
@@ -133,7 +138,8 @@ To use service account authentication, specify the `--ydb-auth-mode` and `--ydb-
133138
"command": "uvx",
134139
"args": [
135140
"ydb-mcp",
136-
"--ydb-endpoint", "grpc://localhost:2136/local",
141+
"--ydb-endpoint", "grpc://localhost:2136",
142+
"--ydb-database", "/local",
137143
"--ydb-auth-mode", "service-account",
138144
"--ydb-sa-key-file", "~/sa_key.json"
139145
]

ydb_mcp/server.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1003,7 +1003,12 @@ def get_credentials_factory(self) -> Optional[Callable[[], ydb.Credentials]]:
10031003
# Clear any previous auth errors
10041004
self.auth_error = None
10051005

1006-
supported_auth_modes = {AUTH_MODE_ANONYMOUS, AUTH_MODE_LOGIN_PASSWORD}
1006+
supported_auth_modes = {
1007+
AUTH_MODE_ANONYMOUS,
1008+
AUTH_MODE_LOGIN_PASSWORD,
1009+
AUTH_MODE_SERVICE_ACCOUNT,
1010+
AUTH_MODE_ACCESS_TOKEN,
1011+
}
10071012
if self.auth_mode not in supported_auth_modes:
10081013
self.auth_error = (
10091014
f"Unsupported auth mode: {self.auth_mode}. Supported modes: {', '.join(supported_auth_modes)}"

0 commit comments

Comments
 (0)