- Determine Your Database Type
- Decide whether you will use a local SQLite database or a remote libSQL (such as Turso) database.
If using a local SQLite database:
Locate or Create Your Database File
- Choose a path for your SQLite database file (e.g.,
/path/to/your/database.db
).
- You can use any
.db
file—create a new one or use an existing one.
Set the Database URL
If using a remote libSQL database (such as Turso):
Create a Remote Database
- Sign up or log in to your remote libSQL provider (e.g., Turso).
- Create a new database following their instructions.
Obtain Your Database Connection URL
Obtain Your Authentication Token
- Generate or locate the authentication token for your database on your provider’s dashboard.
- Copy the token (it may be labeled as “API Token,” “Auth Token,” or similar).
Add ENVs in FastMCP
- In the FastMCP connection interface, use the "Install Now" button to add your environment variables.
- Fill in the following fields:
LIBSQL_URL
: Use either the local file path (for SQLite) or the remote URL (for libSQL/Turso).
LIBSQL_AUTH_TOKEN
(only for remote): Paste your auth token.
Variable |
Example Value |
LIBSQL_URL |
file:/path/to/database.db |
(or) |
libsql://your-database.turso.io |
LIBSQL_AUTH_TOKEN |
your-auth-token |
Save and Apply
- Save your ENV values. The server will now connect to your specified database.
Note:
- If you do not specify any
LIBSQL_URL
, the default is file:/memory-tool.db
in the current directory.
- For full details and graphical steps, refer to your libSQL provider’s documentation, such as the Turso Quickstart Guide.