
The Meshery MCP Server extension - an MCP server that streamlines and accelerates creating Meshery designs
Overview
Meshery is an extensible, self-service engineering plaform for the collaborative management of cloud and cloud native infrastructure. Browse all extensions Installation | Documentation | Forum | Playground | Catalog The Meshery MCP Server extension provides a dedicated Model Context Protocol (MCP) server that streamlines and accelerates the creation and management of Meshery designs. As an official Meshery Extension, it is owned end-to-end by its maintainers—covering architecture and design, implementation, tests, documentation, and publication to both the MCP and Skills marketplaces. The initial scope for the MCP Server, in priority order, includes: 1. Creation of Meshery designs. 2. Retrieval of designs in the user's requested file format (for example, JSON or YAML representations of designs). 3. Snapshotting of Meshery designs. 4. Design deployment dry-run results. 5. Definition, invocation, and results of performance tests.
README
Meshery MCP Server
Meshery MCP Server connects AI assistants to Meshery through the Model Context Protocol (MCP), an open standard for connecting AI applications to external systems. Any MCP-capable client, such as Claude Desktop, Claude Code, or an IDE agent, can then work with Meshery designs through one consistent interface instead of a custom integration per assistant.
It is an official Meshery Extension, written in Go, and runs as a standalone binary or container next to your Meshery deployment.
Project status
[!NOTE] Early development. The project scaffold is in place, but the MCP server itself is not implemented yet: the binary currently loads and validates its configuration, logs a startup line, and exits.
| Area | Status |
|---|---|
| Configuration (env vars, config file), logging, Meshery-style errors | ✅ Done |
| Build, lint, tests, container image, CI | ✅ Done |
| MCP server over stdio | Planned |
| Meshery API client | Planned |
| MCP tools, resources and prompts | Planned |
Planned scope
In priority order, the server will support:
- Creating Meshery designs.
- Retrieving designs in the format the user asks for (for example JSON or YAML).
- Snapshotting Meshery designs.
- Dry-run results for design deployments.
- Defining and running performance tests, and retrieving their results.
These will be exposed through MCP’s three building blocks:
- Tools: Meshery operations the AI can invoke on the user’s behalf.
- Resources: Meshery data the AI can read as context.
- Prompts: reusable prompt templates for common Meshery workflows.
Architecture
┌──────────────────────────────────────────────────────────────┐
│ MCP client: Claude Desktop, Claude Code, IDE agents, ... │
│ starts the server as a child process │
└──────────────────────────────────────────────────────────────┘
│ JSON-RPC over stdio (stdin/stdout)
▼
┌──────────────────────────────────────────────────────────────┐
│ meshery-mcp-server │
│ │
│ cmd/meshery-mcp-server entrypoint: flags, logger, wiring │
│ internal/config settings from env vars and file │
│ │
│ internal/tools MCP tools (planned) │
│ internal/resources MCP resources (planned) │
│ internal/prompts MCP prompts (planned) │
│ internal/meshery Meshery API client (planned) │
│ │
│ logs go to stderr; stdout is reserved for the protocol │
└──────────────────────────────────────────────────────────────┘
│ HTTP(S) + provider token
▼
┌──────────────────────────────────────────────────────────────┐
│ Meshery Server (MESHERY_SERVER_URL) │
└──────────────────────────────────────────────────────────────┘
The MCP client launches the server and talks to it over stdin/stdout, so the server does not listen on any network address. Because stdout carries the protocol, all logs go to stderr.
Only cmd/meshery-mcp-server wires the packages together. internal/config is the only package that reads environment variables or the config file; the other packages receive plain values from main. See docs/config.md for details.
Repository structure
meshery-mcp-server/
├── .github/workflows/ # CI: lint, build and test, Docker image
├── build/ # Shared Makefile includes
├── cmd/meshery-mcp-server/ # Entrypoint
├── docs/
│ └── config.md # Configuration reference
├── helpers/
│ └── component_info.json # Error-code metadata for Meshery's errorutil
├── internal/
│ ├── config/ # Configuration loading and validation
│ ├── meshery/ # Meshery API client
│ ├── prompts/ # MCP prompts
│ ├── resources/ # MCP resources
│ └── tools/ # MCP tools
├── .dockerignore
├── .golangci.yml # Lint configuration
├── config_example.yml # Example config file
├── Dockerfile # Multi-stage build, distroless non-root runtime
├── go.mod / go.sum
└── Makefile # Build and development commands
Quick start
Prerequisites
| Tool | Version | Needed for |
|---|---|---|
| Go | as declared in go.mod |
Building and testing |
| golangci-lint | v2.x | make lint |
| Docker | any recent version | Container builds only |
1. Clone and build
git clone https://github.com/meshery-extensions/meshery-mcp-server.git
cd meshery-mcp-server
make build # writes bin/meshery-mcp-server
2. Configure
The server works with no configuration if Meshery runs at http://localhost:9081. Otherwise, set environment variables:
| Variable | Default | Purpose |
|---|---|---|
MESHERY_SERVER_URL |
http://localhost:9081 |
Meshery server to connect to |
MESHERY_API_TOKEN |
(none) | Meshery provider token |
LOG_LEVEL |
info |
debug, info, warn or error |
To use a config file instead:
cp config_example.yml config.local.yaml # *.local.yaml is gitignored
and pass it with --config config.local.yaml. Environment variables override the file.
docs/config.md is the full reference: precedence rules, token handling, Docker specifics and every error message.
3. Run
make run
make run ARGS="--config config.local.yaml"
Today this prints a startup line to stderr and exits:
time="..." level=info msg="starting meshery-mcp-server version=... commit=... meshery_url=http://localhost:9081 token_configured=false" app=meshery-mcp-server
4. Run in a container
make docker-run
This builds the image and runs it over stdio. Inside a container, localhost refers to the container itself, so make docker-run points the server at http://host.docker.internal:9081 by default. Override it with DOCKER_MESHERY_SERVER_URL. MESHERY_API_TOKEN is forwarded from your shell.
5. Connect an MCP client
[!NOTE] This becomes useful once the MCP server is implemented.
MCP clients start the server themselves. For example, in Claude Desktop’s configuration:
{
"mcpServers": {
"meshery": {
"command": "/path/to/meshery-mcp-server",
"env": {
"MESHERY_SERVER_URL": "http://localhost:9081",
"MESHERY_API_TOKEN": ""
}
}
}
}
Point the client at the binary or at docker run -i ..., never at make: Make prints its commands to stdout, which would corrupt the MCP stream. docs/config.md has the Docker version.
Development
| Command | Description |
|---|---|
make build |
Build the binary for your platform into bin/ |
make run |
Build and run the binary; pass flags with ARGS="..." |
make test |
Run unit tests |
make coverage |
Run tests with the race detector and write coverage.txt |
make lint |
Run golangci-lint |
make fmt |
Format the code with gofmt |
make clean |
Remove bin/ and coverage.txt |
make docker-build |
Build the container image |
make docker-run |
Build the image and run it over stdio |
make or make show-help |
List all targets |
Every pull request runs three CI jobs: golangci-lint, Build and unit tests (tidy check, build, tests with coverage), and Test Docker Image Build (builds the image and starts it). Run make lint and make coverage before opening one.
Errors follow Meshery’s error conventions: each package defines its errors in error.go with "replace_me" codes, which Meshery’s errorutil tool replaces with real ones. To check your errors locally:
go run github.com/meshery/meshkit/cmd/errorutil -d . analyze -i ./helpers -o ./helpers
About Meshery Extensions
Meshery Extensions add capabilities to Meshery beyond its core platform. They live in the meshery-extensions organization, separate from the core meshery organization; the ecosystem expansion post explains why and how that organization is governed.
Related repositories:
- meshery/meshery: Meshery core
- meshery/meshkit: shared Go library used here for logging and errors
Install
This server does not publish a one-line install command.
Open the repository installation guide New to MCP? Start with the mcpskill.org guide →Configuration
{
"mcpServers": {
"meshery": {
"command": "/path/to/meshery-mcp-server",
"env": {
"MESHERY_SERVER_URL": "http://localhost:9081",
"MESHERY_API_TOKEN": "<token>"
}
}
}
}