nvidia-nat-mcp 1.4.0a20251123__py3-none-any.whl → 1.4.0a20251204__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of nvidia-nat-mcp might be problematic. Click here for more details.

@@ -34,6 +34,7 @@ from nat.authentication.interfaces import AuthFlowType
34
34
  from nat.authentication.interfaces import AuthProviderBase
35
35
  from nat.authentication.oauth2.oauth2_auth_code_flow_provider_config import OAuth2AuthCodeFlowProviderConfig
36
36
  from nat.data_models.authentication import AuthResult
37
+ from nat.data_models.common import get_secret_value
37
38
  from nat.plugins.mcp.auth.auth_flow_handler import MCPAuthenticationFlowHandler
38
39
  from nat.plugins.mcp.auth.auth_provider_config import MCPOAuth2ProviderConfig
39
40
 
@@ -371,7 +372,7 @@ class MCPOAuth2Provider(AuthProviderBase[MCPOAuth2ProviderConfig]):
371
372
  # Manual registration mode
372
373
  self._cached_credentials = OAuth2Credentials(
373
374
  client_id=self.config.client_id,
374
- client_secret=self.config.client_secret,
375
+ client_secret=get_secret_value(self.config.client_secret),
375
376
  )
376
377
  logger.info("Using manual client_id: %s", self._cached_credentials.client_id)
377
378
  else:
@@ -450,11 +450,19 @@ def mcp_session_tool_function(tool, function_group: MCPFunctionGroup):
450
450
 
451
451
  # Preserve original calling convention
452
452
  if tool_input:
453
- args = tool_input.model_dump()
453
+ args = tool_input.model_dump(exclude_none=True, mode='json')
454
454
  return await session_tool.acall(args)
455
455
 
456
- _ = session_tool.input_schema.model_validate(kwargs)
457
- return await session_tool.acall(kwargs)
456
+ # kwargs arrives with all optional fields set to None because NAT's framework
457
+ # converts the input dict to a Pydantic model (filling in all Field(default=None)),
458
+ # then dumps it back to a dict. We need to strip out these None values because
459
+ # many MCP servers (e.g., Kaggle) reject requests with excessive null fields.
460
+ # We re-validate here (yes, redundant) to leverage Pydantic's exclude_none with
461
+ # mode='json' for recursive None removal in nested models.
462
+ # Reference: function_info.py:_convert_input_pydantic
463
+ validated_input = session_tool.input_schema.model_validate(kwargs)
464
+ args = validated_input.model_dump(exclude_none=True, mode='json')
465
+ return await session_tool.acall(args)
458
466
  except Exception as e:
459
467
  logger.warning("Error calling tool %s", tool.name, exc_info=True)
460
468
  return str(e)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nvidia-nat-mcp
3
- Version: 1.4.0a20251123
3
+ Version: 1.4.0a20251204
4
4
  Summary: Subpackage for MCP client integration in NeMo Agent toolkit
5
5
  Author: NVIDIA Corporation
6
6
  Maintainer: NVIDIA Corporation
@@ -16,7 +16,7 @@ Requires-Python: <3.14,>=3.11
16
16
  Description-Content-Type: text/markdown
17
17
  License-File: LICENSE-3rd-party.txt
18
18
  License-File: LICENSE.md
19
- Requires-Dist: nvidia-nat==v1.4.0a20251123
19
+ Requires-Dist: nvidia-nat==v1.4.0a20251204
20
20
  Requires-Dist: aiorwlock~=1.5
21
21
  Requires-Dist: mcp~=1.14
22
22
  Dynamic: license-file
@@ -2,7 +2,7 @@ nat/meta/pypi.md,sha256=EYyJTCCEOWzuuz-uNaYJ_WBk55Jiig87wcUr9E4g0yw,1484
2
2
  nat/plugins/mcp/__init__.py,sha256=GUJrgGtpvyMUCjUBvR3faAdv-tZzbU9W-izgx9aMEQg,680
3
3
  nat/plugins/mcp/client_base.py,sha256=Jm7FX4V5125vmqX9unAG4q-eeqgTyzfHgw14sZqnTRM,26753
4
4
  nat/plugins/mcp/client_config.py,sha256=l9tVUHe8WdFPJ9rXDg8dZkQi1dvHGYwoqQ8Glqg2LGs,6783
5
- nat/plugins/mcp/client_impl.py,sha256=BV7r39ijipAz9foAKtrLTairkaOjDH8Bnluw8sf72Ek,27902
5
+ nat/plugins/mcp/client_impl.py,sha256=UQQgn47stzOEfYhuLC8669-6xaj4gWDUgWWNsCpI-JM,28618
6
6
  nat/plugins/mcp/exception_handler.py,sha256=4JVdZDJL4LyumZEcMIEBK2LYC6djuSMzqUhQDZZ6dUo,7648
7
7
  nat/plugins/mcp/exceptions.py,sha256=EGVOnYlui8xufm8dhJyPL1SUqBLnCGOTvRoeyNcmcWE,5980
