🚨 INSECURE MODE: Nucleus is running unprivileged.
    The Watchdog can be terminated by local agents (UID collision).
    For active defense, install via `sudo scripts/install_nucleus_daemon.sh`
[Nucleus] 🚨 INSECURE MODE: Running unprivileged. Watchdog can be killed.
[Nucleus] 👁️  Watchdog active: /Users/lokeshgarg/ai-mvp-backend


╭──────────────────────────────────────────────────────────────────────────────╮
│                                                                              │
│                         ▄▀▀ ▄▀█ █▀▀ ▀█▀ █▀▄▀█ █▀▀ █▀█                        │
│                         █▀  █▀█ ▄▄█  █  █ ▀ █ █▄▄ █▀▀                        │
│                                                                              │
│                                FastMCP 2.14.1                                │
│                                                                              │
│                                                                              │
│                    🖥  Server name: Nucleus Brain                             │
│                                                                              │
│                    📦 Transport:   STDIO                                     │
│                                                                              │
│                    📚 Docs:        https://gofastmcp.com                     │
│                    🚀 Hosting:     https://fastmcp.cloud                     │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯


{"jsonrpc":"2.0","id":1,"result":{"protocolVersion":"2024-11-05","capabilities":{"experimental":{"tasks":{"list":{},"cancel":{},"requests":{"tools":{"call":{}},"prompts":{"get":{}},"resources":{"read":{}}}}},"prompts":{"listChanged":false},"resources":{"subscribe":false,"listChanged":false},"tools":{"listChanged":true}},"serverInfo":{"name":"Nucleus Brain","version":"2.14.1"}}}
  + Exception Group Traceback (most recent call last):
  |   File "<frozen runpy>", line 198, in _run_module_as_main
  |   File "<frozen runpy>", line 88, in _run_code
  |   File "/Users/lokeshgarg/ai-mvp-backend/mcp-server-nucleus/src/mcp_server_nucleus/__main__.py", line 5, in <module>
  |     main()
  |   File "/Users/lokeshgarg/ai-mvp-backend/mcp-server-nucleus/src/mcp_server_nucleus/server.py", line 169, in main
  |     mcp.run()
  |   File "/opt/homebrew/lib/python3.11/site-packages/fastmcp/server/server.py", line 654, in run
  |     anyio.run(
  |   File "/opt/homebrew/lib/python3.11/site-packages/anyio/_core/_eventloop.py", line 77, in run
  |     return async_backend.run(func, args, {}, backend_options)
  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |   File "/opt/homebrew/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2342, in run
  |     return runner.run(wrapper())
  |            ^^^^^^^^^^^^^^^^^^^^^
  |   File "/opt/homebrew/Cellar/python@3.11/3.11.14_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/runners.py", line 118, in run
  |     return self._loop.run_until_complete(task)
  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |   File "/opt/homebrew/Cellar/python@3.11/3.11.14_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete
  |     return future.result()
  |            ^^^^^^^^^^^^^^^
  |   File "/opt/homebrew/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2325, in wrapper
  |     return await func(*args)
  |            ^^^^^^^^^^^^^^^^^
  |   File "/opt/homebrew/lib/python3.11/site-packages/fastmcp/server/server.py", line 629, in run_async
  |     await self.run_stdio_async(
  |   File "/opt/homebrew/lib/python3.11/site-packages/fastmcp/server/server.py", line 2526, in run_stdio_async
  |     async with stdio_server() as (read_stream, write_stream):
  |   File "/opt/homebrew/Cellar/python@3.11/3.11.14_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/contextlib.py", line 231, in __aexit__
  |     await self.gen.athrow(typ, value, traceback)
  |   File "/opt/homebrew/lib/python3.11/site-packages/mcp/server/stdio.py", line 85, in stdio_server
  |     async with anyio.create_task_group() as tg:
  |   File "/opt/homebrew/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 783, in __aexit__
  |     raise BaseExceptionGroup(
  | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
  +-+---------------- 1 ----------------
    | Exception Group Traceback (most recent call last):
    |   File "/opt/homebrew/lib/python3.11/site-packages/mcp/server/stdio.py", line 88, in stdio_server
    |     yield read_stream, write_stream
    |   File "/opt/homebrew/lib/python3.11/site-packages/fastmcp/server/server.py", line 2534, in run_stdio_async
    |     await self._mcp_server.run(
    |   File "/opt/homebrew/lib/python3.11/site-packages/fastmcp/server/low_level.py", line 177, in run
    |     async with AsyncExitStack() as stack:
    |   File "/opt/homebrew/Cellar/python@3.11/3.11.14_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/contextlib.py", line 745, in __aexit__
    |     raise exc_details[1]
    |   File "/opt/homebrew/Cellar/python@3.11/3.11.14_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/contextlib.py", line 728, in __aexit__
    |     cb_suppress = await cb(*exc_details)
    |                   ^^^^^^^^^^^^^^^^^^^^^^
    |   File "/opt/homebrew/lib/python3.11/site-packages/mcp/shared/session.py", line 238, in __aexit__
    |     return await self._task_group.__aexit__(exc_type, exc_val, exc_tb)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/opt/homebrew/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 783, in __aexit__
    |     raise BaseExceptionGroup(
    | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
    +-+---------------- 1 ----------------
      | Exception Group Traceback (most recent call last):
      |   File "/opt/homebrew/lib/python3.11/site-packages/fastmcp/server/low_level.py", line 189, in run
      |     async with anyio.create_task_group() as tg:
      |   File "/opt/homebrew/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 783, in __aexit__
      |     raise BaseExceptionGroup(
      | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
      +-+---------------- 1 ----------------
        | Traceback (most recent call last):
        |   File "/opt/homebrew/lib/python3.11/site-packages/mcp/server/lowlevel/server.py", line 689, in _handle_message
        |     await self._handle_request(message, req, session, lifespan_context, raise_exceptions)
        |   File "/opt/homebrew/lib/python3.11/site-packages/mcp/server/lowlevel/server.py", line 774, in _handle_request
        |     await message.respond(response)
        |   File "/opt/homebrew/lib/python3.11/site-packages/mcp/shared/session.py", line 134, in respond
        |     await self._session._send_response(  # type: ignore[reportPrivateUsage]
        |   File "/opt/homebrew/lib/python3.11/site-packages/mcp/shared/session.py", line 349, in _send_response
        |     await self._write_stream.send(session_message)
        |   File "/opt/homebrew/lib/python3.11/site-packages/anyio/streams/memory.py", line 249, in send
        |     self.send_nowait(item)
        |   File "/opt/homebrew/lib/python3.11/site-packages/anyio/streams/memory.py", line 218, in send_nowait
        |     raise ClosedResourceError
        | anyio.ClosedResourceError
        +------------------------------------
