Skip to main content

Agentic Development with GC2

Agentic development is a way of working where you describe what you want and an AI agent such as Claude Code or Codex does it: designs the data model, writes the application code, loads the data, publishes the map services and checks its own work. GC2 (Geo Compute Cloud) is built for this. It is both a Backend as a Service for applications and a piece of spatial infrastructure, a PostGIS platform with imports, OGC services, tiles, snapshots and access control, and the whole surface is exposed through one API. The GC2 plugin gives an agent two things it needs to use that surface well: MCP tools that act on your backend, and skills that teach it how GC2 works and which tool to use when. The same plugin therefore serves two jobs: building applications on GC2, and operating a GC2 instance day to day.

What is in the plugin​

The plugin lives in the mapcentia/gc2-plugin repository and bundles:

  • The GC2 MCP server (@mapcentia/gc2-mcp-server). A Model Context Protocol server whose tools are generated from the GC2 OpenAPI spec, so every v4 endpoint is available to the agent: schemas, tables, columns, constraints, indexes, SQL, users, privileges, rules, OAuth clients, file import, layers and styling, OGC services, snapshots, the scheduler, functions and key/value storage.
  • Twenty skills. Short, task-specific guides the agent loads on demand. gc2-rules is the entry point and holds the hard rules: tool priority (MCP tools > SDK > OpenAPI > docs), the boundary between runtime code and provisioning, security and auth baselines, and a confirmation policy for destructive operations. The other skills cover one workflow each, see the list below.
  • Plugin manifests for Claude Code (.claude-plugin/) and Codex (.codex-plugin/), plus a marketplace named mapcentia so the plugin can be installed with one command.

With the plugin installed, an agent can build an application from scratch: design the schema, load data, set up users and access rules, style map layers and then write the frontend against the SDK, all from natural language.

Install the plugin​

The plugin uses your CLI session for authentication, so install the CLI and log in once:

npm install -g @mapcentia/gc2-cli
gc2 login

Then install the plugin in your agent.

Add the MapCentia marketplace and install the plugin from inside Claude Code:

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

Start a new session. The MCP tools are available as mcp__gc2__*, and the skills as /gc2:gc2-rules, /gc2:gc2-provisioning and so on. Claude loads the relevant skill automatically on GC2 tasks; you rarely need to invoke them by name.

To try a local checkout without installing it:

claude --plugin-dir /path/to/gc2-plugin
Upgrading from the Centia plugin

The plugin was published as centia@centia-io until version 1.0.36. Remove it first, then install as above:

/plugin uninstall centia@centia-io
/plugin marketplace remove centia-io

Skill names changed from centia-* to gc2-*, and the MCP tool prefix from mcp__centia__ to mcp__gc2__.

Other agents: the MCP server on its own​

Any MCP-capable agent (Claude Desktop, Junie, Windsurf, Cursor and others) can use the GC2 MCP server without the plugin. Add it to the agent's MCP configuration:

{
"mcpServers": {
"gc2": {
"command": "npx",
"args": ["-y", "@mapcentia/gc2-mcp-server"]
}
}
}

The server reads the session stored by gc2 login. To run it without the CLI, for example in CI, pass a token instead:

{
"mcpServers": {
"gc2": {
"command": "npx",
"args": ["-y", "@mapcentia/gc2-mcp-server"],
"env": {
"API_TOKEN": "your-access-token",
"API_BASE_URL": "https://api.gc2.io"
}
}
}
}
  • API_BASE_URL (optional) — Base URL of the GC2 API. Set it for a self-hosted deployment. Default: https://api.gc2.io.
  • API_TOKEN (optional) — Access token used instead of the CLI session. Most tools require authentication.
info

Get an access token from the console.

To give such an agent the skills as well, copy AGENTS.md and the skills/ folder from the plugin repository to the root of your own application's repository. Agents that discover instructions through AGENTS.md (Junie, Codex without the plugin, and others) then find the rules on their own. For Claude Code without the plugin, copy AGENTS.md to CLAUDE.md.

Operating GC2 with an agent​

