Skip to main content
Glama
foro-sh

mcp-db-wrapper-example

by foro-sh

mcp-db-wrapper-example

The foro.sh database starter: an MCP server that wraps a small SQL database. It comes with one demo table (notes) so there's something to query straight away, and tools your AI coding agent can use to read and write it.

Opening this in Claude Code? Nothing to install. The repo ships the skills your agent needs in .claude/skills/: how to deploy this server, and how to add tools that are worth what they cost a model to carry.

Before you deploy

Without any setup, this runs on a local SQLite file that's wiped on every restart and redeploy - fine for trying it out, not for data you care about.

To keep data around, set DATABASE_URL as a secret in your project's Secrets tab (a sqlite:/// URL pointing at a file on a volume you control). For a different kind of database entirely, see Storage below.

Related MCP server: sqlite-mcp

Tools

Tool

What it does

list_tables()

See every table in the database

query(sql, params)

Run a read query (SELECT ...) and get the rows back

insert(table, values)

Add one row to a table

Make it yours

This is a starting point, not a finished product. Open this repo in Claude Code (or another AI coding agent) and ask it to:

  • add the tables your project actually needs

  • add tools for the specific things you want to do with your data — not just raw query/insert — e.g. find_customer(email), log_event(...)

  • point it at a real database once you have one (see Storage below)

You don't need to know FastMCP or the Model Context Protocol to do any of this — describe what you want in plain language and let the agent write the code.

Storage

The database type is declared in pyproject.toml:

[tool.mcp-db-wrapper]
database = "sqlite"

server.py reads this and refuses to boot if DATABASE_URL doesn't match it (e.g. a non-sqlite:/// URL while database = "sqlite"), since the type is config, not something inferred from whatever URL happens to be set.

By default, with no DATABASE_URL secret, this runs on /tmp/db.sqlite3, created automatically, no setup required, and wiped on every restart and redeploy (the platform mounts no persistent volumes). Set DATABASE_URL to a sqlite:/// path on a volume you control to keep data around. For a different kind of database entirely (e.g. Postgres), ask your coding agent to swap in the matching driver and update database above to match.

Run it locally

uv run server.py

The server speaks MCP over streamable HTTP at http://localhost:8000/mcp (set PORT to change the port — the same name foro injects when it deploys you).

Deploy it

Its pyproject.toml is all foro.sh needs, so this repo deploys as-is: sign in, pick this repo, deploy.

F
license - not found
Not graded
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    An MCP server that enables AI assistants to create and manage persistent SQLite databases through natural language without requiring SQL knowledge. It allows users to propose schemas, store records, and perform complex queries across multiple databases for structured data tracking.
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    An MCP server that enables AI agents to interact with SQLite databases by querying schemas, executing SQL, and inspecting table metadata. It supports safe database access through configurable read-only modes, query timeouts, and dry-run execution plans.
    MIT
  • F
    license
    Not graded
    quality
    B
    maintenance
    An MCP server that exposes relational databases (PostgreSQL/MySQL) to AI agents with natural language to SQL query support.
    19
  • F
    license
    Not graded
    quality
    D
    maintenance
    MCP server that provides SQLite database operations. Allows AI assistants to query, modify and manage SQLite databases through the Model Context Protocol.

View all related MCP servers

Related MCP Connectors

  • GibsonAI MCP server: manage your databases with natural language

  • Analytical memory for AI agents: a real Postgres queried in plain English over MCP. One command.

  • MCP server exposing the Backtest360 engine API as tools for AI agents.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/foro-sh/mcp-db-wrapper-example'

If you have feedback or need assistance with the MCP directory API, please join our Discord server