Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# roteiro-agent

MCP (Model Context Protocol) server for [Cairn](https://github.com/i-norden/cairn) — a spatial data platform. Enables AI agents (Claude Desktop, VS Code, Cursor) to work with geospatial datasets, run geoprocessing operations, execute PostGIS queries, and more.
MCP (Model Context Protocol) server for [Roteiro](roteiro.io) — a spatial data platform. Enables AI agents (Claude Desktop, VS Code, Cursor) to work with geospatial datasets, run geoprocessing operations, execute PostGIS queries, and more.

## Installation

Expand All @@ -19,7 +19,7 @@ go build -o roteiro-agent .
## Usage

```bash
roteiro-agent --server-url http://localhost:8080 --api-key cairn_abc123
roteiro-agent --server-url http://localhost:8080 --api-key Roteiro_abc123
```

The server communicates via JSON-RPC 2.0 over stdio (stdin/stdout), following the MCP specification.
Expand All @@ -28,9 +28,9 @@ The server communicates via JSON-RPC 2.0 over stdio (stdin/stdout), following th

| Variable | Flag | Description |
|----------|------|-------------|
| `CAIRN_SERVER_URL` | `--server-url` | Cairn server base URL |
| `CAIRN_API_KEY` | `--api-key` | Cairn API key |
| `CAIRN_SESSION_COOKIE` | `--session-cookie` | Session cookie (alternative to API key) |
| `ROTEIRO_SERVER_URL` | `--server-url` | Roteiro server base URL |
| `ROTEIRO_API_KEY` | `--api-key` | Roteiro API key |
| `ROTEIRO_SESSION_COOKIE` | `--session-cookie` | Session cookie (alternative to API key) |

## MCP Client Configuration

Expand Down
12 changes: 6 additions & 6 deletions SKILL.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Cairn Spatial Platform — Agent Guide
# Roteiro Spatial Platform — Agent Guide

## What is Cairn?
## What is Roteiro?

Cairn is a full-featured spatial data platform. It stores, processes, and serves geospatial datasets. Think of it as a self-hosted GIS server with a REST API.
Roteiro is a full-featured spatial data platform. It stores, processes, and serves geospatial datasets. Think of it as a self-hosted GIS server with a REST API.

## Authentication

Expand Down Expand Up @@ -33,7 +33,7 @@ Use `query_features` with:

### SQL queries

Use `execute_sql` for complex spatial queries. Cairn exposes PostGIS, so all spatial functions are available:
Use `execute_sql` for complex spatial queries. Roteiro exposes PostGIS, so all spatial functions are available:
- `ST_Area`, `ST_Length`, `ST_Distance` — measurements
- `ST_Buffer`, `ST_Intersection`, `ST_Union` — geometry operations
- `ST_Intersects`, `ST_Contains`, `ST_Within` — spatial predicates
Expand Down Expand Up @@ -68,7 +68,7 @@ Use `list_operations` to get the full list with parameter schemas.

## Data Catalog & STAC

Cairn includes a built-in data catalog and supports importing from remote STAC (SpatioTemporal Asset Catalog) servers.
Roteiro includes a built-in data catalog and supports importing from remote STAC (SpatioTemporal Asset Catalog) servers.

### Built-in catalog

Expand All @@ -84,7 +84,7 @@ For external data sources:

### Local STAC search

Use `search_stac` to search Cairn's own STAC endpoint with spatial (`bbox`), temporal (`datetime`), collection, and CQL2 (`filter`) criteria.
Use `search_stac` to search Roteiro's own STAC endpoint with spatial (`bbox`), temporal (`datetime`), collection, and CQL2 (`filter`) criteria.

## Tips for Effective Use

Expand Down
14 changes: 7 additions & 7 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// roteiro-agent is an MCP (Model Context Protocol) server that exposes
// Cairn's spatial data platform to AI agents like Claude Desktop, VS Code,
// Roteiro's spatial data platform to AI agents like Claude Desktop, VS Code,
// and Cursor.
//
// Usage:
Expand All @@ -19,8 +19,8 @@ import (
var version = "dev"

func main() {
serverURL := flag.String("server-url", "", "Cairn server base URL (e.g. http://localhost:8080)")
apiKey := flag.String("api-key", "", "Cairn API key for authentication")
serverURL := flag.String("server-url", "", "Roteiro server base URL (e.g. http://localhost:8080)")
apiKey := flag.String("api-key", "", "Roteiro API key for authentication")
sessionCookie := flag.String("session-cookie", "", "Session cookie value for authentication (alternative to API key)")
showVersion := flag.Bool("version", false, "Print version and exit")
flag.Parse()
Expand All @@ -32,17 +32,17 @@ func main() {

if *serverURL == "" {
// Fall back to environment variable.
*serverURL = os.Getenv("CAIRN_SERVER_URL")
*serverURL = os.Getenv("ROTEIRO_SERVER_URL")
}
if *apiKey == "" {
*apiKey = os.Getenv("CAIRN_API_KEY")
*apiKey = os.Getenv("ROTEIRO_API_KEY")
}
if *sessionCookie == "" {
*sessionCookie = os.Getenv("CAIRN_SESSION_COOKIE")
*sessionCookie = os.Getenv("ROTEIRO_SESSION_COOKIE")
}

if *serverURL == "" {
log.Fatal("--server-url or CAIRN_SERVER_URL is required")
log.Fatal("--server-url or ROTEIRO_SERVER_URL is required")
}

client := mcp.NewClient(*serverURL, *apiKey)
Expand Down
6 changes: 3 additions & 3 deletions mcp/client.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Package mcp implements an MCP (Model Context Protocol) server that exposes
// Cairn's spatial data platform to AI agents.
// Roteiro's spatial data platform to AI agents.
package mcp

import (
Expand All @@ -16,7 +16,7 @@ import (
"time"
)

// Client is a thin HTTP wrapper for the Cairn REST API.
// Client is a thin HTTP wrapper for the Roteiro REST API.
type Client struct {
BaseURL string
APIKey string
Expand Down Expand Up @@ -272,7 +272,7 @@ func (c *Client) ExecuteSQL(query string) (json.RawMessage, error) {
return nil, err
}
if code == http.StatusNotFound || code == http.StatusMethodNotAllowed {
// Backward compatibility for older Cairn deployments.
// Backward compatibility for older Roteiro deployments.
body, code, err = c.postJSON("/api/sql/query", map[string]string{"sql": query})
if err != nil {
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion mcp/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type Server struct {
info ServerInfo
}

// NewServer creates a new MCP server backed by the given Cairn API client.
// NewServer creates a new MCP server backed by the given Roteiro API client.
func NewServer(client *Client) *Server {
return &Server{
client: client,
Expand Down
2 changes: 1 addition & 1 deletion mcp/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"testing"
)

// testServer creates a test Cairn API server and returns a connected MCP server.
// testServer creates a test Roteiro API server and returns a connected MCP server.
func testServer(t *testing.T, handler http.Handler) *Server {
t.Helper()
ts := httptest.NewServer(handler)
Expand Down
2 changes: 1 addition & 1 deletion mcp/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func AllTools() []Tool {
return []Tool{
{
Name: "list_datasets",
Description: "List all datasets registered in Cairn with their names, formats, feature counts, and geometry types.",
Description: "List all datasets registered in Roteiro with their names, formats, feature counts, and geometry types.",
InputSchema: InputSchema{Type: "object"},
},
{
Expand Down
Loading