Daily Usage Issues

NCrunch MCP use with Claude Code

Started by robmen on 29 views

I started experimenting with the headless NCrunch MCP server and Claude Code. I had some small successes and can see the promise of NCrunch as MCP, but it seems very unstable. It throws lots of exceptions in its console window and hangs and crashes often. I've tried to get some idea what causes the problems, but it feels mostly random at this moment.

Is Claude Code supported? If so, what information can I provide to help better understand why NCrunch MCP is hanging and crashing?

My latest example session:

NCrunch MCP HTTP listener started at http://localhost:11011/mcp
[NCrunch.Engine]
[NCrunch.Engine] NCrunch Console Tool v5.23.0.1
[NCrunch.Engine] Copyright c 2010-2026 Remco Software Ltd
[NCrunch.Engine] Usage of this tool is permitted only under the terms described in License.rtf
[NCrunch.Engine]
[NCrunch.Engine]
[NCrunch.Engine]
[NCrunch.Engine] This product is licensed to "My Company" (support/maintenance expires "next year sometime")
[NCrunch.Engine]
[NCrunch.Engine] [PID:8892 14:44:36.2668 Core-4] Console tool is using engine mode: Run all tests manually [Undetermined]
[NCrunch.Engine] [PID:8892 14:44:36.2668 Core-4] Beginning end-to-end run of solution using tools from platform 'MSBuild for VS2026'
[NCrunch.Engine] [PID:8892 14:44:37.9698 Core-4] NCrunch MCP IPC server is listening on NCrunch.MCP.8d2d9d6a6eda4d89beebd50ac15d798e
[NCrunch.Engine] [PID:8892 14:48:54.6888 ?-31] Pruning unused RDI snapshot at R:\RDIStorage\63f2daac-638e-404e-bf4c-b16681f3cff5 to free up 238268070 bytes
System.Exception: An exception was thrown in the remote environment: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> nCrunch.Common.UserException: Timed out while waiting for NCrunch engine work to complete. Last state: Running, tasks in progress: 1, unprocessed tasks: 17
   at nCrunch.Client.MCP.McpToolReflector.CallTool(Object controlSurface, String name, JObject arguments)
   at nCrunch.Client.MCP.McpIpcEndpoint.CallToolJson(String name, String argumentsJson)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at nCrunch.TaskRunner.Ipc.IpcMessageProcessor.processCallMethodMessage(CallMethodMessage callMethodMessage)
   at nCrunch.TaskRunner.Ipc.IpcMessageProcessor.ProcessMessageReturningResult(Byte[] data)
   at nCrunch.TaskRunner.Ipc.RemoteProxyCommunicator.readMessage(Byte[] returnedData)
   at nCrunch.TaskRunner.Ipc.RemoteProxyCommunicator.Invoke(String methodName, Object[] args)
   at nCrunch.Client.MCP.McpIpcEndpointProxy.CallToolJson(String name, String argumentsJson)
   at NCrunch.MCP.McpSessionHost.CallTool(String name, JObject arguments)
   at NCrunch.MCP.McpJsonRpcServer.HandleLine(String line)
