Skip to content

Conversation

cevheri
Copy link
Collaborator

@cevheri cevheri commented Jun 17, 2025

Added web platform support with some limitations:

  • stdio not supported

  • I tested, web, linux, windows, macos, ios, android there is no side effect as I saw

maybe not all features work, but basic features work on the web platform

I created a web platform specific solution for sqllite

I used shared-preferences for mcp server configuration


I also made some simple fixes and improvements

I fixed deprecated features in new flutter versions.

cevheri added 6 commits June 16, 2025 10:51
The `MarkdownBlock` widget itself handles scrolling, making the
`SingleChildScrollView` redundant. Removing it simplifies the widget
tree and improves performance by avoiding unnecessary layout calculations.
The `ConstrainedBox` was also removed as it was no longer needed after
removing the `SingleChildScrollView`.
…es() to avoid precision loss. Try replacing the use of the deprecated member with the replacement
This commit introduces support for managing `mcp_server.json` configurations in web environments by utilizing `shared_preferences`.

Key changes:
- In `McpServerProvider`:
    - `_loadServers`: For web platforms, loads server configuration from `shared_preferences`. If not found, loads from `assets/mcp_server.json` and saves it to `shared_preferences`. Sets `installed: true` for web servers.
    - `saveServers`: For web platforms, saves the server configuration to `shared_preferences`.
    - `_initConfigFile`: Skips file initialization for web.
- In `McpServerPage`:
    - Adjusts logic for checking command existence to use `getPlatformPath()` which returns `null` for web.
    - Updates platform checks to use `kIsMobile` and `kIsWeb` for consistency.
- In `platform.dart`:
    - Adds `getPlatformPath()` function to retrieve the `PATH` environment variable, returning `null` for web platforms.
@cevheri
Copy link
Collaborator Author

cevheri commented Jun 17, 2025

releated the #144

@daodao97 daodao97 merged commit 35bf7bb into daodao97:main Jun 17, 2025
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