Skip to content
Documentation
Updated 11 minutes to read
Markdown

This guide explains how to expose the Nodinite MCP Endpoint 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.

  • Use one canonical URL across IIS, MCP settings, Web Client settings, and MCP clients
  • Use OAuth 2.0 and JWT Bearer for remote MCP clients
  • Keep database access server-side so clients only present OAuth tokens
  • Validate deployment quickly with deterministic metadata checks

The Nodinite 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, 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.
  • 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). This page focuses on external HTTP access.

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.

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)
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, 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 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 Nodinite Roles in any mode.

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"]

Diagram: External MCP clients discover OAuth metadata, authenticate against Microsoft Entra ID, and then call the canonical MCP endpoint with Bearer tokens to query Nodinite data safely over HTTPS.

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
  • 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.

Step 2 - Register the MCP API in Microsoft Entra ID

Section titled “ Step 2 - Register the MCP API in Microsoft Entra ID”

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

  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>.

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, 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.

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

For Visual Studio Code, add the published client ID:

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.

In the Entra app manifest, set requestedAccessTokenVersion to 2.

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

{
"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>/"
}
}
  • 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

Step 4 - Connect the Web Client AI Assistant (Optional)

Section titled “ Step 4 - Connect the Web Client AI Assistant (Optional)”

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:

"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 copies an old Mcp:McpServerScope across, but only together with Mcp:Provider and Mcp:Model.

Add the server in user or workspace MCP configuration:

{
"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.
  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.

Use a direct verification prompt:

  • List my Nodinite monitor views.

From a client machine:

Terminal window
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
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 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 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 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 is per client ID Add that client ID or grant consent specifically
  • 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.

...

Version:
Release date: N/A
Loading...

Explore Nodinite for 30 days – completely free

  • Find out why this is the leading O&M software
  • Prove your business case
  • Test the self-service for the business side

Loading...

See how Nodinite resolves your technical issues, in a LIVE Demo!

Once you submit this request:

  • We will give you a short call to understand the issues you want to tackle.
  • Understand solutions you have tried and why were you not happy with them.
  • Book a convenient slot for a LIVE demo!

Loading...