[NCrunch.Engine] [PID:8892 14:50:33.8758 ?-1] MCP circular mode is keeping the console engine session alive
[NCrunch.Engine]
[NCrunch.Engine] NCrunch Console Tool v5.23.0.1
[NCrunch.Engine] Copyright c 2010-2026 Remco Software Ltd
[NCrunch.Engine] Usage of this tool is permitted only under the terms described in License.rtf
[NCrunch.Engine]
[NCrunch.Engine]
[NCrunch.Engine]
[NCrunch.Engine] This product is licensed to "My Company" (support/maintenance expires "next year sometime")
[NCrunch.Engine]
[NCrunch.Engine] [PID:62004 15:01:08.229 Core-4] Console tool is using engine mode: Run all tests manually [Undetermined]
[NCrunch.Engine] [PID:62004 15:01:08.229 Core-4] Beginning end-to-end run of solution using tools from platform 'MSBuild for VS2026'
[NCrunch.Engine] [PID:62004 15:01:09.433 Core-4] NCrunch MCP IPC server is listening on NCrunch.MCP.746ed90d28fe471087460610aca2a21e
[NCrunch.Engine] [PID:62004 15:05:06.245 ?-16] Pruning unused RDI snapshot at R:\RDIStorage\2a2dcda6-b379-4f73-b03f-61685ee3a2e1 to free up 1147086915 bytes
System.Exception: An exception was thrown in the remote environment: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> nCrunch.Common.UserException: Timed out while waiting for NCrunch engine work to complete. Last state: Running, tasks in progress: 1, unprocessed tasks: 4
   at nCrunch.Client.MCP.McpToolReflector.CallTool(Object controlSurface, String name, JObject arguments)
   at nCrunch.Client.MCP.McpIpcEndpoint.CallToolJson(String name, String argumentsJson)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at nCrunch.TaskRunner.Ipc.IpcMessageProcessor.processCallMethodMessage(CallMethodMessage callMethodMessage)
   at nCrunch.TaskRunner.Ipc.IpcMessageProcessor.ProcessMessageReturningResult(Byte[] data)
   at nCrunch.TaskRunner.Ipc.RemoteProxyCommunicator.readMessage(Byte[] returnedData)
   at nCrunch.TaskRunner.Ipc.RemoteProxyCommunicator.Invoke(String methodName, Object[] args)
   at nCrunch.Client.MCP.McpIpcEndpointProxy.CallToolJson(String name, String argumentsJson)
   at NCrunch.MCP.McpSessionHost.CallTool(String name, JObject arguments)
   at NCrunch.MCP.McpJsonRpcServer.HandleLine(String line)
[NCrunch.Engine] [PID:62004 15:06:36.198 ?-1] MCP circular mode is keeping the console engine session alive
System.Exception: An exception was thrown in the remote environment: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> nCrunch.Common.UserException: Timed out while waiting for NCrunch engine work to complete. Last state: Running, tasks in progress: 1, unprocessed tasks: 52
   at nCrunch.Client.MCP.McpToolReflector.CallTool(Object controlSurface, String name, JObject arguments)
   at nCrunch.Client.MCP.McpIpcEndpoint.CallToolJson(String name, String argumentsJson)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at nCrunch.TaskRunner.Ipc.IpcMessageProcessor.processCallMethodMessage(CallMethodMessage callMethodMessage)
   at nCrunch.TaskRunner.Ipc.IpcMessageProcessor.ProcessMessageReturningResult(Byte[] data)
   at nCrunch.TaskRunner.Ipc.RemoteProxyCommunicator.readMessage(Byte[] returnedData)
   at nCrunch.TaskRunner.Ipc.RemoteProxyCommunicator.Invoke(String methodName, Object[] args)
   at nCrunch.Client.MCP.McpIpcEndpointProxy.CallToolJson(String name, String argumentsJson)
   at NCrunch.MCP.McpSessionHost.CallTool(String name, JObject arguments)
   at NCrunch.MCP.McpJsonRpcServer.HandleLine(String line)
System.Exception: An exception was thrown in the remote environment: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> nCrunch.Common.UserException: Timed out while waiting for NCrunch engine work to complete. Last state: Running, tasks in progress: 1, unprocessed tasks: 13
   at nCrunch.Client.MCP.McpToolReflector.CallTool(Object controlSurface, String name, JObject arguments)
   at nCrunch.Client.MCP.McpIpcEndpoint.CallToolJson(String name, String argumentsJson)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at nCrunch.TaskRunner.Ipc.IpcMessageProcessor.processCallMethodMessage(CallMethodMessage callMethodMessage)
   at nCrunch.TaskRunner.Ipc.IpcMessageProcessor.ProcessMessageReturningResult(Byte[] data)
   at nCrunch.TaskRunner.Ipc.RemoteProxyCommunicator.readMessage(Byte[] returnedData)
   at nCrunch.TaskRunner.Ipc.RemoteProxyCommunicator.Invoke(String methodName, Object[] args)
   at nCrunch.Client.MCP.McpIpcEndpointProxy.CallToolJson(String name, String argumentsJson)
   at NCrunch.MCP.McpSessionHost.CallTool(String name, JObject arguments)
   at NCrunch.MCP.McpJsonRpcServer.HandleLine(String line)
