{
  "name": "forge.mcp",
  "language": "python",
  "version": "0.1.0",
  "description": "Python mcp package; imports are explicit from this package.",
  "manifest": "forge-py/pyproject.toml",
  "manifestSha256": "7f96957378b21995bf2e583af2afd1b9e6fb3b0089ff3559d62c7e012a034696",
  "status": "source-reference",
  "registryPublicationVerified": false,
  "route": "/libraries/python/mcp",
  "features": {},
  "files": [
    {
      "path": "forge-py/src/forge/mcp/__init__.py",
      "sha256": "d6d678ad58a9c6dfba3f81000ed07fdcf8b4bbe4a5c28c2c6817aa987b7ca227",
      "artifactSha256": "e93c7e514865c05c53871bd70e8f2dd0b99a07ef7bea405b9cf0df20a9b47cf3",
      "url": "/reference/source/forge-py/src/forge/mcp/__init__.py.txt",
      "declarations": []
    },
    {
      "path": "forge-py/src/forge/mcp/client.py",
      "sha256": "c75f09b08554e881fd868a09e1d2b16b8c958e623bca14611e1d77c9aa96c0f0",
      "artifactSha256": "ae9c32efadc172440a521ed1ba0273d6ab800e273acebe0406b9dfe8d1bd9439",
      "url": "/reference/source/forge-py/src/forge/mcp/client.py.txt",
      "declarations": [
        {
          "name": "McpClient",
          "line": 13,
          "signature": "class McpClient()",
          "documentation": "Client for connecting to MCP servers.\n\nThe client discovers tools and resources from an MCP server\nand enables agents to use them.\n\nArgs:\n    transport: The transport layer for communication.\n\nExample:\n    >>> # client = McpClient(StdioTransport())\n    >>> # tools = await client.list_tools()"
        },
        {
          "name": "McpClient.__init__",
          "line": 27,
          "signature": "def __init__(self, transport: Transport) -> None",
          "documentation": ""
        },
        {
          "name": "McpClient.initialize",
          "line": 36,
          "signature": "async def initialize(self) -> dict[str, Any]",
          "documentation": "Initialize the MCP session.\n\nReturns:\n    The server's initialization response."
        },
        {
          "name": "McpClient.list_tools",
          "line": 49,
          "signature": "async def list_tools(self) -> list[McpTool]",
          "documentation": "List all tools available from the server.\n\nReturns:\n    List of McpTool definitions."
        },
        {
          "name": "McpClient.call_tool",
          "line": 66,
          "signature": "async def call_tool(self, name: str, arguments: dict[str, Any]) -> Any",
          "documentation": "Call a tool on the server.\n\nArgs:\n    name: The tool name.\n    arguments: The tool arguments.\n\nReturns:\n    The tool result."
        },
        {
          "name": "McpClient.list_resources",
          "line": 82,
          "signature": "async def list_resources(self) -> list[McpResource]",
          "documentation": "List all resources available from the server.\n\nReturns:\n    List of McpResource definitions."
        },
        {
          "name": "McpClient.read_resource",
          "line": 99,
          "signature": "async def read_resource(self, uri: str) -> Any",
          "documentation": "Read a resource from the server.\n\nArgs:\n    uri: The resource URI.\n\nReturns:\n    The resource content."
        },
        {
          "name": "McpClient.close",
          "line": 111,
          "signature": "async def close(self) -> None",
          "documentation": "Close the MCP client connection."
        }
      ]
    },
    {
      "path": "forge-py/src/forge/mcp/server.py",
      "sha256": "94075544b846c3d6ca47b67490bb05518df4d0db141423a0806d7e465256b108",
      "artifactSha256": "16af14429929700b31e071695ff0ee3038cada1d74eab6063476e92a11a72f60",
      "url": "/reference/source/forge-py/src/forge/mcp/server.py.txt",
      "declarations": [
        {
          "name": "McpServer",
          "line": 13,
          "signature": "class McpServer()",
          "documentation": "Server that exposes tools and resources via the MCP protocol.\n\nArgs:\n    name: The server name.\n    version: The server version.\n\nExample:\n    >>> server = McpServer(\"my-server\", \"1.0.0\")\n    >>> server.name\n    'my-server'"
        },
        {
          "name": "McpServer.__init__",
          "line": 26,
          "signature": "def __init__(self, name: str, version: str) -> None",
          "documentation": ""
        },
        {
          "name": "McpServer.add_tool",
          "line": 32,
          "signature": "def add_tool(self, tool: McpTool, handler: Callable[..., Awaitable[Any]]) -> None",
          "documentation": "Register a tool with a handler.\n\nArgs:\n    tool: The tool definition.\n    handler: Async handler function for the tool."
        },
        {
          "name": "McpServer.add_resource",
          "line": 45,
          "signature": "def add_resource(self, resource: McpResource, handler: Callable[..., Awaitable[Any]]) -> None",
          "documentation": "Register a resource with a handler.\n\nArgs:\n    resource: The resource definition.\n    handler: Async handler function for the resource."
        },
        {
          "name": "McpServer.serve",
          "line": 58,
          "signature": "async def serve(self, transport: Transport) -> None",
          "documentation": "Start serving requests on the given transport.\n\nRuns the server loop, handling JSON-RPC requests until the\ntransport is closed.\n\nArgs:\n    transport: The transport layer to use."
        }
      ]
    },
    {
      "path": "forge-py/src/forge/mcp/transport.py",
      "sha256": "3fa773799897db8219d92dfe0e3dd14bc0ade06c1c12b975ecf3b3fde6bbfe1a",
      "artifactSha256": "6a9745c97648dcd441498e23830e6550e94d173601b07b9477c75d7fd88ced78",
      "url": "/reference/source/forge-py/src/forge/mcp/transport.py.txt",
      "declarations": [
        {
          "name": "Transport",
          "line": 11,
          "signature": "class Transport(ABC)",
          "documentation": "Abstract base class for MCP transports.\n\nTransports handle the bidirectional communication between\nMCP client and server."
        },
        {
          "name": "Transport.send",
          "line": 19,
          "signature": "async def send(self, message: dict[str, Any]) -> None",
          "documentation": "Send a JSON-RPC message.\n\nArgs:\n    message: The JSON-RPC message as a dictionary."
        },
        {
          "name": "Transport.receive",
          "line": 27,
          "signature": "async def receive(self) -> dict[str, Any] | None",
          "documentation": "Receive a JSON-RPC message.\n\nReturns:\n    The received message as a dictionary, or None if the\n    transport is closed."
        },
        {
          "name": "Transport.close",
          "line": 36,
          "signature": "async def close(self) -> None",
          "documentation": "Close the transport."
        },
        {
          "name": "StdioTransport",
          "line": 40,
          "signature": "class StdioTransport(Transport)",
          "documentation": "MCP transport over stdin/stdout.\n\nMessages are sent as JSON lines (one JSON object per line).\nThis is the standard MCP transport for subprocess-based servers."
        },
        {
          "name": "StdioTransport.__init__",
          "line": 47,
          "signature": "def __init__(self) -> None",
          "documentation": ""
        },
        {
          "name": "StdioTransport.send",
          "line": 50,
          "signature": "async def send(self, message: dict[str, Any]) -> None",
          "documentation": "Write a JSON-RPC message to stdout.\n\nArgs:\n    message: The message to send."
        },
        {
          "name": "StdioTransport.receive",
          "line": 62,
          "signature": "async def receive(self) -> dict[str, Any] | None",
          "documentation": "Read a JSON-RPC message from stdin.\n\nReturns:\n    The parsed message, or None if EOF."
        },
        {
          "name": "StdioTransport.close",
          "line": 78,
          "signature": "async def close(self) -> None",
          "documentation": "Mark the transport as closed."
        }
      ]
    },
    {
      "path": "forge-py/src/forge/mcp/types.py",
      "sha256": "ce2be3f8e12810494b24bdf200090937f5458268f06140ba0b49b416acacf5b0",
      "artifactSha256": "b61fbf604d3db2d774a504111cab54e00624cbe25e4404af496da508092e63d5",
      "url": "/reference/source/forge-py/src/forge/mcp/types.py.txt",
      "declarations": [
        {
          "name": "McpTool",
          "line": 12,
          "signature": "class McpTool()",
          "documentation": "An MCP tool definition.\n\nArgs:\n    name: The tool name.\n    description: Human-readable description.\n    input_schema: JSON Schema for the tool's input."
        },
        {
          "name": "McpResource",
          "line": 27,
          "signature": "class McpResource()",
          "documentation": "An MCP resource definition.\n\nArgs:\n    uri: The resource URI.\n    name: Human-readable name.\n    description: Human-readable description.\n    mime_type: The MIME type of the resource content."
        }
      ]
    }
  ]
}
