EEA GeoNetwork MCP Server

EEA GeoNetwork MCP Server

Enables interaction with the European Environment Agency (EEA) GeoNetwork Catalogue API to search, manage, and edit geographic metadata records. It supports advanced spatial searches, metadata exports in multiple formats, and authenticated updates to records and their attachments.

Category
访问服务器

README

EEA GeoNetwork MCP Server

A Model Context Protocol (MCP) server that provides tools to interact with the European Environment Agency (EEA) GeoNetwork Catalogue API (GeoNetwork 4.4.9).

Features

This MCP server provides 20 tools for interacting with the EEA GeoNetwork Catalogue:

Search & Discovery

  • search_records - Search for metadata records with full Elasticsearch query support
  • search_by_extent - Find records by geographic bounding box
  • get_record - Retrieve detailed metadata for a specific record by UUID
  • get_record_by_id - Retrieve a record by its internal numeric ID
  • get_related_records - Find related records (parent, children, services, datasets)

Data Export & Management

  • get_record_formatters - List available export formats for a record
  • export_record - Export metadata in various formats (XML, PDF, etc.)
  • duplicate_record - Duplicate an existing metadata record (requires authentication)

Record Editing (Requires Authentication)

  • update_record - Update any field using XPath (supports ISO 19139 and ISO 19115-3)
  • update_record_title - Simplified tool to update a record's title (auto-detects schema)
  • add_record_tags - Add tags/categories to a record
  • delete_record_tags - Remove tags/categories from a record

Resource/Attachment Management

  • upload_file_to_record - Upload a file from local filesystem directly to a metadata record (requires authentication)
  • get_attachments - List all attachments/resources for a metadata record
  • delete_attachment - Delete a specific attachment from a record (requires authentication)

Catalogue Information

  • get_site_info - Get catalogue configuration and site information
  • get_sources - List catalogue sources and sub-portals
  • list_groups - List all user groups
  • get_tags - Get available tags/categories
  • get_regions - Get geographic regions/extents

Installation

Option 1: Docker (Recommended)

The easiest way to run the server is using Docker:

# Build and start the container
docker-compose up -d

# Check logs
docker-compose logs -f

# Stop the container
docker-compose down

The server will be available at http://localhost:3001

Environment Variables: You can customize the configuration by creating a .env file or editing the docker-compose.yml:

environment:
  - PORT=3001
  - BASE_URL=https://galliwasp.eea.europa.eu/catalogue/srv/api
  - CATALOGUE_USERNAME=your_username
  - CATALOGUE_PASSWORD=your_password

Option 2: Manual Installation

  1. Install dependencies:
npm install
  1. Build the project:
npm run build
  1. (Optional) Configure environment variables:
# Create a .env file in the project root
PORT=3001
BASE_URL=https://galliwasp.eea.europa.eu/catalogue/srv/api
MAX_SEARCH_RESULTS=20

# Authentication for write operations (duplicate, update)
CATALOGUE_USERNAME=your_username
CATALOGUE_PASSWORD='your_password'

# Rate limiting
RATE_LIMIT_WINDOW_MS=900000
RATE_LIMIT_MAX_REQUESTS=100

