MCPcopy Create free account
hub / github.com/IBM/mcp-cli / _token_wrapper

Function _token_wrapper

src/mcp_cli/main.py:1468–1488  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1466 default_namespace = token_type if token_type in ["bearer", "api-key"] else "generic"
1467
1468 async def _token_wrapper():
1469 return await cli_execute(
1470 "token",
1471 action=action,
1472 name=name
1473 if action not in ["set-provider", "get-provider", "delete-provider"]
1474 else None,
1475 value=value,
1476 token_type=token_type,
1477 provider=name
1478 if action in ["set-provider", "get-provider", "delete-provider"]
1479 else provider,
1480 namespace=namespace or default_namespace,
1481 show_oauth=show_oauth,
1482 show_bearer=show_bearer,
1483 show_api_keys=show_api_keys,
1484 show_providers=show_providers,
1485 is_oauth=is_oauth,
1486 force=force,
1487 api_key=value if action == "set-provider" else None,
1488 )
1489
1490 # Run the async function
1491 asyncio.run(_token_wrapper())

Callers 1

token_commandFunction · 0.85

Calls 1

cli_executeFunction · 0.90

Tested by

no test coverage detected