Centia MCP Server
OfficialThe Centia/GC2 MCP server exposes the GC2 API as MCP tools for managing and querying a Geo Compute Cloud database over STDIO.
Call and dry-run JSON-RPC methods, and generate TypeScript interfaces from inferred types.
Execute SQL and GraphQL queries/mutations, with JSON, GeoJSON, CSV, Excel, NDJSON, or OGR output.
Manage schemas, tables, columns, constraints, indexes, sequences, metadata, privileges, sub-users, access rules, and event triggers.
Upload and import files into schemas/tables with dry-run, append/truncate, SRS, and timestamp options.
Manage OAuth clients and run password, authorization-code, refresh-token, or device-code token flows.
Commit schema changes to Git and push to a remote repository.
Inspect database statistics, schemas, tables, relations, and RPC method definitions.
Authenticate via a gc2-cli session or API_TOKEN/API_BASE_URL, and use it with MCP clients like Claude Desktop, MCP Inspector, Claude Code, or Codex.
Supports committing schema changes to a Git repository and pushing to a remote, enabling versioned database schema management.
Provides tools for managing PostgreSQL databases through GC2, including schemas, tables, columns, constraints, indexes, sequences, privileges, SQL execution, and PostGIS geometry output.
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., "@Centia MCP Serverlist all tables in the public schema"
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.
GC2 (Geo Compute Cloud) MCP Server
A Model Context Protocol (MCP) server that exposes the GC2 API as MCP tools generated from the OpenAPI spec. It communicates over STDIO and can be used with any MCP-compatible client (Claude Desktop, MCP Inspector, etc.).
Prerequisites
Node.js 18+ (20+ recommended)
npm 9+
Related MCP server: yellow-pages
Install
# From the project root
npm installAuthentication
The MCP server uses the same login as the gc2-cli:
npm i -g @mapcentia/gc2-cli
gc2 connect https://api.gc2.io # only if not the default
gc2 login # browser, device, or passwordThe MCP server reads ~/.config/configstore/gc2-env.json (managed by gc2-cli) and refreshes the access token automatically when it expires.
For headless / CI use, set API_TOKEN (and optionally API_BASE_URL) — env vars take precedence over the stored session:
API_BASE_URL(optional) — Base URL for the GC2 API. Default:https://api.gc2.ioAPI_TOKEN(optional) — Static personal access token. Bypasses the storedgc2-clisession.
The API surface is defined in centia-api.json (already included in the repo). The server reads it at runtime to generate tools.
Run locally (development)
Hot‑reload development run with tsx:
npm run devThis starts the MCP server on STDIO. It is meant to be launched by an MCP client (see below), but you can also smoke‑test it with the MCP Inspector.
Run with npx
You can run the server directly using npx.
If running from the source locally:
npm run build
npx .If the package is installed or you want to use the published version:
npx @mapcentia/gc2-mcp-serverBuild and run (production)
npm run build
npm startThis compiles TypeScript to dist/ and starts node dist/index.js.
If you prefer a static token over the stored gc2-cli session (e.g. CI):
API_TOKEN=your_token_here npm start
# or
API_BASE_URL=https://api.gc2.io API_TOKEN=your_token_here npm run devUsing with MCP Inspector (recommended for local testing)
MCP Inspector lets you connect to the server and try tools interactively.
Start the Inspector UI:
npx @modelcontextprotocol/inspector -- npx @mapcentia/gc2-mcp-serverIf needed, add environment variables in the Inspector connection dialog (e.g.,
API_TOKEN).
Using with Claude Desktop
Add the server to your Claude Desktop MCP config (e.g., claude_desktop_config.json).
Using npx (easiest)
{
"mcpServers": {
"gc2": {
"command": "npx",
"args": ["-y", "@mapcentia/gc2-mcp-server"]
}
}
}Run gc2 login once and the server will pick up the session. To force a static token instead, add "env": { "API_TOKEN": "YOUR_CENTIA_TOKEN" }.
Using local source
{
"mcpServers": {
"gc2": {
"command": "npm",
"args": ["run", "start"],
"cwd": "/absolute/path/to/your/mcp-server"
}
}
}For development, replace
"args": ["run", "start"]with"args": ["run", "dev"].Ensure
cwdpoints to this project directory.
NPM scripts
npm run dev— Run TypeScript directly withtsx(hot‑reload style dev loop).npm run build— Compile TypeScript to CommonJS/ESM indist/viatsc.npm start— Run the built server (node dist/index.js).
Using as a Claude Code plugin
This repository is a Claude Code plugin and its own marketplace. Installing it gives Claude Code the GC2 MCP server and all skills in one step:
/plugin marketplace add mapcentia/gc2-plugin
/plugin install gc2@mapcentiaUpgrading from the old plugin: the plugin was published as centia@centia-io until version 1.0.36. Run /plugin uninstall centia@centia-io and /plugin marketplace remove centia-io, then install gc2@mapcentia as above. Skill names changed from centia-* to gc2-*.
Run gc2 login once so the server can pick up your session (see Authentication above). The skills are then available as /gc2:gc2-rules, /gc2:gc2-ows, etc., and Claude loads them automatically on GC2-related tasks.
To try the plugin from a local checkout without installing it:
claude --plugin-dir /path/to/mcp-serverUsing as a Codex plugin
The Codex plugin bundles the same GC2 MCP server and skills as the Claude Code plugin. It uses .codex-plugin/plugin.json, the shared .mcp.json and skills/, and the existing .claude-plugin/marketplace.json catalog, which Codex supports as a compatibility format. See the OpenAI plugin documentation.
With a Codex CLI that supports codex plugin, install from a local checkout:
# Run from this repository's root
codex plugin marketplace add .
codex plugin add gc2@mapcentiaOnce the Codex plugin files are published to GitHub, install from the repository instead:
codex plugin marketplace add mapcentia/gc2-plugin
codex plugin add gc2@mapcentiaRun gc2 login once (see Authentication above), then restart Codex and start a new conversation to load the plugin's skills and MCP tools. In the desktop app, the plugin is also available from the MapCentia marketplace in the plugin browser after adding that marketplace.
Check installation with:
codex plugin list --marketplace mapcentiaFor MCP tools alone, without the bundled skills, use codex mcp add gc2 -- npx -y @mapcentia/gc2-mcp-server instead of installing the plugin.
Using Skills with AI Coding Agents
This repository includes a skills/ folder with guidance for AI coding agents (like Claude Code, Codex, Junie, etc.) when working with GC2 BaaS.
skills/gc2-rules/SKILL.md contains the global hard rules (tool priority, security baselines, destructive-ops policy) and routes to the other skills; each remaining skill in skills/*/SKILL.md covers a specific workflow area. The AGENTS.md at the repo root is a short pointer to gc2-rules for agents that discover instructions through that file.
To ensure your AI agent follows these rules while developing your application:
Copy
AGENTS.mdand theskills/folder from this repository to the root of your own application's repository.When starting a session with your AI agent, it will automatically find and follow the guidelines.
gc2-rules covers:
Prime Directive: Preferring MCP tools and official SDKs.
Tool Priority: Order of interaction (MCP tools > SDK > HTTP).
Security & Auth: How to handle tokens and OAuth flows correctly.
Destructive Operations Policy: Requiring explicit confirmation before destructive changes.
Task-specific skills (skills/*/SKILL.md):
gc2-runtime-sdk— Building JS/TS runtime code with@mapcentia/gc2-sdkgc2-provisioning— Schema, tables, columns, constraints, indexes, migrationsgc2-json-rpc— JSON-RPC method lifecycle and TypeScript interfacesgc2-auth-model— Auth across browser, backend, CLI, and provisioninggc2-types-formats— PostgreSQL types, casts, type hints, output formatsgc2-file-import— File import workflowgc2-ows— WMS/WFS/WFS-T and MapCache proxy endpoints and their access modelgc2-ogc— OGC API Features and Maps (GeoJSON items, map images)gc2-openapi-docs— OpenAPI and docs fallback policygc2-delivery— Delivery checklist and quality gate
Troubleshooting
Tools missing or inputs look odd: ensure
centia-api.jsonexists and is valid. The server generates tools from this file at startup.401/403 errors: run
gc2 login(or set a validAPI_TOKENin the environment for headless use).JSON Schema validation errors: schemas are auto‑normalized/sanitized for MCP, but if you updated
centia-api.json, re-run and check logs for details.ESM/CommonJS issues: this project uses ESM (
"type": "module"). Use Node.js 18+ and run scripts via npm as shown above.
License
ISC
Available Tools
56 toolsdeleteClientC
Delete OAuth client(s).
Inputs: id (required).
deleteColumnC
Delete column(s).
Inputs: schema (required), table (required), column (required).
deleteConstraintC
Delete constraint(s).
Inputs: schema (required), table (required), constraint (required).
deleteIndexD
Delete index(es).
Inputs: schema (required), table (required), index (required).
deleteRpcB
Delete JSON-RPC method(s).
Inputs: method (required).
deleteRuleB
Delete rule(s).
Inputs: id (required).
deleteSchemaC
Delete schema(s).
Inputs: schema (required).
deleteSequenceC
Delete sequence(s).
Inputs: schema (required), sequence (required).
deleteTableC
Delete table(s).
Inputs: schema (required), table (required).
deleteUsersC
Delete sub-user(s).
Inputs: name (required).
getClientB
Get OAuth client(s).
Inputs: id.
getColumnC
Get column(s).
Inputs: schema (required), table (required), column.
getConstraintC
Get constraint(s).
Inputs: schema (required), table (required), constraint.
getEventsB
Check if event trigger is enabled.
Inputs: schema (required), table.
getIndexC
Get index(es).
Inputs: schema (required), table (required), index.
getMetaDataC
Get relation metadata
Inputs: query.
getPrivilegesC
Get privileges.
Inputs: schema (required), table (required).
getRpcB
Get JSON-RPC method definitions.
Inputs: method.
getRuleC
Get rule(s).
Inputs: id.
getSchemaC
Get schema(s).
Inputs: schema, namesOnly.
getSequenceC
Get sequence(s).
Inputs: schema (required), sequence.
getStatsC
Get database statistics.
Inputs: no named parameters.
getTableC
Get table(s).
Inputs: schema (required), table, namesOnly.
getTypeScriptA
Get TypeScript interfaces for RPC methods inferred from /api/v4/call/dry.
Inputs: no named parameters.
getUserC
Get sub-user(s).
Inputs: name.
patchClientC
Update existing OAuth client(s).
Inputs: id (required), name, homepage, description, +6 more.
patchColumnB
Update existing column(s).
Inputs: schema (required), table (required), column (required), name, +5 more.
patchMetaDataC
Update relation metadata
Inputs: relations.
patchPrivilegesC
Update privileges.
Inputs: schema (required), table (required), requestBody (required).
patchRpcB
Update existing JSON-RPC method definitions.
Inputs: method (required), q (required), type_hints, type_formats, +2 more.
patchRuleC
Update existing rule(s).
Inputs: id (required), priority, username, service, +6 more.
patchSchemaB
Rename an existing schema.
Inputs: name (required), schema.
patchSequenceC
Update existing sequence(s).
Inputs: schema (required), sequence (required), name (required), data_type, +6 more.
patchTableA
Rename or move existing table(s).
Inputs: schema (required), table (required), name, comment.
patchUserC
Update existing sub-user(s).
Inputs: name (required), email (required), password (required), properties, +1 more.
postCallB
Call a JSON-RPC method. The method must exist (see /api/v4/methods).
Inputs: jsonrpc (required), method (required), id, params.
postCallDryA
Dry-run an RPC call to infer and store input/output types. Dry-runs do not modify the database. Run this before requesting TypeScript types from /api/v4/interfaces.
Inputs: jsonrpc (required), method (required), id, params.
postClientB
Create new OAuth client(s).
Inputs: requestBody (required).
postColumnC
Create new column(s).
Inputs: schema (required), table (required), requestBody (required).
postCommitB
Commit schema changes to Git and push to the remote repository.
Inputs: schema (required), repo (required), message (required), meta_query.
postConstraintC
Create constraint(s).
Inputs: schema (required), table (required), requestBody (required).
postDeviceC
Start device flow.
Inputs: client_id (required).
postEventsC
Install event trigger.
Inputs: schema (required), table (required), enabled (required).
postFileProcessA
Import a staged file into a target schema/table. Supports dry-run, append, SRS, and more.
Inputs: file (required), schema (required), import, t_srs, +7 more.
postFileUploadC
Upload file(s) via multipart/form-data and stage them on the server.
Inputs: filename.
postGraphQLC
Run a GraphQL query or mutation.
Inputs: schema (required), query (required), variables, operationName.
postIndexC
Create index(es).
Inputs: schema (required), table (required), requestBody (required).
postOauthC
Create token.
Inputs: grant_type (required), username, password, database, +5 more.
postRpcB
Create JSON-RPC method definitions.
Inputs: requestBody (required).
postRuleD
Create rule(s).
Inputs: requestBody (required).
postSchemaD
Create schema(s).
Inputs: requestBody (required).
postSequenceD
Create sequence(s).
Inputs: schema (required), requestBody (required).
postSqlB
Execute SQL statements.
Inputs: q, params, type_hints, type_formats, +2 more.
postSqlNoTokenB
Run SQL statements without a token.
Inputs: database, q, params, type_hints, +3 more.
postTableC
Create table(s).
Inputs: schema (required), requestBody (required).
postUserB
Create new sub-user(s).
Inputs: requestBody (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
TDQS
Scored across 56 tools
Every tool name uniquely pairs a verb (delete, get, patch, post) with a resource (client, column, etc.), leaving no ambiguity. Even with 56 tools, each combination is distinct and clearly indicates the resource and action.
All tool names follow a strict verb_noun pattern using PascalCase and HTTP verbs (delete, get, patch, post). This consistency makes the tool set predictable and easy to navigate.
With 56 tools, the count far exceeds the recommended range (3-15). While the domain may require many operations, this volume is likely to overwhelm agents and suggests an overly broad scope.
The tool set covers CRUD for most major resources (tables, schemas, columns, etc.) and includes file handling, SQL, GraphQL, and OAuth. Minor gaps exist (e.g., no delete for events or devices), but the core database operations are well-covered.
Maintenance
Related MCP Connectors
Your org's AI agents, tasks, runs, search, and brain files as MCP tools and resources.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
The OpenRouter for tools. One MCP connection gives any AI agent 254 hosted tools, pay per call.
MCP server that lets AI assistants use all OneSchema features exposed via the public API.
Related MCP Servers
AlicenseNot gradedqualityDmaintenanceExposes REST API endpoints defined in an OpenAPI Specification as MCP tools, allowing AI models to call them via the ModelContext Protocol.MIT- FlicenseAqualityDmaintenanceExposes two MCP tools (discover and execute) that enable agents to query an OpenAPI schema via natural language and execute matched API operations.2-
- AlicenseNot gradedqualityDmaintenanceAuto-generates MCP tools from your OpenAPI spec, allowing natural language interaction with any API via configurable headers and serverless deployment.21 npmMIT
- AlicenseAqualityDmaintenanceExposes Azure AI Foundry agents, workflows, and AI Search vector-database capabilities as MCP tools, enabling natural language interaction with agents, semantic search, and index management.102MIT