mcp-grpc-transport
@rustycl0ck
gRPC transport for MCP servers
Overview
What is mcp-grpc-transport?
mcp-grpc-transport is an MCP transport that uses gRPC for communication between client and server. It is designed for developers who want to host MCP servers on remote instances, leveraging existing gRPC infrastructure for authentication and authorization.
How to use mcp-grpc-transport?
Replace the default stdio transport with grpctransport.NewGrpcServerTransport() in your server code. Customize via options like WithPort and WithGrpcOpts. For clients, use the provided CLI tool (go run github.com/rustycl0ck/mcp-grpc-transport/cmd/client@latest) or configure your IDE (e.g., Cursor) to launch the client as the MCP command.
Key features of mcp-grpc-transport
- Integrates MCP with gRPC for remote hosting.
- Currently supports the
metoro-io/mcp-golanglibrary. - Server customization via gRPC options (port, interceptors, message size, TLS).
- Includes a ready-to-use client tool for testing and IDE integration.
Use cases of mcp-grpc-transport
- Run an MCP server on a remote cloud instance and connect local IDE clients.
- Reuse existing gRPC authentication/authorization middleware for MCP servers.
- Build language-agnostic MCP servers that can be called via any gRPC client.
FAQ from mcp-grpc-transport
Which MCP library does it support?
Only the metoro-io/mcp-golang library is currently supported.
How do I customize the server transport?
Use grpctransport.NewGrpcServerTransport() with options like grpctransport.WithPort(port) and grpctransport.WithGrpcOpts(...) to set interceptors, message size limits, and TLS credentials.
How do I connect my IDE to a remote server?
Configure your IDE’s MCP client to run the provided client tool, specifying the server address via the --address flag. Example for Cursor’s mcp.json: "command": "go", "args": ["run", "github.com/.../client@latest", "--address", "localhost:50051"].
What are the runtime dependencies?
The server depends on the metoro-io/mcp-golang library and gRPC (google.golang.org/grpc). Both are Go modules.
Does it support TLS?
Yes. Pass grpc.Creds(insecure.NewCredentials()) for testing or use proper TLS credentials via credentials.NewTLS(). The README recommends TLS in production.