---
title: "Create a local MCP server to connect to Nucleus REST APIs"
slug: "create-a-local-mcp-server-to-connect-to-nucleus-rest-apis"
updated: 2025-07-15T19:12:28Z
published: 2025-07-15T19:12:28Z
canonical: "help.nucleussec.com/create-a-local-mcp-server-to-connect-to-nucleus-rest-apis"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://help.nucleussec.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a local MCP server to connect to Nucleus REST APIs

As AI technology rapidly advances, Nucleus is dedicated to staying current with the latest developments. One technology that has created buzz in the tech and security communities recently is MCP (Model Context Protocol), a means of connecting AI tooling to various products and platforms.

We recently experimented with setting up a local MCP server to access Nucleus REST APIs to instantly unlock AI-driven interaction with Nucleus platform data. This article walks you through how we did it, and is intended to showcase just one way of connecting a local MCP server with Nucleus, with some discussion of other ways that similar integrations could be created.

For a deeper discussion of use cases and benefits this type of integration may lead to, please see our companion blog post on this topic (coming soon).

## Description of project

This project connects three main components: A desktop AI client, an MCP proxy built to connect to REST APIs, and the Nucleus API itself. When completed, the AI client and MCP components are locally hosted by the user, and remote connections are made to Nucleus’ REST API. From Nucleus’ perspective, the calls are no different from ordinary REST API calls coming from any remote client — what makes this project interesting is the interaction between the data as provided by Nucleus and the AI processing capability taking place on the user’s machine.

![](https://cdn.document360.io/3888970a-6501-459e-acc9-c47b71c6d64c/Images/Documentation/image(493).png)

> **A quick note about security:** This project requires integration of a Nucleus API key with an external service. Customers should exercise ordinary precautions when making use of API keys.

## How we did it

### Step 1: Gather the necessary materials

#### A Nucleus API key

We used an API key with access to a test project with example data on our dev server. You can find instructions on how to get this [here](/v1/docs/api-access).

#### The MCP server

We used [this open source project](https://github.com/matthewhand/mcp-openapi-proxy) for our experiment, but there are loads of other options available. Specifically, we chose this project because it was easy to work with and allowed us to create a direct connection to REST APIs utilizing our existing swagger specification.

#### An AI client

We tried this out with Augment in VS Code and with [Claude Desktop](https://claude.ai/download) for Windows. Both platforms were pretty straightforward to integrate with, and have varying tradeoffs with respect to licensing and interactivity. The most important consideration is whether the AI tool supports local MCP server implementation. As of the writing of this article, some of the most popular platforms like ChatGPT do not.

### Step 2: Prepare the environment

The MCP server project we’re using utilizes uv, a fast, modern Python package and project manager, developed in Rust, aiming to be a drop-in replacement for pip and pip-tools.

An installation command could look like:

Windows

```plaintext
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
```

Mac

```plaintext
/bin/bash -c "$(curl -fsSL https://astral.sh/uv/install.sh)"
```

> [!WARNING]
> Note
> 
> These commands download and run a script from a remote source. If you choose to use them, we recommend reviewing the script prior to execution in environments with strict security requirements

### Step 3: Connect the AI client to the MCP server

Both AI clients we experimented with used a JSON config file to instruct the client tool in configuring the MCP server. Ours looked like this:

```plaintext
{
  "mcpServers": {
    "NucleusDev": {
      "command": "uvx",
      "args": [
        "mcp-openapi-proxy"
      ],
      "env": {
        "OPENAPI_SPEC_URL": "<NUCLEUS DEV INSTANCE YAML FILE URL>",
        "OPENAPI_SPEC_FORMAT": "yaml",
        "SERVER_URL_OVERRIDE": "<NUCLEUS DEV API URL>",
        "TOOL_NAME_MAX_LENGTH": "200",
        "EXTRA_HEADERS": "x-apikey: <OUR API KEY>"
      }
    }
  }
}
```

Getting the Yaml spec URL requires navigating to the API docs for a Nucleus instance and clicking the swagger.yaml link

![](https://cdn.document360.io/3888970a-6501-459e-acc9-c47b71c6d64c/Images/Documentation/image(492).png)

The Nucleus API URL format is `https://[instance-name].nucleussec.com/nucleus/api`

In Claude Desktop, the config file is placed by navigating to Hamburger menu > Settings > Developer and following the on screen instructions. We noticed we had to close and reopen the program for the changes to take effect.

### Step 4: Validate the connection and run some prompts

In Claude Desktop, users can see available integrations in the Search and Tools menu in chat. The clearest way we validated that a connection was working was to ask. “Are you connected to Nucleus” generates a positive response when the server connection to Nucleus APIs is working correctly.

![](https://cdn.document360.io/3888970a-6501-459e-acc9-c47b71c6d64c/Images/Documentation/MCP Demo - Test Connection.gif)

## Use cases

There are a number of exciting possibilities enabled by this project, from data analysis to project configuration, and more. Our in-depth blog post on the topic (coming soon) describes some of these in greater detail.

## What’s next

We look forward to sharing additional Labs projects related to the development and testing of new AI features with Nucleus. Look out for additional use case information, recommended prompts, experiments with different AI models, and additional MCP server configurations (including remote MCP server deployments) in the near future!
