Nodinite MCP Endpoint External Access
Section titled “ Nodinite MCP Endpoint External Access”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
What Is the Nodinite MCP Endpoint?
Section titled “ What Is the Nodinite MCP Endpoint?”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
--stdiomode 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.
Authentication Model
Section titled “ 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:
- Client calls
/mcp. - Server returns
401and points to/.well-known/oauth-protected-resource. - Client reads authorization server and scope metadata.
- User signs in.
- 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.
Windows Authentication Environments
Section titled “ Windows Authentication Environments”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
401withWWW-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 justuser. 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.

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.
[Security.Principal.WindowsIdentity]::GetCurrent().Nameshows the caller, hereDEV\Administrator.$bodyholds thetools/listcall and$mcpthe endpoint URL.Invoke-WebRequest $mcp -Method Post -Body $body … -SkipHttpErrorCheckwithout credentials returns Status: 401 WWW-Authenticate: Negotiate.- The same call with
-UseDefaultCredentials, on an endpoint whoseAllowedUserslists only another account, returns Status: 403 WWW-Authenticate: (none): the Windows sign-in succeeded, but the caller isn't allowed. - Against an endpoint whose
AllowedUserslistsDEV\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:
- Run the NuGet package over stdio (recommended). VS Code starts
Nodinite.Core.McpServerwithdnxand--stdioon 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 themcp.json. - 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.
Understanding External Access Flow
Section titled “ Understanding External Access Flow”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.
Step 1 - Choose One Canonical URL
Section titled “ Step 1 - Choose One Canonical URL”Pick one exact public URL and use it everywhere, for example https://mcp.example.com:44005/mcp.
Use the same URL in these locations:
- IIS binding (host name, port, certificate)
Mcp:ResourceUrlin MCP serverappsettings.json- Web Client
Servicesconfiguration when AI Assistant MCP tools are used - Every MCP client configuration
External Access Requirements
Section titled “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.
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.
Create the application
Section titled “Create the application”- Open App registrations and create a single-tenant app.
- Record Application (client) ID as
<mcp-api-app-id>. - Record Directory (tenant) ID as
<tenant-id>.
Expose API scopes
Section titled “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, 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
Section titled “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:
aebc6443-996d-45c2-90f0-388ff96faa56Select 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
Section titled “Set token version”In the Entra app manifest, set requestedAccessTokenVersion to 2.
Step 3 - Configure the MCP Server
Section titled “ Step 3 - Configure the MCP Server”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>/" }}Why each value matters
Section titled “Why each value matters”identity-provider-discovery-endpointenables OAuth mode at startupResourceUrlmust match the exact canonical client-facing URLAudiencesshould include both GUID andapi://formsScopePrefixensures clients request Entra-qualified MCP scopesRequireHttpsMetadatamakes the server fetch the identity provider's metadata over HTTPS only; always set it totrueexplicitlyResourceUrland at least oneAudiencesvalue 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:
- Open the Web Client app registration in Entra ID.
- Add delegated permissions for the MCP API (
mcp:*scopes). - 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.
Step 5 - Connect from Visual Studio Code
Section titled “ Step 5 - Connect from Visual Studio Code”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:
- Start the server from the
mcp.jsonCodeLens, or from MCP: List Servers. - VS Code asks whether the server definition
nodinitemay authenticate tologin.microsoftonline.com. Select Allow, and sign in to Microsoft in the browser. With the VS Code client pre-authorized, there is no consent screen. - 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. - 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
Section titled “Quick Validation Prompt”Use a direct verification prompt:
List my Nodinite monitor views.
Verifying a Deployment
Section titled “ Verifying a Deployment”From a client machine:
curl https://mcp.example.com:44005/.well-known/oauth-protected-resourceExpected response should include:
resourcewith the exact canonical endpoint URLauthorization_serverspointing to your Entra tenantscopes_supportedlisting the five read scopes, with theapi://<mcp-api-app-id>/prefix
Troubleshooting
Section titled “ 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 |
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 |
Security Recommendations
Section titled “ 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.