run402-mcp
Enables users to provision, manage, and query AI-native Postgres databases directly from MCP-compatible clients using x402 micropayments. It supports executing SQL, performing REST API interactions via PostgREST, and managing database leases and file storage.
README
run402-mcp
MCP server for Run402 — provision and manage AI-native Postgres databases from any MCP-compatible client.
Quick Start
npx run402-mcp
Tools
| Tool | Description |
|---|---|
provision_postgres_project |
Provision a new Postgres database (prototype/hobby/team tier) |
run_sql |
Execute SQL (DDL or queries) against a project |
rest_query |
Query/mutate data via PostgREST REST API |
upload_file |
Upload text content to project storage |
renew_project |
Renew a project's database lease |
Client Configuration
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"run402": {
"command": "npx",
"args": ["-y", "run402-mcp"]
}
}
}
Cursor
Add to .cursor/mcp.json in your project:
{
"mcpServers": {
"run402": {
"command": "npx",
"args": ["-y", "run402-mcp"]
}
}
}
Cline
Add to Cline MCP settings:
{
"mcpServers": {
"run402": {
"command": "npx",
"args": ["-y", "run402-mcp"]
}
}
}
Claude Code
claude mcp add run402 -- npx -y run402-mcp
How It Works
- Provision — Call
provision_postgres_projectto create a database. The server handles x402 payment negotiation and stores credentials locally. - Build — Use
run_sqlto create tables,rest_queryto insert/query data, andupload_filefor storage. - Renew — Call
renew_projectbefore your lease expires.
Payment Flow
Provisioning and renewing require x402 micropayments. When payment is needed, tools return payment details (not errors) so the LLM can reason about them and guide the user through payment.
Key Storage
Project credentials are saved to ~/.config/run402/projects.json with 0600 permissions. Each project stores:
anon_key— for public-facing queries (respects RLS)service_key— for admin operations (bypasses RLS)tier— prototype, hobby, or teamexpires_at— lease expiration timestamp
Environment Variables
| Variable | Default | Description |
|---|---|---|
RUN402_API_BASE |
https://api.run402.com |
API base URL |
RUN402_CONFIG_DIR |
~/.config/run402 |
Config directory for key storage |
Development
npm run build
npm run test:skill
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.