microsoft / microsoft/Dataverse-MCP

keyChainServiceName null exception on macOS - tool crashes on startup

Open
#14 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
65
Forks
13
PR merge metrics
No merged PRs in 30d

Description

Environment

macOS 15 (Sequoia), Apple Silicon (arm64)
Tool version: microsoft.powerplatform.dataverse.mcp 0.2.310025
.NET runtimes installed: 8.0.24 and 10.0.2/10.0.3
MCP client: Claude AI (claude-ai 0.1.0)

Description
The Dataverse MCP tool crashes immediately on startup on macOS with the following unhandled exception:
Unhandled exception. System.ArgumentNullException: Value cannot be null. (Parameter 'keyChainServiceName')
at Microsoft.Identity.Client.Extensions.Msal.MacKeychainAccessor..ctor(String cacheFilePath, String keyChainServiceName, String keyChainAccountName, TraceSourceLogger logger)
at Microsoft.Identity.Client.Extensions.Msal.Storage.Create(StorageCreationProperties creationProperties, TraceSource logger)
at Microsoft.Identity.Client.Extensions.Msal.MsalCacheHelper.CreateAsync(StorageCreationProperties storageCreationProperties, TraceSource logger)
at PowerPlatformMCPProxy.Auth.AuthenticationService.GetMsalClient()
at PowerPlatformMCPProxy.Auth.AuthenticationService..ctor(...)
at PowerPlatformMCPProxy.Runtime.MCPServerProxy.RunAsync()

Steps to reproduce
Install the tool: dotnet tool install --global microsoft.powerplatform.dataverse.mcp
Configure MCP client with the following args:

json{
"command": "/Users/sami/.dotnet/tools/Microsoft.PowerPlatform.Dataverse.MCP",
"args": [
"--ConnectionUrl", "https://make.powerautomate.com/environments//connections?apiName=shared_commondataserviceforapps&connectionName=",
"--MCPServerName", "DataverseMCPServer",
"--TenantId", "",
"--EnableHttpLogging", "true",
"--EnableMsalLogging", "false",
"--Debug", "false",
"--BackendProtocol", "HTTP"
]
}

Connect — tool crashes immediately after receiving the initialize message from the client.

Attempted workarounds

Added --KeychainServiceName DataverseMCPServer as an extra arg — the value appears in the args list at runtime but the crash still occurs, meaning the parameter is not being passed through to the MSAL StorageCreationProperties internally.
Reinstalled the tool — same result.
Verified .NET 8 runtime is installed — same result.

Expected behavior
Tool should use the provided MCPServerName (or a separate KeychainServiceName arg) as the keyChainServiceName when initializing MacKeychainAccessor on macOS.
Actual behavior
Tool passes null as keyChainServiceName to MacKeychainAccessor, causing an immediate crash. The tool is completely non-functional on macOS.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at PowerPlatformMCPProxy.Auth.AuthenticationService.GetMsalClient and trace how StorageCreationProperties is built before Microsoft.Identity.Client.Extensions.Msal.Storage.Create. Reproduce startup on macOS with the provided arguments, then verify that a keychain service name reaches MacKeychainAccessor and the MCP tool completes initialization without the null exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos
Domain
authentication
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.