Skip to main content

MCP server for API Platform

The 2GIS MCP server provides AI agents with access to 2GIS geodata: maps, addresses, routes, and organization data. It uses the open Model Context Protocol, routes requests from AI agents to the 2GIS API, and returns results in a format suitable for processing. AI assistants use this data to answer user questions about places, addresses, organizations, and routes, as well as to analyze and visualize data.

How it works:

  1. A user sends a request to an AI agent (for example, Find all 24-hour pharmacies).
  2. The agent determines what geodata and services are needed (maps, POI search, etc.) and calls the MCP server.
  3. The MCP server sends requests to the appropriate 2GIS APIs (for example, Static API for map images, Places API for searching and retrieving information about places).
  4. The agent receives the result and generates a response for the user.

Getting started​

To work with the 2GIS MCP server, you need to obtain an API access key: create a free demo key (valid for 30 days, with request limits) or purchase a subscription.

The 2GIS API Platform MCP server is available both in the cloud and as a downloadable distribution for local installation. Follow the instructions for the option you need:

Prompt recommendations​

  • Indicate a logical sequence for solving the task, for example first get the coordinates by address, then build the route. This helps to avoid a common mistake - building a route on fictional coordinates.
  • Break down complex tasks into several smaller ones. For example, instead of calculating a single 25×25 distance matrix, use several smaller matrices.
  • When building routes, specify the type of transport and restrictions, if necessary. For example, walking route or car route without toll roads.
  • When searching for points of interest, specify the desired number of results. For example, three nearest or top five by rating.
  • Specify the response language explicitly: response in English.

Example​

Images below show examples of the 2GIS MCP server used in a dialogue between the user and the AI assistant:

  • Searching for objects by criteria:

    Dialogue for searching objects
  • Displaying an object on the map:

    Dialogue for displaying an object on the map
  • Calculating a route:

    Dialogue for routing

Tariffs and limits​

When using the MCP server, the same tariffs and limits are applied as when directly accessing the 2GIS API. See current prices and limits in the Prices instruction.