Note: For passwords containing special characters ($, #, etc.), wrap the value in single quotes.

Usage

Streamable HTTP Server (MCP Transport)

The server uses the official MCP Streamable HTTP transport with Server-Sent Events (SSE).

Start the server:

npm start

The server will start on port 3001 (or the port specified in the PORT environment variable).

Available endpoints:

  • GET http://localhost:3001/health - Health check endpoint
  • GET http://localhost:3001/info - Server information
  • POST http://localhost:3001/upload - Upload file to basket (multipart/form-data)
  • GET http://localhost:3001/uploads/:filename - Retrieve uploaded file
  • POST http://localhost:3001/ - MCP message endpoint (standard JSON-RPC)
  • GET http://localhost:3001/ - MCP SSE stream endpoint (for server-initiated messages)

Testing the server:

# Check if server is running
curl http://localhost:3001/health

# Should return: {"status":"ok","service":"eea-geonetwork-mcp"}

# Upload a file to the basket
curl -X POST http://localhost:3001/upload -F "file=@myfile.pdf"

# Returns: {"success":true,"file":{"url":"http://localhost:3001/uploads/myfile-123456789.pdf",...}}

Upload Basket

The server includes a built-in upload basket for temporary file storage. This allows you to upload files first, then attach them to metadata records using the URL.

Swagger UI (Easiest Method):

  1. Open http://localhost:3001/api-docs in your browser
  2. Expand the "POST /upload" endpoint
  3. Click "Try it out"
  4. Select a file and click "Execute"
  5. Copy the returned URL from the response
  6. Use this URL with the upload_resource_from_url MCP tool

How it works:

  1. Upload a file via POST /upload endpoint (or use Swagger UI)
  2. Server stores the file in the uploads/ directory
  3. Server returns a URL: http://localhost:3001/uploads/filename
  4. Use this URL with upload_resource_from_url tool to attach to metadata records

Configuration:

# Optional environment variables
UPLOAD_DIR=./uploads           # Upload directory (default: ./uploads)
MAX_FILE_SIZE=104857600        # Max file size in bytes (default: 100MB)

Swagger UI:

  • Access the interactive API documentation and file upload interface at:
  • http://localhost:3001/api-docs

With Claude Desktop

Add to your Claude Desktop configuration file:

MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "eea-geonetwork": {
      "command": "node",
      "args": ["C:\\Users\\dubos\\_Projects\\EEA_sdi_mcp\\dist\\index.js"]
    }
  }
}

Example Queries

Once connected to Claude Desktop, you can ask questions like:

  • "Search the EEA catalogue for datasets about air quality"
  • "Find all metadata records within the bounding box of Europe"
  • "Get detailed information about record UUID abc-123-def"
  • "Export this metadata record as XML"
  • "What geographic regions are available in the catalogue?"
  • "Show me all datasets related to this parent record"

API Base URL

The server connects to: https://galliwasp.eea.europa.eu/catalogue/srv/api (Sandbox Environment)

Development

Commands

  • Build: npm run build - Compile TypeScript to dist/
  • Watch mode: npm run dev - Compile TypeScript in watch mode (auto-recompile on changes)
  • Start: npm start - Run the compiled server

Development Workflow

For active development, run two commands in separate terminals:

Terminal 1 - Compile TypeScript in watch mode:

npm run dev

Terminal 2 - Start the server:

npm start

This way, TypeScript will automatically recompile when you make changes, and you can restart the server to pick up the new changes.

Architecture

The server uses the official MCP SDK with Streamable HTTP transport (stateless mode):

  • Express server handles HTTP endpoints with CORS support
  • MCP Server handles tool requests via Streamable HTTP/SSE
  • Axios client communicates with the EEA GeoNetwork API (30s timeout)
  • Modular design with separate files:
    • src/index.ts - Server setup and routing
    • src/tools.ts - Tool definitions (20 tools)
    • src/handlers.ts - Tool implementation handlers
    • src/types.ts - TypeScript interfaces

Tools Reference

search_records

Search for metadata records in the catalogue.

Parameters:

  • query (string): Search text
  • from (number): Starting position (default: 0)
  • size (number): Number of results (default: 10, max: 100)
  • bucket (string): Filter by facet bucket
  • sortBy (string): Sort field
  • sortOrder (string): "asc" or "desc"

get_record

Get detailed metadata for a specific record.

Parameters:

  • uuid (string, required): Record UUID or ID
  • approved (boolean): Only approved versions (default: true)

search_by_extent

Search records by geographic extent.

Parameters:

  • minx (number, required): Minimum longitude (west)
  • miny (number, required): Minimum latitude (south)
  • maxx (number, required): Maximum longitude (east)
  • maxy (number, required): Maximum latitude (north)
  • relation (string): Spatial relationship - "intersects", "within", or "contains" (default: "intersects")

