Database Connections

Agent M makes it easy to connect to your databases with secure credential storage and multiple connection options. Connect to MongoDB, PostgreSQL, Supabase, and more.

Supported Databases

Agent M supports multiple database systems. You can connect using connection strings or individual parameters depending on your database type:

  • MongoDB - Local instances, MongoDB Atlas, and self-hosted servers
  • PostgreSQL - Local instances and cloud-hosted PostgreSQL databases
  • Supabase - Connect to your Supabase projects with ease

More database integrations are coming soon. If you prefer to enter your connection details separately, Agent M also supports individual parameters including host, port, database name, and credentials.

Connection Types

MongoDB

Connect to local MongoDB instances on port 27017, MongoDB Atlas cloud databases, or any self-hosted MongoDB server. Use connection strings like mongodb://username:password@host:27017/database.

PostgreSQL

Connect to PostgreSQL databases using connection strings or individual parameters. The default port is 5432. Works with local instances, cloud providers like AWS RDS, and managed PostgreSQL services.

Supabase

Connect directly to your Supabase projects using the Session pooler connection method. Use connection strings from your Supabase dashboard's Connect dialog.

View Supabase connection guide →

Step-by-Step Connection

When you first open Agent M, you'll see the connection setup screen. Here you can choose between using a connection string (which contains all your connection information in one place) or entering individual parameters (host, port, database, username, and password separately).

After entering your connection details, it's always a good idea to test the connection before saving. Click "Test Connection" to verify that Agent M can successfully connect to your database. If the test is successful, you can save the connection and then select which database you want to work with from the dropdown menu.

Connection Security

Agent M takes security seriously. All your passwords are encrypted and stored locally on your device, so your credentials never leave your computer. The application also remembers your recently used connections locally, making it easy to reconnect without having to re-enter your details every time.

Troubleshooting

Connection Failed

  • Check if your database server is running
  • Verify your connection string format
  • Ensure firewall allows the appropriate port (27017 for MongoDB, 5432 for PostgreSQL)
  • Check username/password credentials

Authentication Error

  • Verify username and password
  • Check if the user has access to the specified database
  • Ensure the authentication database is correct

Network Issues

  • Check your internet connection (for Atlas)
  • Verify the host address is correct
  • Check if the port is accessible

Next Steps