- 
                Notifications
    You must be signed in to change notification settings 
- Fork 748
feat: MCP presets: marimo docs and context7 #6619
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| The latest updates on your projects. Learn more about Vercel for GitHub. 
 | 
| Breaking changes detected in the OpenAPI specification! | 
| Breaking changes detected in the OpenAPI specification! | 
        
          
                marimo/_server/ai/mcp/types.py
              
                Outdated
          
        
      | class MCPToolMeta(TypedDict): | ||
| """Metadata that marimo adds to MCP tools.""" | ||
|  | ||
| server_name: str | ||
| namespaced_name: str | ||
|  | ||
| class MCPToolWithMeta(Protocol): | ||
| """MCP Tool with marimo-specific metadata.""" | ||
|  | ||
| name: str | ||
| description: str | None | ||
| inputSchema: dict[str, Any] | ||
| meta: MCPToolMeta | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused? we could also move it out of typechecking imo.
| ) | ||
|  | ||
| try: | ||
| from marimo._server.ai.mcp import get_mcp_client | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
were there errors if this import moved to the top? I feel like importing within hides errors down the road
        
          
                marimo/_server/ai/mcp/transport.py
              
                Outdated
          
        
      | read, write, *_ = await exit_stack.enter_async_context( | ||
| streamablehttp_client( | ||
| config["url"], | ||
| headers=config.get("headers") or {}, | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| headers=config.get("headers") or {}, | |
| headers=config.get("headers", {}), | 
|  | ||
| # Set up environment variables for the server process | ||
| env = os.environ.copy() | ||
| env.update(config.get("env") or {}) | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| env.update(config.get("env") or {}) | |
| env.update(config.get("env", {))) | 
| # Configure server parameters | ||
| server_params = StdioServerParameters( | ||
| command=config["command"], | ||
| args=config.get("args") or [], | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| args=config.get("args") or [], | |
| args=config.get("args", []), | 
        
          
                marimo/_server/ai/mcp/config.py
              
                Outdated
          
        
      | Raises: | ||
| ValueError: If configuration type is not supported | ||
| """ | ||
| # Import here to avoid circular imports | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| # Import here to avoid circular imports | 
| name=name, | ||
| transport=MCPTransportType.STREAMABLE_HTTP, | ||
| config=config, | ||
| timeout=config.get("timeout") or 30.0, | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| timeout=config.get("timeout") or 30.0, | |
| timeout=config.get("timeout", 30.0), | 
| Breaking changes detected in the OpenAPI specification! | 
| Breaking changes detected in the OpenAPI specification! | 
Closes #5379
This adds MCPs "presets". Users can add
marimoorcontext7and these MCP configs are defined in the marimo server.