export_record

Export a metadata record in a specific format.

Parameters:

  • uuid (string, required): Record UUID
  • formatter (string, required): Format identifier (e.g., "xml", "pdf", "full_view")

Use get_record_formatters first to see available formats for a record.

duplicate_record

Duplicate an existing metadata record with a new UUID. Requires authentication.

Parameters:

  • metadataUuid (string, required): UUID of the record to duplicate
  • group (string, optional): Target group for the duplicated record
  • isChildOfSource (boolean, optional): Set the source record as parent of the new record (default: false)
  • targetUuid (string, optional): Specific UUID to use for the duplicated record (auto-generated if not provided)
  • hasCategoryOfSource (boolean, optional): Copy categories from source record (default: true)

get_record_by_id

Retrieve a metadata record by its internal numeric ID. Useful for getting the UUID after a duplicate operation.

Parameters:

  • id (number, required): Internal numeric ID of the record

update_record

Update a metadata record field using XPath. Requires authentication.

Parameters:

  • uuid (string, required): UUID of the record to update
  • xpath (string, required): XPath to the element to update
  • value (string, required): New value (text for simple replacement, or full XML element)
  • operation (string, optional): Operation type - "replace" (default), "add", or "delete"
  • updateDateStamp (boolean, optional): Update the record's timestamp (default: true)

Common XPaths:

  • ISO 19139 title: gmd:identificationInfo/*/gmd:citation/gmd:CI_Citation/gmd:title/gco:CharacterString
  • ISO 19115-3 title: mdb:identificationInfo/*/mri:citation/cit:CI_Citation/cit:title/gco:CharacterString

update_record_title

Simplified tool to update a record's title. Automatically detects the schema (ISO 19139 or ISO 19115-3) and uses the correct XPath. Requires authentication.

Parameters:

  • uuid (string, required): UUID of the record to update
  • title (string, required): New title for the record

add_record_tags

Add tags (categories) to a metadata record. Requires authentication.

Parameters:

  • uuid (string, required): UUID of the record
  • tags (array of numbers, required): Array of tag IDs to add

Use get_tags first to find available tag IDs.

delete_record_tags

Remove tags (categories) from a metadata record. Requires authentication.

Parameters:

  • uuid (string, required): UUID of the record
  • tags (array of numbers, required): Array of tag IDs to remove

upload_file_to_record

Upload a file from your local filesystem directly to a metadata record as an attachment. The file is uploaded as binary data to GeoNetwork. Requires authentication.

Parameters:

  • metadataUuid (string, required): UUID of the metadata record to attach the file to
  • filePath (string, required): Absolute path to the local file (e.g., C:\Users\name\document.pdf or /home/user/document.pdf)
  • visibility (string, optional): The sharing policy - "PUBLIC" or "PRIVATE" (default: PUBLIC)
  • approved (boolean, optional): Use approved version or not (default: false)

Example:

metadataUuid: "43d7c186-2187-4bcd-8843-41e575a5ef56"
filePath: "C:\\Documents\\myfile.pdf"

Note: This tool directly uploads the file to GeoNetwork. The file must be accessible on the machine running the MCP server.

get_attachments

List all attachments/resources for a metadata record.

Parameters:

  • metadataUuid (string, required): UUID of the metadata record
  • sort (string, optional): Sort results by "type" or "name" (default: name)
  • approved (boolean, optional): Use approved version or not (default: true)
  • filter (string, optional): Filter pattern for attachment names (default: *)

Returns: Array of attachment objects with details like filename, type, URL, size, etc.

delete_attachment

Delete a specific attachment from a metadata record. Requires authentication.

Parameters:

  • metadataUuid (string, required): UUID of the metadata record
  • resourceId (string, required): The ID/filename of the resource to delete
  • approved (boolean, optional): Use approved version or not (default: false)

Note: Use get_attachments first to find the exact resourceId of the attachment you want to delete.

License

MIT

Related Links

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选