What is Linkerd2 MCP?
Linkerd2 MCP is a Model Context Protocol (MCP) server that enables you to interact with your Linkerd2 service mesh using natural language or API calls. It builds on Linkerd and Linkerd-viz to provide high‑level mesh introspection and safe policy mutation via a gRPC interface.
How to use Linkerd2 MCP?
Build the collector and MCP server binaries with go build -o bin/collector ./cmd/collector and go build -o bin/mcp-server ./cmd/mcp-server. Deploy on a local kind cluster using the provided Helm chart, then port‑forward the service and test the gRPC API with grpcurl. For example, grpcurl -plaintext localhost:10900 mcp.v1.MeshContext/GetMeshGraph retrieves the mesh graph, and grpcurl -plaintext -d '{"namespace":"default","name":"allow-foo","json_spec":"{\"foo\": \"bar\"}"}' localhost:10900 mcp.v1.MeshContext/ApplyAuthorizationPolicy applies an authorization policy.
Key features of Linkerd2 MCP
- gRPC MCP API for mesh introspection and policy mutation
- Lightweight, fault‑tolerant control plane for Linkerd service meshes
- In‑memory mesh model backed by Redis for snapshots and deltas
- Applies authorization policy updates directly to the mesh
- Built with the help of AI agents (active development)
- Helm chart for easy deployment on Kubernetes
Use cases of Linkerd2 MCP
- Fetch the current mesh graph to visualize service topology
- Apply Linkerd authorization policies programmatically or via chat
- Integrate mesh management into AI‑powered assistant workflows
- Automate policy changes across namespaces in a Linkerd cluster
- Introspect mesh health and connectivity without kubectl commands
コメント