Skip to content

Conversation

@mscolnick
Copy link
Contributor

@mscolnick mscolnick commented Oct 1, 2025

Closes #5379

This adds MCPs "presets". Users can add marimo or context7 and these MCP configs are defined in the marimo server.

Screenshot 2025-09-30 at 11 22 27 PM Screenshot 2025-09-30 at 11 00 07 PM

@vercel
Copy link

vercel bot commented Oct 1, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
marimo-docs Ready Ready Preview Comment Oct 1, 2025 1:50pm

@github-actions github-actions bot added the bash-focus Area to focus on during release bug bash label Oct 1, 2025
@github-actions
Copy link

github-actions bot commented Oct 1, 2025

Breaking changes detected in the OpenAPI specification!

@github-actions
Copy link

github-actions bot commented Oct 1, 2025

Breaking changes detected in the OpenAPI specification!

Light2Dark
Light2Dark previously approved these changes Oct 1, 2025
Comment on lines 16 to 28
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
Copy link
Contributor

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
Copy link
Contributor

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

read, write, *_ = await exit_stack.enter_async_context(
streamablehttp_client(
config["url"],
headers=config.get("headers") or {},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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 {})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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 [],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
args=config.get("args") or [],
args=config.get("args", []),

Raises:
ValueError: If configuration type is not supported
"""
# Import here to avoid circular imports
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Import here to avoid circular imports

name=name,
transport=MCPTransportType.STREAMABLE_HTTP,
config=config,
timeout=config.get("timeout") or 30.0,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
timeout=config.get("timeout") or 30.0,
timeout=config.get("timeout", 30.0),

@github-actions
Copy link

github-actions bot commented Oct 1, 2025

Breaking changes detected in the OpenAPI specification!

@github-actions
Copy link

github-actions bot commented Oct 1, 2025

Breaking changes detected in the OpenAPI specification!

@mscolnick mscolnick merged commit 309964e into main Oct 1, 2025
33 of 45 checks passed
@mscolnick mscolnick deleted the ms/mcp-config branch October 1, 2025 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bash-focus Area to focus on during release bug bash

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Marimo's AI Chat is unaware of its own documentation

3 participants