loading…
Search for a command to run...
loading…
Enables MCP servers and clients to communicate over gRPC using FastMCP, supporting tool calls, text and image content, and progress reporting.
Enables MCP servers and clients to communicate over gRPC using FastMCP, supporting tool calls, text and image content, and progress reporting.
[!WARNING] Experimental / Proof of Concept
This package is a proof of concept for experimentation purposes. It is not intended for production use. The official Python package is being developed at GoogleCloudPlatform/mcp-grpc-transport-py — please follow/star that repo to stay updated.
A gRPC transport implementation for the Model Context Protocol (MCP) using FastMCP.
mcp.types objectsuv sync
The proto package (mcp-transport-proto) is fetched directly from GitHub via [tool.uv.sources] — no manual proto compilation needed.
import asyncio
from mcp.server.fastmcp import FastMCP
from grpcmcp import serve_grpc
mcp = FastMCP("My Server")
@mcp.tool()
async def my_tool(x: int) -> str:
"""Does something useful."""
return str(x)
if __name__ == "__main__":
asyncio.run(serve_grpc(mcp)) # default: 0.0.0.0:50051
# asyncio.run(serve_grpc(mcp, port=9090))
import asyncio
from grpcmcp import GRPCClient
async def main():
async with GRPCClient("localhost", 50051) as client:
tools = await client.list_tools()
for tool in tools.tools:
print(f"{tool.name}: {tool.description}")
result = await client.call_tool("my_tool", {"x": 42})
for content in result.content:
if content.type == "text":
print(content.text)
asyncio.run(main())
GRPCClient reference| Parameter | Type | Description |
|---|---|---|
host |
str |
Server hostname |
port |
int |
Server port |
timeout |
float | None |
Default per-call timeout in seconds |
channel_options |
list[tuple] | None |
Raw gRPC channel options |
| Method | Returns |
|---|---|
list_tools() |
types.ListToolsResult |
call_tool(name, arguments) |
types.CallToolResult |
Start the server:
uv run python example/grpc_example_server.py
In another terminal, run the client:
uv run python example/grpc_example_client.py
Выполни в терминале:
claude mcp add grpc-transport-for-mcp -- npx Transcripts, channel stats, search
автор: YouTubeAI image generation using various models.
автор: modelcontextprotocolUnified GPU inference API with 30 AI services (LLM, image gen, video, TTS, whisper, embeddings, reranking, OCR) as MCP tools. Pay-per-use via x402 USDC or API k
автор: gpu-bridgeA powerful image generation tool using Google's Imagen 3.0 API through MCP. Generate high-quality images from text prompts with advanced photography, artistic,
автор: hamflxНе уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории media