---
title: MCP Endpoint External Access - Setup and Connection Guide
description: Set up secure external access to the Nodinite MCP Endpoint with Microsoft Entra ID and OAuth. Learn canonical URL rules, app registration, server and Web Client configuration, VS Code connection, verification checks, troubleshooting patterns, and security recommendations.
---

# <i class="fal fa-network-wired" aria-hidden="true"></i> Nodinite MCP Endpoint External Access

This guide explains how to expose the <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> [MCP Endpoint][MCP Endpoint Hosting] for remote MCP clients with a secure, standards-aligned OAuth flow. It targets administrators who need reliable external connectivity from Visual Studio Code and similar MCP-capable tools.

* <i class="fal fa-check" aria-hidden="true"></i> Use one canonical URL across [IIS][], MCP settings, [Web Client][] settings, and MCP clients
* <i class="fal fa-check" aria-hidden="true"></i> Use OAuth 2.0 and JWT Bearer for remote MCP clients
* <i class="fal fa-check" aria-hidden="true"></i> Keep database access server-side so clients only present OAuth tokens
* <i class="fal fa-check" aria-hidden="true"></i> Validate deployment quickly with deterministic metadata checks

## <i class="fal fa-circle-info" aria-hidden="true"></i> What Is the Nodinite MCP Endpoint?

The <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> MCP Server exposes repository, monitoring, and documentation data through the open **Model Context Protocol (MCP)** so AI clients can query live environment data. Most tools read; write and delete tools need their own scopes.

* Transport is **Streamable HTTP** at `/mcp`.
* The server is the **MCP Server** [Core Service][Core Services], an ASP.NET Core site in IIS with its own port; its port, identity, and TLS are set in the Nodinite Portal, see [MCP Endpoint in Core Services][MCP Endpoint Hosting].
* Clients receive OAuth tokens, not database connection strings.
* A `--stdio` mode runs the same server as a NuGet package on the user's own machine. It is also the way to use VS Code when the environment uses Windows authentication (see [Windows Authentication Environments](#windows-authentication)). This page focuses on external HTTP access.

## <i class="fal fa-user-shield" aria-hidden="true"></i> Authentication Model

At startup, the server chooses exactly one authentication mode:

| Mode | When it is used | Suitable for |
| --- | --- | --- |
| OAuth 2.0 / JWT Bearer | Identity provider discovery endpoint is configured | Remote MCP clients such as Visual Studio Code and AI assistants |
| Windows (Negotiate) | No identity provider configured | Same-domain callers listed in `Authentication:AllowedUsers`, such as the Web Client's application pool account for the [AI Assistant][]. A signed-in caller who isn't in the list gets `403`, and an empty list denies everyone. Not usable from VS Code |
| None | `--stdio` | The NuGet package on the user's machine: local use, and VS Code in Windows-authentication environments. No authorization |

Remote MCP clients follow standard MCP discovery:

1. Client calls `/mcp`.
2. Server returns `401` and points to `/.well-known/oauth-protected-resource`.
3. Client reads authorization server and scope metadata.
4. User signs in.
5. Client retries with a Bearer token.

Windows authentication does not satisfy this MCP OAuth handshake. In Windows mode the server publishes no `/.well-known/oauth-protected-resource` metadata, and VS Code's MCP client can't answer a `Negotiate` challenge, so VS Code can't connect. Use OAuth mode for external access, or the NuGet package where the environment uses Windows authentication.

<h3 id="windows-authentication"><i class="fal fa-windows" aria-hidden="true"></i> Windows Authentication Environments</h3>

Without an identity provider, the IIS-hosted endpoint runs in Windows mode. Only the Windows users in `Authentication:AllowedUsers` get in:

* **Without credentials**, the endpoint answers `401` with `WWW-Authenticate: Negotiate`. It publishes no OAuth metadata in this mode.
* **Signed in, but not in the list**: `403`, with no new challenge. The MCP Endpoint logs *Access denied for user DOMAIN\user — not in AllowedUsers list*.
* **An empty list** denies everyone, including authenticated Windows users.
* **Entries** may be `DOMAIN\user`, `.\user`, or just `user`. The last two match the user name part, in any case.
* **The [AI Assistant][]** calls the endpoint as the [Web Client][]'s application pool account, so that account must be in the list.

![PowerShell 7 calling the MCP Endpoint without credentials (401), as a Windows user who isn't in AllowedUsers (403), and as one who is (200, 180 tools), animated walkthrough (7.12)][1]  
*Animated walkthrough: the same `tools/list` call from PowerShell 7 against Windows-mode endpoints, without credentials, by a user who isn't in `AllowedUsers`, and by one who is.*  

1. `[Security.Principal.WindowsIdentity]::GetCurrent().Name` shows the caller, here `DEV\Administrator`. `$body` holds the `tools/list` call and `$mcp` the endpoint URL.
2. `Invoke-WebRequest $mcp -Method Post -Body $body … -SkipHttpErrorCheck` without credentials returns *Status: 401   WWW-Authenticate: Negotiate*.
3. The same call with `-UseDefaultCredentials`, on an endpoint whose `AllowedUsers` lists only another account, returns *Status: 403   WWW-Authenticate: (none)*: the Windows sign-in succeeded, but the caller isn't allowed.
4. Against an endpoint whose `AllowedUsers` lists `DEV\Administrator`, the same call returns *Status: 200* and 180 tools.

The commands use `-SkipCertificateCheck` because the test endpoints have a development certificate; leave it out with a trusted certificate. In Windows PowerShell 5.1, leave out `-SkipHttpErrorCheck` and read the status from the exception.

VS Code can't use Windows mode. You have two options:

1. **Run the NuGet package over stdio** (recommended). VS Code starts `Nodinite.Core.McpServer` with `dnx` and `--stdio` on the user's machine. It needs the .NET 10 SDK, a plain-text connection string to the [Configuration Database][ConfigDB], and SQL rights for the user's account. It has no authorization, and the BizTalk tools aren't available. See [Set up AI Assistant and MCP Endpoint][Getting Started Track 3] for the `mcp.json`.
2. **Switch the environment to OAuth mode** with an OpenID Connect provider. This page describes Microsoft Entra ID. The server accepts other OpenID Connect providers too, but VS Code then needs the provider to support MCP client registration; that path isn't tested.

| | IIS endpoint, OAuth | IIS endpoint, Windows | NuGet package, stdio |
| --- | --- | --- | --- |
| Works from VS Code | ✅ | ❌ | ✅ |
| Reaches SQL as | The MCP Server's application pool account | The MCP Server's application pool account | The user, or the login in the connection string |
| Limits the tools | OAuth scopes | Nothing beyond `AllowedUsers` | Nothing |
| Audit user | The token's user name claim | `DOMAIN\user` | `mcp-server` |

A C4 diagram assistance suggestion that a client suppresses through an MCP tool is recorded as `mcp-server` in every mode, not as the caller.

The MCP Endpoint doesn't check <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> Roles in any mode.

## <i class="fal fa-diagram-project" aria-hidden="true"></i> Understanding External Access Flow

<div class="mermaid">
graph LR
  Client["fa:fa-laptop-code MCP client"] --> Endpoint["fa:fa-plug https://mcp.example.com:44005/mcp"]
  Endpoint --> Metadata["fa:fa-file-lines /.well-known/oauth-protected-resource"]
  Metadata --> Entra["fab:fa-microsoft Microsoft Entra ID"]
  Entra --> Token["fa:fa-key OAuth Bearer token"]
  Token --> Endpoint
  Endpoint --> Data["fa:fa-database Nodinite repository and monitoring data"]
</div>

*Diagram: External MCP clients discover OAuth metadata, authenticate against Microsoft Entra ID, and then call the canonical MCP endpoint with Bearer tokens to query <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> data safely over HTTPS.*

<h2 id="fa-link-step-1---choose-one-canonical-url"><i class="fal fa-link" aria-hidden="true"></i> Step 1 - Choose One Canonical URL</h2>

Pick one exact public URL and use it everywhere, for example `https://mcp.example.com:44005/mcp`.

Use the same URL in these locations:

1. IIS binding (host name, port, certificate)
2. `Mcp:ResourceUrl` in MCP server `appsettings.json`
3. Web Client `Services` configuration when AI Assistant MCP tools are used
4. Every MCP client configuration

<aside aria-label="Warning" class="nodinite-note nodinite-note--warning">
<p class="nodinite-note__label" aria-hidden="true"><i class="far fa-fw fa-triangle-exclamation"></i> Warning</p>
<div class="nodinite-note__content"><p>MCP clients validate the advertised <code>resource</code> value against the actual connection URL. Any mismatch in scheme, host, or port can make a standards-compliant client reject the server.</p></div>
</aside>

### External Access Requirements

* DNS name resolves from every client location
* Publicly trusted TLS certificate for the chosen name
* Chosen port open on server firewall, cloud NSG/security group, and client-side egress path
* If a proxy/CDN fronts DNS, ensure the selected port is actually forwarded

Every port and host involved, including Microsoft Entra ID and the Configuration Database, is listed per hop in the [MCP Endpoint firewall prerequisites][MCP Firewall].

<h2 id="fab-fa-microsoft-step-2---register-the-mcp-api-in-microsoft-entra-id"><i class="fab fa-microsoft" aria-hidden="true"></i> Step 2 - Register the MCP API in Microsoft Entra ID</h2>

Create one app registration for the MCP API, for example `nodinite-mcp-server`.

### Create the application

1. Open **App registrations** and create a single-tenant app.
2. Record **Application (client) ID** as `<mcp-api-app-id>`.
3. Record **Directory (tenant) ID** as `<tenant-id>`.

### Expose API scopes

Set Application ID URI to `api://<mcp-api-app-id>` and add delegated scopes:

| Scope | Grants access to |
| --- | --- |
| `mcp:repository.read` | [Systems][], [Services][], [Endpoints][], [Message Types][], [Contracts][], [Custom Fields][], [Custom Metadata][], [Articles][], [Domains][], [BPMs][BPM], [Resources][], [Categories][], [Applications][] |
| `mcp:integrations.read` | [Integrations][] |
| `mcp:monitorviews.read` | [Monitor Views][] |
| `mcp:monitoragents.read` | Sources ([Monitoring Agents][]) |
| `mcp:logviews.read` | [Log Views][] |
| `mcp:repository.write` | The write tools in [Repository Tools][] |
| `mcp:repository.delete` | The delete tools in [Repository Tools][] |
| `mcp:c4diagrams.create` | Creating [C4 Diagrams][] |
| `mcp:c4diagrams.modify` | Changing [C4 Diagrams][] |

The five read scopes are the minimum. A client that calls a write tool without its scope gets `403 insufficient_scope`, and VS Code signs in again to ask for that scope (step-up). Expose the write scopes, and pre-authorize them below, only for the clients that should write.

### Pre-authorize clients when possible

Add authorized client applications for MCP clients you want to connect without consent prompts.

For Visual Studio Code, add the published client ID:

```text
aebc6443-996d-45c2-90f0-388ff96faa56
```

Select every `mcp:*` scope the client should use: the five read scopes at least, and the write scopes only where writing is allowed. Pre-authorizing only removes the consent prompt.

### Set token version

In the Entra app manifest, set `requestedAccessTokenVersion` to `2`.

## <i class="fal fa-gear" aria-hidden="true"></i> Step 3 - Configure the MCP Server

Configure the MCP server `appsettings.json` and recycle the site after updates.

```json
{
  "services": {
    "identity-provider-discovery-endpoint": {
      "http": {
        "0": "https://login.microsoftonline.com/<tenant-id>/v2.0/.well-known/openid-configuration"
      }
    }
  },
  "Mcp": {
    "ResourceUrl": "https://mcp.example.com:44005/mcp"
  },
  "Authentication": {
    "RequireHttpsMetadata": true,
    "Audiences": [
      "<mcp-api-app-id>",
      "api://<mcp-api-app-id>"
    ],
    "ScopePrefix": "api://<mcp-api-app-id>/"
  }
}
```

### Why each value matters

* `identity-provider-discovery-endpoint` enables OAuth mode at startup
* `ResourceUrl` must match the exact canonical client-facing URL
* `Audiences` should include both GUID and `api://` forms
* `ScopePrefix` ensures clients request Entra-qualified MCP scopes
* `RequireHttpsMetadata` makes the server fetch the identity provider's metadata over HTTPS only; always set it to `true` explicitly
* `ResourceUrl` and at least one `Audiences` value are required in OAuth mode; without them, the server doesn't start

<h2 id="fa-globe-step-4---connect-the-web-client-ai-assistant-optional"><i class="fal fa-globe" aria-hidden="true"></i> Step 4 - Connect the Web Client AI Assistant (Optional)</h2>

The Web Client can consume the same MCP endpoint server-to-server through its own app registration `<webclient-app-id>`.

Because this flow is non-interactive, grant consent in advance:

1. Open the Web Client app registration in Entra ID.
2. Add delegated permissions for the MCP API (`mcp:*` scopes).
3. Grant admin consent for the tenant.

If this consent is missing, the assistant may show no tools and diagnostics can include `AADSTS65001`.

Point the Web Client at the MCP Endpoint in its `appsettings.json`:

```json
"Services": {
  "nodinite-mcpserver": {
    "http": {
      "0": "https://mcp.example.com:44005"
    }
  }
}
```

Use the canonical base URL (without `/mcp`) in `Services`.

Then set the scope the assistant requests: open **Administration** > **Settings** > [System Parameters][], click the **AI** row to open **AI Settings**, enter `api://<mcp-api-app-id>/.default` in **MCP server scope** on the **Language model** card, and save. The value is stored in the [AI System Parameter][] (`Config.McpServerScope`); the Web Client doesn't read a scope from `appsettings.json`. On an upgraded installation, the [one-time import][AI System Parameter - Upgrading] copies an old `Mcp:McpServerScope` across, but only together with `Mcp:Provider` and `Mcp:Model`.

## <i class="fab fa-microsoft" aria-hidden="true"></i> Step 5 - Connect from Visual Studio Code

Add the server in user or workspace MCP configuration:

```json
{
  "servers": {
    "nodinite": {
      "type": "http",
      "url": "https://mcp.example.com:44005/mcp"
    }
  }
}
```

The `url` must equal `Mcp:ResourceUrl` exactly: scheme, host, port, and `/mcp`. No headers, client ID, or secrets are needed. Then:

1. Start the server from the `mcp.json` CodeLens, or from **MCP: List Servers**.
2. VS Code asks whether the server definition `nodinite` may authenticate to `login.microsoftonline.com`. Select **Allow**, and sign in to Microsoft in the browser. With the VS Code client pre-authorized, there is no consent screen.
3. The server shows as **Running**, and its tools appear in Chat → **Configure Tools** under `nodinite`, grouped by tool group. VS Code enables at most 128 tools at a time, so tick the groups you need; see [Choose Your Tools][MCP Choose Tools].
4. The first call to a write tool, for example `create_article`, without its scope brings a new sign-in or consent prompt for that scope.

### Quick Validation Prompt

Use a direct verification prompt:

* `List my Nodinite monitor views.`

## <i class="fal fa-stethoscope" aria-hidden="true"></i> Verifying a Deployment

From a client machine:

```bash
curl https://mcp.example.com:44005/.well-known/oauth-protected-resource
```

Expected response should include:

* `resource` with the exact canonical endpoint URL
* `authorization_servers` pointing to your Entra tenant
* `scopes_supported` listing the five read scopes, with the `api://<mcp-api-app-id>/` prefix

## <i class="fal fa-triangle-exclamation" aria-hidden="true"></i> Troubleshooting

| Symptom | Most likely cause | Recommended fix |
| --- | --- | --- |
| `AADSTS65001` and assistant shows no tools | [Web Client][] app consent missing | Add delegated `mcp:*` API permissions and grant admin consent |
| Sign-in works, tools return `401` | Token `aud` does not match [configured audiences](#why-each-value-matters) | Include both audience forms in `Authentication:Audiences` |
| VS Code loops sign-in or refuses server | `resource` mismatch against client URL | Align `Mcp:ResourceUrl` with the [canonical URL](#fa-link-step-1---choose-one-canonical-url) and recycle |
| Scope-related Entra error mentions Graph | `ScopePrefix` missing or empty | Set `ScopePrefix` to `api://<mcp-api-app-id>/` |
| [IIS][] returns `500.30` on startup | Invalid startup config or malformed JSON | Validate `appsettings.json` and inspect application event log |
| Immediate connection reset | URL scheme/host does not match [IIS][] binding | Use canonical URL and verify binding configuration |
| Client timeout | [Firewall][MCP Firewall] or network path blocks MCP port | Validate port path across server, cloud, and client egress |
| DNS resolves incorrectly on some machines | Hosts file or local DNS override | Correct local override and re-test |
| Works in one MCP client but not another | [Pre-authorization](#pre-authorize-clients-when-possible) is per client ID | Add that client ID or grant consent specifically |

## <i class="fal fa-shield-halved" aria-hidden="true"></i> Security Recommendations

* Always use HTTPS with trusted certificates because clients send Bearer tokens on each call.
* Restrict inbound source IP ranges where operationally possible.
* Keep OAuth scopes least-privilege and map access to required tool groups.
* Treat LLM-provider keys as secrets and rotate if they appear in logs or chat text.

## <i class="fal fa-hand-point-right" aria-hidden="true"></i> Next Steps

* <i class="fal fa-plug" aria-hidden="true"></i> [MCP Endpoint][]  
* <i class="fal fa-list-check" aria-hidden="true"></i> [Set up AI Assistant and MCP Endpoint][]  
* <i class="fal fa-book" aria-hidden="true"></i> [MCP Tool Reference][]  

## <i class="fal fa-link-horizontal" aria-hidden="true"></i> Related Topics

* <i class="fal fa-robot" aria-hidden="true"></i> [AI Overview][]  
* <i class="fal fa-robot" aria-hidden="true"></i> [AI Assistant][]  
* <i class="fal fa-server" aria-hidden="true"></i> [BizTalk and MCP Endpoint][]  
* <i class="fal fa-globe" aria-hidden="true"></i> [Web Client][]  
* <i class="fal fa-key" aria-hidden="true"></i> [AI System Parameter][]  
* <i class="fal fa-box-full" aria-hidden="true"></i> [MCP Endpoint in Core Services – hosting, ports, and Portal settings][MCP Endpoint Hosting]  
* <i class="fal fa-wrench" aria-hidden="true"></i> [MCP Endpoint Troubleshooting][]  
* <i class="fal fa-shield-check" aria-hidden="true"></i> [MCP Endpoint firewall prerequisites][MCP Firewall]  
* <i class="fal fa-gear" aria-hidden="true"></i> [Portal MCP Server settings (Install Nodinite v7 - OpenID)][OpenID MCP Server]  

[1]:https://docs.nodinite.com/media/Documentation%20Pictures/IM/AI/MCP_AllowedUsersRefused.gif

[AI Assistant]:https://docs.nodinite.com/ai/ai-assistant/
[AI Overview]:https://docs.nodinite.com/ai/overview/
[AI System Parameter]:https://docs.nodinite.com/administration/settings/system-parameters/ai/
[AI System Parameter - Upgrading]:https://docs.nodinite.com/administration/settings/system-parameters/ai/#upgrading
[Applications]:https://docs.nodinite.com/administration/monitor-management/applications/features/what-is-an-application/
[Articles]:https://docs.nodinite.com/repository-model/knowledge-base-articles/overview/
[BizTalk and MCP Endpoint]:https://docs.nodinite.com/ai/biztalk-and-mcp-endpoint/
[BPM]:https://docs.nodinite.com/repository-model/bpms/overview/
[C4 Diagrams]:https://docs.nodinite.com/repository-model/c4-diagrams/overview/
[Categories]:https://docs.nodinite.com/administration/monitor-management/categories/features/what-is-a-category/
[ConfigDB]:https://docs.nodinite.com/core-services/configuration-database/overview/
[Contracts]:https://docs.nodinite.com/getting-started/repository/contracts/overview/
[Core Services]:https://docs.nodinite.com/core-services/overview/
[Custom Fields]:https://docs.nodinite.com/repository-model/custom-fields/overview/
[Custom Metadata]:https://docs.nodinite.com/repository-model/custom-metadata/overview/
[Domains]:https://docs.nodinite.com/repository-model/domains/overview/
[Endpoints]:https://docs.nodinite.com/repository-model/endpoints/overview/
[Getting Started Track 3]:https://docs.nodinite.com/ai/getting-started/#track-3
[IIS]:https://docs.nodinite.com/install-and-update/troubleshooting/iis/iis-authentication-settings/
[Integrations]:https://docs.nodinite.com/repository-model/integrations/overview/
[Log Views]:https://docs.nodinite.com/administration/log-management/log-views/features/what-is-a-log-view/
[MCP Choose Tools]:https://docs.nodinite.com/ai/mcp-endpoint/#choose-tools
[MCP Endpoint]:https://docs.nodinite.com/ai/mcp-endpoint/
[MCP Endpoint Hosting]:https://docs.nodinite.com/core-services/mcp-endpoint/overview/
[MCP Endpoint Troubleshooting]:https://docs.nodinite.com/core-services/mcp-endpoint/troubleshooting/overview/
[MCP Firewall]:https://docs.nodinite.com/core-services/mcp-endpoint/getting-started/prerequisites/#fa-shield-check-firewall-and-access-planning
[MCP Tool Reference]:https://docs.nodinite.com/ai/mcp-tool-reference/
[Message Types]:https://docs.nodinite.com/repository-model/message-types/overview/
[Monitor Views]:https://docs.nodinite.com/administration/monitor-management/monitor-views/features/what-is-a-monitor-view/
[Monitoring Agents]:https://docs.nodinite.com/administration/monitor-management/monitor-agents/features/what-is-a-monitor-agent/
[OpenID MCP Server]:https://docs.nodinite.com/install-and-update/getting-started/version-7/install-nodinite-v7-openid/#mcp-server-settings
[Repository Tools]:https://docs.nodinite.com/ai/mcp-tool-reference/repository-tools/
[Resources]:https://docs.nodinite.com/administration/monitor-management/resources/features/what-is-a-resource/
[Services]:https://docs.nodinite.com/repository-model/services/overview/
[Set up AI Assistant and MCP Endpoint]:https://docs.nodinite.com/ai/getting-started/
[System Parameters]:https://docs.nodinite.com/administration/settings/system-parameters/overview/
[Systems]:https://docs.nodinite.com/repository-model/systems/overview/
[Web Client]:https://docs.nodinite.com/getting-started/overview/