home / mcp / dndzgz mcp server

DNDzgz MCP Server

A MCP Server to know about Zaragoza bus, tram and bizi services in realtime

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "danilat-mcp-dndzgz": {
      "command": "npx",
      "args": [
        "@dndzgz/mcp"
      ],
      "env": {
        "GOOGLE_MAPS_API_KEY": "your-api-key"
      }
    }
  }
}

You can access Zaragoza tram information through this MCP server, which exposes real-time tram arrival estimates and station data via a structured set of endpoints. It lets you query local transit data efficiently from your MCP client and integrates a Google Maps key for geolocation features.

How to use

Connect your MCP client to the dndzgz MCP server using the stdio transport. The runtime command is npx @dndzgz/mcp with your Google Maps API key supplied as an environment variable. Use the client to request real-time tram estimations for a station, fetch station lists, or locate nearby tram stops, bus stops, and Bizi stations.

How to install

Prerequisites: Node.js and npm installed on your machine.

1. Install Node.js and npm if they are not already installed.

2. Open a terminal and run the following to prepare and start the MCP server via stdio transport.

Install and run the MCP server via stdio transport

{
  "mcpServers": {
    "dndzgz": {
      "command": "npx",
      "args": ["@dndzgz/mcp"],
      "env": [
        {
          "name": "GOOGLE_MAPS_API_KEY",
          "value": "your-api-key"
        }
      ]
    }
  }
}

Start the MCP client configuration

In your MCP client configuration, reference the stdio server using the command and environment described above. The client will connect to the MCP endpoint exposed by the dndzgz MCP server and you can invoke the available tools to access tram, station, bus stop, and Bizi data as needed.

Notes on using the tools

The server provides a set of tools to query Zaragoza transit data. You can obtain real-time tram arrivals for a station, list tram stations by proximity, fetch all Zaragoza bus stops, get real-time bus arrivals, locate Bizi bike stations, and retrieve Google Maps links or geolocation data from addresses.

Available tools

zaragoza-tram-estimations

Get real-time arrival estimations for a specific tram station by station ID and return timings for both directions.

zaragoza-tram-stations

Retrieve a list of all tram stations in Zaragoza and sort by proximity using latitude and longitude.

zaragoza-bus-stops

Fetch all bus stops in Zaragoza with location, names, IDs, and lines, sortable by proximity.

zaragoza-bus-estimations

Provide real-time arrival estimates for a specific bus stop by stop ID, including timing for each line.

zaragoza-bizi-stations

List all Bizi bike stations in Zaragoza with location, names, and IDs, sortable by proximity.

zaragoza-bizi-estimations

Return real-time availability of bikes and free slots at a Bizi station.

google-maps-link

Generate a Google Maps URL for a given latitude and longitude.

geolocation-from-address

Resolve an address to geographic coordinates and return the formatted address found.