8
8
  nat/plugins/mcp/register.py,sha256=HOT2Wl2isGuyFc7BUTi58-BbjI5-EtZMZo7stsv5pN4,831
@@ -10,7 +10,7 @@ nat/plugins/mcp/tool.py,sha256=xNfBIF__ugJKFEjkYEM417wWM1PpuTaCMGtSFmxHSuA,6089
10
10
  nat/plugins/mcp/utils.py,sha256=dUIig7jeKz0ctb4o38jFGbe2uvM3DMR3PSJjfN_Lr5M,9111
11
11
  nat/plugins/mcp/auth/__init__.py,sha256=GUJrgGtpvyMUCjUBvR3faAdv-tZzbU9W-izgx9aMEQg,680
12
12
  nat/plugins/mcp/auth/auth_flow_handler.py,sha256=v21IK3IKZ2TLEP6wO9r-sJQiilWPq7Ry40M96SAxQFA,9125
13
- nat/plugins/mcp/auth/auth_provider.py,sha256=BgH66DlZgzhLDLO4cBERpHvNAmli5fMo_SCy11W9aBU,21251
13
+ nat/plugins/mcp/auth/auth_provider.py,sha256=lrjAmCLHjGzeYWreLPtd3QGpSgIrmiu70zGMSg7QmIA,21321
14
14
  nat/plugins/mcp/auth/auth_provider_config.py,sha256=ZdiUObYU_Oj8KDDZ-JqkS6kJgup5EBy2ZREUOBw_kkI,4143
15
15
  nat/plugins/mcp/auth/register.py,sha256=miNZNmNszGgMCOCADLpH0Nz1nugkDXqdVc7ooapBx-c,1754
16
16
  nat/plugins/mcp/auth/token_storage.py,sha256=aS13ZvEJXcYzkZ0GSbrSor4i5bpjD5BkXHQw1iywC9k,9240
@@ -18,10 +18,10 @@ nat/plugins/mcp/auth/service_account/__init__.py,sha256=GUJrgGtpvyMUCjUBvR3faAdv
18
18
  nat/plugins/mcp/auth/service_account/provider.py,sha256=jJmt7PA_U3C59K5chSzmEIOd2bRxRKqXly9vHkTmsHQ,5915
19
19
  nat/plugins/mcp/auth/service_account/provider_config.py,sha256=KhvQpROporbNKDFnx8np8b31QhdT3s5zYXd_IVTLgfE,5327
20
20
  nat/plugins/mcp/auth/service_account/token_client.py,sha256=PRJ3u8Ts1tpuLuQKOyHDPOIAynSKxW9a928Rhh_4fhc,5981
21
- nvidia_nat_mcp-1.4.0a20251123.dist-info/licenses/LICENSE-3rd-party.txt,sha256=fOk5jMmCX9YoKWyYzTtfgl-SUy477audFC5hNY4oP7Q,284609
22
- nvidia_nat_mcp-1.4.0a20251123.dist-info/licenses/LICENSE.md,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
23
- nvidia_nat_mcp-1.4.0a20251123.dist-info/METADATA,sha256=52-egpVHr45VW2p1147j9s4ZSxnY1UO2tXgJDHR5FOI,2319
24
- nvidia_nat_mcp-1.4.0a20251123.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
25
- nvidia_nat_mcp-1.4.0a20251123.dist-info/entry_points.txt,sha256=rYvUp4i-klBr3bVNh7zYOPXret704vTjvCk1qd7FooI,97
26
- nvidia_nat_mcp-1.4.0a20251123.dist-info/top_level.txt,sha256=8-CJ2cP6-f0ZReXe5Hzqp-5pvzzHz-5Ds5H2bGqh1-U,4
27
- nvidia_nat_mcp-1.4.0a20251123.dist-info/RECORD,,
21
+ nvidia_nat_mcp-1.4.0a20251204.dist-info/licenses/LICENSE-3rd-party.txt,sha256=fOk5jMmCX9YoKWyYzTtfgl-SUy477audFC5hNY4oP7Q,284609
22
+ nvidia_nat_mcp-1.4.0a20251204.dist-info/licenses/LICENSE.md,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
23
+ nvidia_nat_mcp-1.4.0a20251204.dist-info/METADATA,sha256=tNW4ZwGIJdshB-h8SPcFMJf6iMZXz41psgYtbKhIzGk,2319
24
+ nvidia_nat_mcp-1.4.0a20251204.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
25
+ nvidia_nat_mcp-1.4.0a20251204.dist-info/entry_points.txt,sha256=rYvUp4i-klBr3bVNh7zYOPXret704vTjvCk1qd7FooI,97
26
+ nvidia_nat_mcp-1.4.0a20251204.dist-info/top_level.txt,sha256=8-CJ2cP6-f0ZReXe5Hzqp-5pvzzHz-5Ds5H2bGqh1-U,4
27
+ nvidia_nat_mcp-1.4.0a20251204.dist-info/RECORD,,