---
title: "Database secrets"
component: "savanna"
version: "main"
module: "administration"
html_url: "/savanna/main/administration/settings/how2-create-database-secret.html"
---

[View as HTML](/savanna/main/administration/settings/how2-create-database-secret.html) · [Documentation index](/llms.txt)

# Database secrets

A database secret is a non-expiring credential that applications and developer tools use to authenticate with a TigerGraph database in Savanna. Use one when you connect a tool or integration to your database, such as pyTigerGraph, TigerGraph MCP, or GraphRAG. The secret stays valid until you delete or revoke it.

Your browser does not support the video tag. 

## Create a database secret

1. In Savanna, select **Database Secrets** from the left navigation.
2. Click **Create Secret**.
3. Enter a name for the database secret.
4. Select the workspace connected to the database you want to access.
5. Create the secret.
6. Copy the generated secret and store it securely. You will not be able to view it again after you leave the page.

## Use a database secret

Use the generated secret to authenticate tools and integrations that connect to your TigerGraph database, including:

* pyTigerGraph
* TigerGraph MCP. See [Connect AI tools with MCP](../../get-started/connect-agent-mcp.md), where the secret is passed as `TG_SECRET`.
* GraphRAG

> [!NOTE]
> Treat database secrets like passwords. Store them securely and do not commit them to source control. A database secret does not expire and remains valid until you delete or revoke it.

## Where to go next

* For secrets in Admin Portal or GraphStudio, see [Manage secrets](https://www.tigergraph.com/docs/gui/4.3/admin-portal/management/user-management/#manage-secrets) and [Create a secret](https://www.tigergraph.com/docs/tigergraph-server/4.3/user-access/user-credentials/#%5Fcreate%5Fa%5Fsecret).
* Create control-plane credentials instead: [API keys](how2-create-api-key.md).
