Skip to main content
Glama
Centia MCP Server

Centia MCP Server

Official
by mapcentia

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 install

Authentication

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 password

The 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.io

  • API_TOKEN (optional) — Static personal access token. Bypasses the stored gc2-cli session.

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 dev

This 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-server

Build and run (production)

npm run build
npm start

This 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 dev

MCP Inspector lets you connect to the server and try tools interactively.

  1. Start the Inspector UI:

    npx @modelcontextprotocol/inspector -- npx @mapcentia/gc2-mcp-server
  2. If 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 cwd points to this project directory.

NPM scripts

  • npm run dev — Run TypeScript directly with tsx (hot‑reload style dev loop).

  • npm run build — Compile TypeScript to CommonJS/ESM in dist/ via tsc.

  • 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@mapcentia

Upgrading 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-server

Using 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@mapcentia

Once the Codex plugin files are published to GitHub, install from the repository instead:

codex plugin marketplace add mapcentia/gc2-plugin
codex plugin add gc2@mapcentia

Run 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 mapcentia

For 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:

  1. Copy AGENTS.md and the skills/ folder from this repository to the root of your own application's repository.

  2. 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-sdk

  • gc2-provisioning — Schema, tables, columns, constraints, indexes, migrations

  • gc2-json-rpc — JSON-RPC method lifecycle and TypeScript interfaces

  • gc2-auth-model — Auth across browser, backend, CLI, and provisioning

  • gc2-types-formats — PostgreSQL types, casts, type hints, output formats

  • gc2-file-import — File import workflow

  • gc2-ows — WMS/WFS/WFS-T and MapCache proxy endpoints and their access model

  • gc2-ogc — OGC API Features and Maps (GeoJSON items, map images)

  • gc2-openapi-docs — OpenAPI and docs fallback policy

  • gc2-delivery — Delivery checklist and quality gate

Troubleshooting

  • Tools missing or inputs look odd: ensure centia-api.json exists and is valid. The server generates tools from this file at startup.

  • 401/403 errors: run gc2 login (or set a valid API_TOKEN in 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 tools
deleteClientC

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

    C2.8/5.0

    Scored across 56 tools

    Disambiguation5/5

    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.

    Naming Consistency5/5

    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.

    Tool Count2/5

    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.

    Completeness4/5

    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

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Exposes REST API endpoints defined in an OpenAPI Specification as MCP tools, allowing AI models to call them via the ModelContext Protocol.
      MIT
    • F
      license
      A
      quality
      D
      maintenance
      Exposes two MCP tools (discover and execute) that enable agents to query an OpenAPI schema via natural language and execute matched API operations.
      2
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Auto-generates MCP tools from your OpenAPI spec, allowing natural language interaction with any API via configurable headers and serverless deployment.
      21 npm
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Exposes 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.
      10
      2
      MIT