Skip to content

v0.4.0: SDK Generation, MCP Resources, and Modular Architecture

Latest

Choose a tag to compare

@bharatr21 bharatr21 released this 17 Nov 05:47

What's New in v0.4.0

This release brings three major improvements to mcp-nvidia: SDK Generation, MCP Resources Protocol, and a comprehensive Modular Architecture refactor.

🎯 Highlights

  • SDK Generation with TypeScript and Python generators
  • MCP Resources Protocol for Code Execution Mode
  • Modular Architecture refactoring for better maintainability

🆕 Added Features

SDK Generation

TypeScript and Python SDK generators with functional implementations:

  • Python SDK with zero MCP overhead - direct function calls to mcp_nvidia.lib
  • TypeScript SDK with full type safety and MCP client integration
  • Both SDKs provide complete type definitions and JSDoc/docstring documentation

MCP Resources Protocol

Code Execution Mode support via MCP Resources:

  • list_resources(): Returns all available SDK files
  • read_resource(uri): Returns SDK file contents
  • Virtual filesystem at mcp-nvidia://sdk/ with 8 resource files
  • Cached generation on server startup for optimal performance

Modular Architecture

Comprehensive refactoring to improve maintainability:

9 new modules in src/mcp_nvidia/lib/:

  • constants.py: Configuration and domain lists
  • search.py: Search orchestration and domain handling
  • relevance.py: Scoring and ranking algorithms
  • snippet.py: Context extraction and highlighting
  • response_builders.py: JSON response formatting
  • content_discovery.py: Content type detection
  • deduplication.py: Result deduplication
  • utils.py: Validation and utilities
  • __init__.py: Clean exports of all functions

SDK generation modules in src/mcp_nvidia/sdk_generator/:

  • python_generator.py: Python SDK generation
  • typescript_generator.py: TypeScript SDK generation
  • __init__.py: SDK generation orchestration

🔧 Changes

  • server.py reduced from ~2400 to ~500 lines by extracting business logic to lib/ modules
  • Improved separation of concerns and code organization
  • Better testability through modular design

🧪 Testing

  • Comprehensive test suite with 18 new tests:
    • 7 tests for SDK generation (TypeScript/Python, type conversion, multi-tool support)
    • 11 tests for MCP Resources (listing, reading, error handling, caching)
  • Full backward compatibility - existing MCP tool calling works unchanged
  • URI validation and error handling for resource protocol
  • Snippet highlighting enhancements

📚 Documentation

  • Added "SDK Resources (Code Execution Mode)" section to README
  • Usage examples for both Python and TypeScript SDKs
  • Documented differences between Python (direct) and TypeScript (MCP) approaches
  • Updated architecture documentation with new components
  • References to Anthropic's "Code Execution with MCP" and Cloudflare's "Code Mode"

⚠️ Breaking Changes

None - This release is fully backward compatible with previous versions.


📦 Installation

# Via npm/npx
npx @bharatr21/mcp-nvidia

# Via pip
pip install mcp-nvidia

🔗 Links


Full Changelog: v0.3.0...v0.4.0