pgroonga-mcp
Provides read-only search and diagnostics for PostgreSQL databases with PGroonga indexes, including full-text search, index exploration, query explanations, health checks, and text normalization.
Click on "Install 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., "@pgroonga-mcpsearch the documents table for 'full-text search'"
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.
pgroonga-mcp
Read-only PostgreSQL search and diagnostics over the Model Context Protocol. The server discovers the installed PGroonga schema and capabilities, resolves search targets from PostgreSQL catalogs, and binds query/filter values as parameters.
It does not expose arbitrary SQL, pgroonga_command, DDL, dictionary mutation, or repair operations.
Requirements
Node.js 20 or newer.
PostgreSQL with the PGroonga extension installed.
A dedicated PostgreSQL role that is neither a superuser nor
BYPASSRLS.An MCP host that supports local stdio servers.
The npm package supplies the MCP server only. It does not install PostgreSQL or PGroonga.
Related MCP server: PostgreSQL MCP Server
Install
For a one-off or MCP-host installation, pin the package version you have tested:
npx --yes pgroonga-mcp@0.1.0For a global installation:
npm install --global pgroonga-mcp@0.1.0
pgroonga-mcpThe server communicates over stdin/stdout. Logs go to stderr so they do not corrupt the MCP protocol stream.
MCP host configuration
The exact configuration file depends on the MCP host. A generic stdio configuration looks like this:
{
"mcpServers": {
"pgroonga": {
"command": "npx",
"args": ["--yes", "pgroonga-mcp@0.1.0"],
"env": {
"PGROONGA_DATABASE_URL": "postgresql://pgroonga_mcp@127.0.0.1:5432/app",
"PGROONGA_ALLOWED_SCHEMAS": "public",
"PGROONGA_ALLOWED_TABLES": "public.documents"
}
}
}
}Use the installed pgroonga-mcp command instead of npx when the package is installed globally. Do not put database passwords in a committed configuration file; use the MCP host's environment/secret facility. The server does not load .env files automatically.
Database grants
Use a least-privilege role. Replace the schema, tables, and PGroonga extension schema with the names from your deployment:
CREATE ROLE pgroonga_mcp LOGIN PASSWORD 'use-a-secret-manager';
GRANT CONNECT ON DATABASE app TO pgroonga_mcp;
GRANT USAGE ON SCHEMA public, extensions TO pgroonga_mcp;
GRANT SELECT ON TABLE public.documents TO pgroonga_mcp;Grant SELECT on any NormalizerTable dictionary tables used by the configured indexes. Do not grant SUPERUSER, BYPASSRLS, or CREATE on application schemas. Keep row-level security policies enabled; each operation runs in a read-only transaction with row_security = on.
Configuration
All settings are environment variables. PGROONGA_DATABASE_URL is required. The default allowlist is the public schema; an empty PGROONGA_ALLOWED_TABLES allows all tables in the allowed schemas, so set it explicitly in production. Tables may be written as schema.table or as a table name.
Variable | Default | Description |
| — | PostgreSQL connection URL (required) |
|
| Comma-separated schema allowlist |
| empty | Comma-separated table allowlist |
|
| PostgreSQL statement timeout |
|
| PostgreSQL lock timeout |
|
| Default search row limit |
|
| Maximum search row limit |
|
| Serialized response limit |
|
| Per-string result limit |
|
| Normalization input limit |
|
| Variant lookup limit |
|
|
|
|
| Only |
A complete development example is in .env.example. The environment example and the compact NormalizerTable fixture under examples/itaiji/ are included in the npm tarball.
Tools
pgroonga_server_info— PostgreSQL, PGroonga, Groonga, and feature capabilities.pgroonga_list_indexes— catalog-resolved PGroonga indexes and supported modes.pgroonga_search— bounded search with structured filters.pgroonga_explain_search— non-executingEXPLAIN (FORMAT JSON)for a validated search.pgroonga_health— available PGroonga health checks.pgroonga_list_normalization_profiles— discovered index normalizer chains.pgroonga_normalize_text— normalize text using a discovered index profile.pgroonga_lookup_variants— bounded NormalizerTable variant lookup.pgroonga_validate_normalization_profile— validate dictionary mappings without modifying them.
Example pgroonga_search input:
{
"target": { "schema": "public", "table": "documents", "column": "body" },
"mode": "keyword",
"query": "PGroonga",
"returnColumns": ["id", "body"],
"limit": 20
}Search supports text, varchar, text[], and jsonb targets when a compatible, valid, ready PGroonga index is discovered. Supported modes are keyword, query, prefix, exact, and regexp. similar is reserved for a later release. Compound, expression, and partial indexes are reported but are discovery-only in this release.
Normalizer profiles are read from trusted index reloptions. NormalizerTable dependencies are resolved through pgroonga_table_name; dictionary changes are reported as requiring REINDEX, and dictionary freshness remains unknown unless a future managed revision table is installed. Highlighting is disabled unless the required source-location and source-offset options are present.
Development and release checks
npm ci
npm run verify
npm pack --dry-runnpm run verify runs formatting, linting, type checking, the unit/contract tests, and the TypeScript build. The package uses prepublishOnly and prepack to repeat the relevant checks/build before publication. Once authenticated with npm and after reviewing npm pack --dry-run, publish the current version with:
npm publishThe repository is askdkc/pgroonga-mcp. The compact NormalizerTable fixture is in examples/itaiji/schema.sql.
Maintenance
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
- Alicense-qualityDmaintenanceA Model Context Protocol server providing LLMs read-only access to PostgreSQL databases for inspecting schemas and executing queries.86,94127MIT
- Flicense-qualityDmaintenanceProvides read-only access to PostgreSQL databases, enabling users to inspect database schemas and execute read-only queries through a Model Context Protocol server.4
- Alicense-qualityCmaintenanceA Model Context Protocol server that enables interaction with PostgreSQL databases to list tables, retrieve schemas, and execute read-only SQL queries.12MIT
- Alicense-qualityDmaintenanceA Model Context Protocol server that provides AI assistants with secure, read-only access to PostgreSQL databases while offering comprehensive tools for schema exploration, query validation, and performance optimization.MIT
Related MCP Connectors
Query PostgreSQL databases in plain English — LLM-generated, safety-validated SQL.
Comprehensive PostgreSQL documentation and best practices, including ecosystem tools
Federated commerce search across independent WooCommerce merchants. Keyless, read-only MCP server.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/askdkc/pgroonga-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server