mcp2cli 2.6.0__tar.gz → 2.6.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mcp2cli
3
- Version: 2.6.0
3
+ Version: 2.6.1
4
4
  Summary: Turn any MCP server or OpenAPI spec into a CLI
5
5
  Author: Stephan Fitzpatrick
6
6
  Author-email: Stephan Fitzpatrick <stephan@knowsuchagency.com>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "mcp2cli"
3
- version = "2.6.0"
3
+ version = "2.6.1"
4
4
  description = "Turn any MCP server or OpenAPI spec into a CLI"
5
5
  readme = "README.md"
6
6
  license = "MIT"
@@ -481,6 +481,7 @@ def build_oauth_provider(
481
481
  *,
482
482
  client_id: str | None = None,
483
483
  client_secret: str | None = None,
484
+ client_name: str = "mcp2cli",
484
485
  scope: str | None = None,
485
486
  redirect_uri: str | None = None,
486
487
  flow: str = "auto",
@@ -559,6 +560,7 @@ def build_oauth_provider(
559
560
  redirect_uri = f"http://127.0.0.1:{port}/callback"
560
561
 
561
562
  client_metadata = OAuthClientMetadata(
563
+ client_name=client_name,
562
564
  redirect_uris=[redirect_uri],
563
565
  grant_types=["authorization_code", "refresh_token"],
564
566
  response_types=["code"],
@@ -1481,6 +1483,8 @@ def _baked_to_argv(config: dict) -> list[str]:
1481
1483
  argv += ["--oauth-client-id", config["oauth_client_id"]]
1482
1484
  if config.get("oauth_client_secret"):
1483
1485
  argv += ["--oauth-client-secret", config["oauth_client_secret"]]
1486
+ if config.get("oauth_client_name") and config["oauth_client_name"] != "mcp2cli":
1487
+ argv += ["--oauth-client-name", config["oauth_client_name"]]
1484
1488
  if config.get("oauth_scope"):
1485
1489
  argv += ["--oauth-scope", config["oauth_scope"]]
1486
1490
  if config.get("oauth_redirect_uri"):
@@ -1533,6 +1537,7 @@ def _bake_create(argv: list[str]) -> None:
1533
1537
  p.add_argument("--oauth", action="store_true")
1534
1538
  p.add_argument("--oauth-client-id", default=None)
1535
1539
  p.add_argument("--oauth-client-secret", default=None)
1540
+ p.add_argument("--oauth-client-name", default="mcp2cli")
1536
1541
  p.add_argument("--oauth-scope", default=None)
1537
1542
  p.add_argument("--oauth-redirect-uri", default=None, metavar="URI")
1538
1543
  p.add_argument(
@@ -1598,6 +1603,7 @@ def _bake_create(argv: list[str]) -> None:
1598
1603
  "oauth": args.oauth,
1599
1604
  "oauth_client_id": args.oauth_client_id,
1600
1605
  "oauth_client_secret": args.oauth_client_secret,
1606
+ "oauth_client_name": args.oauth_client_name,
1601
1607
  "oauth_scope": args.oauth_scope,
1602
1608
  "oauth_redirect_uri": args.oauth_redirect_uri,
1603
1609
  "oauth_flow": args.oauth_flow,
@@ -3161,6 +3167,12 @@ def _build_main_parser() -> argparse.ArgumentParser:
3161
3167
  default=None,
3162
3168
  help="OAuth client secret — supports env:VAR and file:/path prefixes",
3163
3169
  )
3170
+ pre.add_argument(
3171
+ "--oauth-client-name",
3172
+ default="mcp2cli",
3173
+ help="Client name sent during OAuth Dynamic Client Registration (default: mcp2cli). "
3174
+ "Some servers require a specific client name for DCR to succeed.",
3175
+ )
3164
3176
  pre.add_argument(
3165
3177
  "--oauth-scope",
3166
3178
  default=None,
@@ -3309,6 +3321,7 @@ def _setup_oauth(pre_args):
3309
3321
  server_url,
3310
3322
  client_id=client_id,
3311
3323
  client_secret=client_secret,
3324
+ client_name=getattr(pre_args, "oauth_client_name", "mcp2cli"),
3312
3325
  scope=pre_args.oauth_scope,
3313
3326
  redirect_uri=pre_args.oauth_redirect_uri,
3314
3327
  flow=flow,
File without changes
File without changes
File without changes