Every part of GC2 is an API, so every part can be run by an agent. Instead of clicking through the Web App or writing scripts for each chore, you tell the agent what you need and it uses the MCP tools, with the skills telling it the right order and the right checks. Some things an agent handles well:

  • Data pipelines. "Import this GeoPackage into the parks schema, replacing the table, then take a GeoParquet snapshot." The agent uploads and processes the file, verifies the row count and geometry type, and queues the snapshot.
  • Scheduled imports. "Fetch the municipality WFS every night at 02:00, snapshot after each run, and tell me if a run fails." The agent creates the scheduler job with the cron expression and snapshot: true, and can later read the run log, explain a failed run and stop a stale one.
  • Publishing and cartography. "Publish roads as WMS and WFS with a style by road class, and add labels." The agent configures the layer, classes, styles and labels in one atomic update and returns the OGC service URLs for QGIS or a web map.
  • Tiles. "The basemap tiles are slow the first time." The agent seeds the tile cache for the zoom levels and extent you name, and clears it after a data update.
  • Access control. "Create a read-only sub-user for the consultant with access to parks only, and make sure field workers only see features inside their municipality." The agent creates the user, grants privileges and writes the geofence rule, then verifies the effective privileges.
  • Inspection and housekeeping. "Which tables in staging have no spatial index?" or "Compare the current inductees table with last month's snapshot in DuckDB." The agent runs the queries and reports.

Read operations run freely; writes that drop or overwrite data are proposed first and run only after you confirm, so the agent can be trusted with a production instance.

The assistant in the Web App​

The GC2 Web App has the same agent built in, under GC2 AI. It uses the same MCP tools and skills, and every write it proposes is shown as a confirmation in the UI before it runs. It knows which page you are on, so "add a label to this layer" or "snapshot this table" works without further context. Use it for the operational tasks above when you are already in the console; use the plugin in Claude Code or Codex when the task also involves your application code.

How the agent works with GC2​

gc2-rules makes the agent follow a fixed priority, so it reaches for the right tool without being told each time:

  1. GC2 MCP tools for anything that changes or inspects the backend: schema changes, data import, users, rules, layers, tiles, snapshots, scheduler jobs.
  2. @mapcentia/gc2-sdk for application runtime code: SQL, JSON-RPC methods, GraphQL, realtime, features.
  3. OpenAPI and plain HTTP only when neither of the above covers the call.

Read tools run freely; write tools that drop or overwrite data ask for confirmation first. The agent is told to keep tokens out of frontend code and to use the right OAuth flow for each context.

Skills​

SkillUse when
gc2-rulesEvery GC2 task: hard rules, tool priority, destructive-ops policy, routing to the skills below
gc2-runtime-sdkWriting JS/TS runtime code with @mapcentia/gc2-sdk
gc2-provisioningSchemas, tables, columns, constraints, indexes, migrations
gc2-json-rpcCreating and calling JSON-RPC methods, TypeScript interfaces
gc2-auth-modelAuth across browser, backend, CLI and provisioning
gc2-types-formatsPostgreSQL and PostGIS types, casts, type hints, output formats
gc2-file-importThe two-step file import workflow
gc2-featureReading and writing single rows as GeoJSON through the Feature API
gc2-keyvalueSmall JSON state in the key/value store
gc2-map-stylingMap views, layers, classes, styles and labels
gc2-owsWMS, WFS and WFS-T, the MapCache proxy (OGC services)
gc2-ogcOGC API Features and Maps (OGC API)
gc2-schema-tilesMerged per-schema vector tilesets
gc2-tile-seedingSeeding and warming the tile cache
gc2-snapshotsGeoParquet and FlatGeobuf snapshots and reading them with DuckDB
gc2-schedulerScheduled imports, jobs and runs
gc2-realtimeWebSocket change events and subscriptions
gc2-privilegesSub-user privileges, groups and rights inheritance
gc2-openapi-docsOpenAPI and docs fallback policy
gc2-deliveryDelivery checklist and quality gate before handing work over

The plugin also ships danish-search, a skill for the @mapcentia/danish-search address and cadastral search component.

Skills are plain Markdown files in skills/<name>/SKILL.md, so you can read them yourself to learn the recommended way of doing something, and copy or adapt them for your own project's agent guidelines.