If you want to connect Claude to your database, you have two paths: run your own MCP server locally, or use a managed MCP gateway. This is an honest comparison of both. (Not sure what MCP is? Read What is an MCP Server? first.)

What Is a Self-Hosted MCP Server?

A self-hosted MCP server is software you run on your own machine (or server). There are open source options on GitHub for PostgreSQL, MySQL, SQLite, and other tools. You download them, configure a JSON file with your database connection string, and point Claude Desktop at the local process.

It's free. It works. And for developers who like owning their stack, it's a reasonable choice.

What Is a Managed MCP Gateway?

A managed MCP gateway is a hosted service that handles the MCP server for you. You save your database credentials in a secure dashboard, get a single HTTPS endpoint URL, and paste that into Claude. The gateway handles the connection, encryption, query execution, and logging.

Synra is a managed MCP gateway that supports PostgreSQL, MySQL, MS SQL Server, and Supabase.

Side-by-Side Comparison

Self-Hosted Managed (Synra)
Setup time 30–60 min per device Under 60 seconds
Config files JSON + .env per machine None
Credential storage Plaintext in .env AES-256 encrypted
Read-only enforcement Manual, if you remember On by default
Audit logs None Every query logged
Works on multiple devices Reinstall each time Same URL everywhere
Team sharing Everyone self-manages Central dashboard
Cost Free $19/month or $69 lifetime
SQL injection protection You handle it Built-in

When Self-Hosted Makes Sense

Self-hosted is the right call if:

  • You're a developer comfortable with terminal, JSON config files, and environment variables
  • You're connecting to a local database that isn't exposed to the internet
  • You only use one machine and don't need audit logs
  • You want zero recurring cost and are happy to maintain it yourself

The open source ecosystem here is solid. If this describes you, self-hosted is fine.

When Managed Makes Sense

A managed gateway is the better choice if:

  • You use Claude on multiple devices (work laptop, home machine, etc.)
  • You're connecting to a production database and want read-only enforcement you didn't have to configure
  • You want an audit trail of what queries were run and when
  • You're not a developer and don't want to touch config files
  • You're sharing database access with a team

The managed option also eliminates a real security risk: plaintext credentials in .env files on developer machines get leaked. Encrypted credentials in a managed service with no local copy is meaningfully safer.

The Cost Question

Self-hosted is free. Managed costs money. That's the honest trade-off.

At $19/month (or $69 one-time lifetime), Synra is priced for indie developers and small teams — not enterprise budgets. The question is whether setup time, security, and audit logging are worth that to you.

For most founders who aren't DevOps engineers, the answer is yes. An hour of engineering time costs more than a month of Synra.

What About Security?

Both approaches have risks if misconfigured.

Self-hosted risks:

  • Credentials in plaintext .env files
  • No read-only enforcement unless you set it up
  • No logging unless you build it

Managed risks:

  • You're trusting a third party with your credentials

Synra's approach: AES-256 encryption at rest, credentials only decrypted at query time, no storage of query results, read-only enforced at the gateway level regardless of what Claude requests.

The Honest Bottom Line

If you're technical and want free with full control — self-host it. The open source options work.

If you want it running in 60 seconds, working on every device, with security and logging built in — use a managed gateway.

Both are valid. The right choice depends on how much you value your time and what your security requirements look like.

Want to try the managed approach? Synra is free to start — you can test your connection before paying anything.

Set up in under 60 seconds: