McpWorkbench

autogen · ai, AI / Agents

Workbench that wraps MCP (Model Context Protocol) servers to dynamically list and call their tools. Supports stdio and SSE server transports.

# Source: https://github.com/microsoft/autogen | License: CC-BY-4.0 | Copyright --then that use is not regulated by the license. Our
# Provided via justclaw.it.com; keep this notice with the code.
import uuid
from datetime import datetime, timezone
from typing import Any, Dict, Union

from autogen_ext.tools.mcp._config import (
    McpServerParams,
    SseServerParams,
    StdioServerParams,
    StreamableHttpServerParams,
)
from fastapi import APIRouter, WebSocket, WebSocketDisconnect
from loguru import logger
from mcp import ClientSession, StdioServerParameters
from mcp.client.sse import sse_client
from mcp.client.stdio import stdio_client
from mcp.client.streamable_http import streamablehttp_client
from pydantic import BaseModel

from ...mcp.callbacks import (
    create_elicitation_cal

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search 40K more like it.

Get a free API key