Hi, thanks for sharing this issue.

Claude is supported, since it's a common interface, but there is no direct integration with Claude code. I haven't personally experimented with using the HTTP based MCP server with an IDE that doesn't have NCrunch installed - it's intended more for fully autonomous agents. As long as there isn't much interference from the open IDE, I suppose it could work quite well.

MCP development has been progressing quite a bit since the last posted release. 5.24 is due out in a few days with a ton of fixes for problems like this. Try the build below and see if it works any better for you.

NCrunch_Console_5.24.0.9.msi
NCrunch_Console_5.24.0.9.zip
NCrunch_GridNodeServer_5.24.0.9.msi
NCrunch_GridNodeServer_5.24.0.9.zip
NCrunch_LicenseServer_5.24.0.9.zip
NCrunch_Rider_5.24.0.9.7z
NCrunch_Rider_5.24.0.9.zip
NCrunch_VS2017_5.24.0.9.msi
NCrunch_VS2017_5.24.0.9.msi.7z
NCrunch_VS2017_5.24.0.9.zip
NCrunch_VS2019_5.24.0.9.msi
NCrunch_VS2019_5.24.0.9.msi.7z
NCrunch_VS2019_5.24.0.9.zip
NCrunch_VS2022_5.24.0.9.msi
NCrunch_VS2022_5.24.0.9.msi.7z
NCrunch_VS2022_5.24.0.9.zip
NCrunch_VS2026_5.24.0.9.msi
NCrunch_VS2026_5.24.0.9.msi.7z
NCrunch_VS2026_5.24.0.9.zip

Edited

Thanks. I tried upgrading to v5.24.0.9. The MCP server doesn't seem to crash as much, but there is a regression in the loading of some projects. It seems NCrunch won't find the `project.assets.json` where the `OutputName` differs from the `MSBuildProjectName`. Our build system also centralizes the intermediate (`obj`) and output (`bin`) folders to a common root build folder (with each project getting its own folder, of course).

So, while NCrunch looks here:
D:\src\productname\build\obj\Debug\stuff\<OutputName>\project.assets.json

...it's actually built here:
D:\src\productname\build\obj\Debug\stuff\<MSBuildProjectName>\project.assets.json

So both VS and CLI NCrunch seem broken in v5.24.0.9.
Sorry about this. A compatibility change in this area seems to have broken it for some use cases. Could you try the build below and let me know if this solves the problem for you?

NCrunch_Console_5.24.0.10.msi
NCrunch_Console_5.24.0.10.zip
NCrunch_GridNodeServer_5.24.0.10.msi
NCrunch_GridNodeServer_5.24.0.10.zip
NCrunch_LicenseServer_5.24.0.10.zip
NCrunch_Rider_5.24.0.10.7z
NCrunch_Rider_5.24.0.10.zip
NCrunch_VS2017_5.24.0.10.msi
NCrunch_VS2017_5.24.0.10.msi.7z
NCrunch_VS2017_5.24.0.10.zip
NCrunch_VS2019_5.24.0.10.msi
NCrunch_VS2019_5.24.0.10.msi.7z
NCrunch_VS2019_5.24.0.10.zip
NCrunch_VS2022_5.24.0.10.msi
NCrunch_VS2022_5.24.0.10.msi.7z
NCrunch_VS2022_5.24.0.10.zip
NCrunch_VS2026_5.24.0.10.msi
NCrunch_VS2026_5.24.0.10.msi.7z
NCrunch_VS2026_5.24.0.10.zip

Post a reply

Log in to reply.