MapInfo Pro

 View Only

MapInfo Monday: Making your AI Context-Aware using the Precisely MCP server

  • 1.  MapInfo Monday: Making your AI Context-Aware using the Precisely MCP server

    Employee
    Posted 6 hours ago

    I spent some time last week understanding and configuring the Precisely DIS Locate MCP Server for use in Claude, one of the many generative AI assistants.

    I would recommend that you start by reading this blog What Is Model Context Protocol (MCP)? A New Standard for Smarter, Context-Aware AI. The blog introduces you quickly and easily to the concept of an MCP Server. It highlights the benefits of using these with your generative AI assistants; it's all about connecting the AI to your data, APIs, and more.

    Next up, I suggest that you read this blog (Building an AI-First Interface for Precisely APIs with Model Context Protocol), which is a high-level introduction to connecting your AI to the Precisely Data Integrity Suite.

    Once you have read these posts, the next step is to create a trial account for the Precisely Data Integrity Suite. This can be done via the Developer Portal. If you already have an account with access to the Data Graph API, you can also use this account.

    This is where I began. Now, let me give you a few tips on deploying the MCP server and configuring Claude

    Happy #MapInfoMonday!

    Deploying the Precisely MCP Server and Configuring Claude to use it

    You can locate the resources for the Precisely Locate MCP Server in this repository: PreciselyData/precisely-mcp-servers. Be aware that you should use dis-locate-apis-v2. The first version has been deprecated.

    In this repository, you find a step-by-step instruction on how to install and configure the MCP server.

    Ensure that you have the prerequisites in place before you begin. They are also listed: install Python 3.8 or later, install Claude Desktop, and obtain the credentials for your Precisely API.

    You can create the API keys from your Account in the Suite. Select your Account in the lower left side of the Data Integrity Suite, and then select the API Keys tab. Here you can generate the needed keys and secret. Do remember to take note of the secret.

    image
    The next step is to either clone the repository with Git or just download the repository in a zip. I suggest that you go to the main repository for the precisely-mcp-servers and here downloads the ZIP file from the green <> Code dropdownbutton.
    image
    After downloading the zip file, you must unzip it on your computer. I just unzipped it directly onto my C drive. Take note of this path as we will need it later.
    image
    Now we must install the Python modules that the MCP Server requires to run. You typically use Pip to download and install these modules. In the folder where you unzipped the precisely MCP Server, you can find a file listing the required modules.
    I used this command to launch pip through Python and read the files of required modules:
    py -m pip install -r C:\precisely-mcp-servers\dis-locate-apis-v2\requirements.txt
    image
    You must now prepare an environment file for the MCP server with the API credentials. Make a copy of the file env.template and call it .env. Insert the API Secret and API Key in the file at their right places.
    And finally, configure Claude by running a PowerShell script through Windows PowerShell
    image
    Make sure to shut down Claude and also quit Claude from the Claude icon in the Windows Taskbar.
    When you start Claude again, you should be able to find the Precisely Connector. From the File Menu select Settings....
    image
    And now select Connectors. You should see the Precisely connector.
    image
    That's it. Now we are ready to ask questions and have Claude use the Locate and Enrich APIs from the Precisely Data Integrity Suite.
    If you run into an issue deploying the MCP server, I'd like to share some advice that I got from my colleague, @Charles Trawinski: "Simply ask Claude for help". 

    Using the Precisely Locate APIs in Claude

    The benefit of using the APIs through a generative AI assistant like Claude is that you don't have to worry about how to call these APIs. Claude will handle this for you.

    When you configured Claude to use these API, you also described the APIs that could be used. In that way, Claude now knows what APIs to use for certain tasks like geocoding and similar.

    Let's try it out.

    First, I ask Claude to find the address for the Precisely office in Burlington. Claude uses a standard web search to find this.

    image
    Next, I ask Claude to find the latitude/longitude for this address. You can see that Claude is using the geocode API for this. Note that whenever Claude wants to use a new API, it first asks you for permission to use this API.
    image
    Now that we have located the office, we can try to understand the neighborhood. As you can see below, it asks for permission to use the Get demographics API.
    image
    Claude attempts to obtain demographics for the address, but fails because it's a commercial site. It now uses a different API to access the neighborhood.
    image
    Claude now gets a detailed description of the neighborhood.
    image
    It's about time we have a look at the area on a map. Claude can help you with this, too. As the services currently provided through the Precisely MCP server don't return detailed spatial data, Claude can only show the neighborhood as a point and a buffer.
    image
    We can also ask Claude to investigate the risk exposure for the area. As you can see below, Claude uses several APIs to find the risk exposure for this neighborhood.
    image
    I hope you can see that using the Precisely MCP server from your generative AI assistance is quite easy.
    While you could ask Claude these questions individually each time, that approach quickly becomes tedious and inconsistent. Instead, by combining an MCP server with a structured prompt, you can create a streamlined workflow: simply input an address, and automatically receive a comprehensive report with all relevant property data, risk assessments, and demographic information in a standardized format.
    How are you using AI in your spatial analysis work? We'd love to hear what's proving useful.


    ------------------------------
    Peter Horsbøll Møller
    Principal Presales Consultant | Distinguished Engineer
    Precisely | Trust in Data
    ------------------------------