datastore-mcp
Provides a persistent key/value state store backed by a MariaDB table, exposing tools to create, get, update, soft-delete, and list named variables with descriptions and long-form content.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@datastore-mcpSave a variable 'grocery_list' with milk, eggs, and bread"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
datastore-mcp
A remote MCP (Model Context Protocol) server that gives an AI assistant a persistent key/value state store backed by MariaDB. Deployed as a container on Fly.io, authenticated via OAuth 2.1.
What it stores
A single table (name configurable via DB_TABLE) with columns:
column | meaning |
| primary key / variable name |
| short human-readable description |
| the value (LONGTEXT — can be very long) |
| row creation timestamp |
| auto-updated on every change |
| soft-delete flag |
The server creates this table automatically on startup if it doesn't exist
(see migrations/001_init.sql for the equivalent
manual DDL).
Related MCP server: Kova Mind MCP Server
MCP tools exposed
state_create(var_name, description?, content?)— create a new variable; fails if it already exists (unless it was soft-deleted, in which case it's revived).state_get(var_name)— read a variable's full record.state_update(var_name, description?, content?)— update an existing variable; omitted fields are left unchanged.state_delete(var_name)— soft-delete a variable (setsdeleted = 1).state_list(include_deleted?)— listvar_name+descriptionfor all (non-deleted, by default) variables.
Authentication
The MCP endpoint (/mcp) requires an OAuth 2.1 Bearer token, obtained via a
standard authorization-code + PKCE flow with dynamic client registration —
the flow modern MCP clients (Claude.ai, Claude Code, etc.) already speak.
There is a single set of credentials (OAUTH_USERNAME / OAUTH_PASSWORD)
gating the login screen shown during that flow — enter them once when your
MCP client connects.
Limitations to be aware of (fine for a personal/single-user tool, not for multi-tenant use):
Tokens and pending logins are kept in memory, not persisted — they're lost on redeploy/restart (a well-behaved client just re-runs the OAuth flow), so the app is configured to keep at least one machine always running (see
fly.toml) rather than scale-to-zero.Access tokens last 1 hour, but a refresh token is issued and rotated alongside each one, so a client that supports the standard OAuth refresh grant renews its session silently instead of prompting a fresh login.
Dynamic client registration is open (any client can register itself), same as most MCP OAuth reference implementations — the actual gate is the username/password login screen.
Local development
cp .env.example .env # fill in your local MariaDB + a login/password
npm install
npm run devEnvironment variables
See .env.example for the full list:
PUBLIC_URL— externally reachable base URL (used to build OAuth issuer/redirect URLs). Must behttps://in production (anhttp://localhostexemption exists for local dev).PORT— HTTP port to listen on.DB_HOST,DB_PORT,DB_USER,DB_PASSWORD,DB_NAME,DB_TABLE,DB_SSL— MariaDB connection.OAUTH_USERNAME,OAUTH_PASSWORD— credentials for the OAuth login screen.
Deploying to Fly.io
Create the Fly app (one-time, from your machine):
fly apps create <your-app-name>Update the
app = "..."line infly.tomlto match.Then allocate a public IP so
<your-app-name>.fly.devactually resolves — this isn't somethingfly.tomlcan declare, it's a one-time action against the app itself:fly ips allocate-v6 -a <your-app-name> fly ips allocate-v4 --shared -a <your-app-name>(
fly launchusually does this automatically;fly apps createalone does not — if you skip this, the hostname returnsNXDOMAIN/no DNS record and the service is unreachable even though it's running fine.)Set secrets (never commit these — use
fly secrets, not[env]infly.toml):fly secrets set \ PUBLIC_URL=https://<your-app-name>.fly.dev \ DB_HOST=... DB_PORT=3306 DB_USER=... DB_PASSWORD=... DB_NAME=... DB_TABLE=mcp_state \ DB_SSL=true \ OAUTH_USERNAME=... OAUTH_PASSWORD=...Your MariaDB instance needs to be reachable from Fly.io's network (a public host with firewall rules allowing Fly's egress IPs, or a private connection such as a Fly.io WireGuard peer / Tailscale, depending on where it's hosted).
Deploy on push to
main. This repo is wired to Fly.io's GitHub integration (set up viafly launch's GitHub connection), which builds and deploys automatically on push — there's no.github/workflows/*.ymlin this repo driving it. If you'd rather drive deploys from a GitHub Actions workflow instead, create.github/workflows/deploy.ymlrunningflyctl deploy --remote-onlyon push, authenticated with a repo secretFLY_API_TOKENfromfly tokens create deploy -x 999999h— just don't run both mechanisms at once, or you'll get duplicate/competing deploys.
Connecting an AI client
Point your MCP client at https://<your-app-name>.fly.dev/mcp. The client
will discover the OAuth metadata automatically, register itself, and prompt
you to log in with OAUTH_USERNAME / OAUTH_PASSWORD the first time.
This server cannot be deployed
Maintenance
Related MCP Connectors
- JustOnceOAuthai.justonce
Persistent memory for AI assistants — one shared, OAuth-secured vault for every MCP client.
Cross-tool persistent memory and context for AI assistants over MCP.
Shared memory for connected AI tools. Projects, rules and skills over MCP. OAuth or API key.
- mcpOAuthai.butlerbrain
Persistent memory for AI assistants. Save once; recall from Claude, ChatGPT, or any MCP client.
Related MCP Servers
- AlicenseAqualityFmaintenanceProvides persistent personal context (identity, projects, decisions, knowledge) to MCP-compatible AI tools, eliminating the need to re-explain yourself across sessions.251 npm1MIT

Kova Mind MCP Serverofficial
AlicenseAqualityCmaintenanceEnables AI memory persistence and secure credential management via vault tools for MCP-compatible clients like Claude Desktop, Cursor, and VS Code.124 npmMIT- AlicenseAqualityBmaintenanceProvides persistent memory for AI agents via 10 MCP tools that map to the AgentRAM REST API, enabling store, retrieve, search, and share memories across personal and shared namespaces.1040 npmMIT

synapse-layerofficial
AlicenseBqualityAmaintenanceMCP-native persistent memory for AI agents. Stores and retrieves encrypted memories with Trust Quotient scoring, cross-agent handover protocol, and immutable audit trail. 13 tools. Remote endpoint available.1313Apache 2.0