Skip to content

Conversation

@dapperfu
Copy link

@dapperfu dapperfu commented Nov 8, 2025

  • Added Cursor entry to Table of Contents after Claude Desktop
  • Added new Cursor setup section with mcp.json configuration instructions
  • Updated Setup introduction to include Cursor in the list of example applications

Prompt: Need to update the README to add Cursor instructions next to claude.
Context: Added Cursor MCP server configuration instructions to the README documentation, following the same format as existing Claude and VS Code sections.

Technical details:

  • Model: Auto
  • IDE: Cursor
  • Generation method: AI-assisted pair programming
  • Code style: Markdown documentation
  • Dependencies: None

admin | Cursor.sh | Auto added 8 commits November 7, 2025 15:38
- Added Cursor entry to Table of Contents after Claude Desktop
- Added new Cursor setup section with mcp.json configuration instructions
- Updated Setup introduction to include Cursor in the list of example applications

-----

Prompt: Need to update the README to add Cursor instructions next to claude.
Context: Added Cursor MCP server configuration instructions to the README documentation, following the same format as existing Claude and VS Code sections.

Technical details:
- Model: Auto
- IDE: Cursor
- Generation method: AI-assisted pair programming
- Code style: Markdown documentation
- Dependencies: None
- Added instance lock mechanism using lock file in temp directory
- Prevents multiple MCP server instances from running simultaneously
- Lock file contains PID of running instance
- Checks if existing process is still alive before acquiring lock
- Automatically cleans up stale lock files from dead processes
- Platform-specific process existence checks (Windows/Unix)
- Lock is automatically released on server shutdown

Technical details:
- Model: claude-sonnet-4-20250514
- IDE: Cursor
- Generation method: AI-assisted pair programming
- Code style: Go standard library patterns with platform-specific implementations
- Dependencies: golang.org/x/sys/windows for Windows process checks
- Allow up to 24 hours of clock skew for self-signed certificates
- Fixes TLS certificate validation errors when MATLAB certificate notBefore time is in the future
- Handles cases where system clocks are slightly out of sync
- Custom VerifyPeerCertificate callback checks certificate validity with tolerance window

This resolves the 'certificate has expired or is not yet valid' errors that were
preventing MATLAB MCP server from connecting to MATLAB instances.

Technical details:
- Model: claude-sonnet-4-20250514
- IDE: Cursor
- Generation method: AI-assisted pair programming
- Code style: Go standard library patterns with x509 certificate verification
- Added TryLockWithKill method to InstanceLock that terminates existing instances
- New instances now automatically kill old instances before starting
- Prevents stale/unresponsive MCP servers from blocking new connections
- Platform-specific process termination for Windows and Unix
- Waits up to 1 second for process to exit after termination signal

This fixes the issue where Cursor shows MCP server errors when an old
instance is still running but unresponsive. Now new instances will
automatically clean up old ones, ensuring a fresh start.

Technical details:
- Model: claude-sonnet-4-20250514
- IDE: Cursor
- Generation method: AI-assisted pair programming
- Code style: Go standard library patterns with platform-specific implementations
- Dependencies: golang.org/x/sys/windows, os/syscall
…MCP server

- Added MATLAB readiness check that tests connection with simple eval
- Added retry logic with exponential backoff in Client() method (5 attempts)
- Added waitForMATLABReady() that retries connection test up to 10 times
- Grace period allows MATLAB Embedded Connector to fully initialize
- Prevents Cursor from sending requests before MATLAB is ready
- Thread-safe isReady flag to track connection state

This addresses the issue where Cursor immediately sends tool requests
after MCP server starts, before MATLAB has time to initialize the
Embedded Connector. Now the server waits until MATLAB is actually
ready before accepting tool calls.

Technical details:
- Model: claude-sonnet-4-20250514
- IDE: Cursor
- Generation method: AI-assisted pair programming
- Code style: Go standard library patterns with context timeouts
- Dependencies: golang.org/x/sys/windows, os/syscall
- Set InsecureSkipVerify: true to bypass Go's standard validation
- Go's TLS library validates certificate dates BEFORE VerifyPeerCertificate
- This prevented our clock skew tolerance from working
- Now we do full certificate verification ourselves with 24-hour tolerance
- This fixes certificate errors when MATLAB's certificate has future dates

The issue was that certificate validation errors occurred at 13:16-13:39
before the server restart, showing 'certificate not valid yet' errors.
After restart at 17:29, things worked, but the underlying issue remained.

Technical details:
- Model: claude-sonnet-4-20250514
- IDE: Cursor
- Generation method: AI-assisted pair programming
- Code style: Go standard library with custom TLS verification
- Dependencies: crypto/tls, crypto/x509
@agoldsbo
Copy link
Collaborator

Thank you for the pull request! We welcome your feedback on the MATLAB MCP Core Server. We review all contributions but do not merge external pull requests. However, your suggestions may influence development of future releases.

To report bugs, suggest features, or discuss ideas, please open an issue. We actively monitor and responds to issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants