MCP (Model Context Protocol) interface for rails-pg-extras gem. It enables PostgreSQL metadata and performance analysis with a simple LLM prompt.
Installation
bundle add rails-pg-extras
bundle add rails-pg-extras-mcp
Library supports MCP protocol via HTTP SSE interface.
config/routes.rb
# Authentication is not yet supported
mount RailsPgExtras.mcp_app, at: "pg-extras-mcp"
Install mcp-remote:
npm install -g mcp-remote
and in your LLM of choice:
{
"mcpServers": {
"pg-extras": {
"command": "npx",
"args": [
"mcp-remote",
"http://localhost:3000/pg-extras-mcp/sse"
]
}
}
}
You can now ask LLM questions about the metadata and performance metrics of your database.
Status
Project is in an early beta, so proceed with caution.