> ## Documentation Index
> Fetch the complete documentation index at: https://developer.mindbridge.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get started

The MindBridge Python SDK implements the official [Python API client library](https://pypi.org/project/mindbridge-api-python-client/) published on PyPI as `mindbridge-api-python-client`.

Install the package using `pip`:

<CodeGroup dropdown>
  ```bash theme={null}
  pip install mindbridge-api-python-client
  ```
</CodeGroup>

For reliable environment management and to avoid dependency conflicts, use a Python virtual environment. You may use the standard library’s `venv` module or a third-party tool such as `uv`.

# Authenticate and connect

Generate an API token within your MindBridge tenant by following [Create an API token](/api-explorer/create-api-token).

MindBridge recommends securely managing your API credentials. In these examples, environment variables are used:

* `MINDBRIDGE_API_URL`: The full MindBridge tenant URL (for example, *\[subdomain]*.mindbridge.ai)
* `MINDBRIDGE_API_TOKEN`: The API token generated for your account

The following example connects to your MindBridge tenant and retrieves the authenticated user’s profile by calling the `/v1/users/current` endpoint:

<CodeGroup dropdown>
  ```python theme={null}
  import os
  import mindbridgeapi as mbapi

  url = os.environ.get("MINDBRIDGE_API_URL", "")
  token = os.environ.get("MINDBRIDGE_API_TOKEN", "")

  server = mbapi.Server(url=url, token=token)

  user = server.users.get_current()
  print(f"Name: {user.first_name} {user.last_name}")
  print(f"Role: {user.role}")
  print(f"ID:   {user.id}")
  ```
</CodeGroup>
