Apache SkyWalking MCP Server

Clone this repo:
  1. 949a3d8 Add support mcp server for SkyWalking - stage1 (#1) by Zixin Zhou · 2 days ago main
  2. 0a4df65 Initial commit by Zixin Zhou · 4 weeks ago

Apache SkyWalking MCP

SkyWalking-MCP: A Model Context Protocol (MCP) server for integrating AI agents with Skywalking OAP and the surrounding ecosystem.

SkyWalking: an APM(application performance monitor) system, especially designed for microservices, cloud native and container-based (Docker, Kubernetes, Mesos) architectures.

Usage

From Source

# Clone the repository
git clone https://github.com/apache/skywalking-mcp.git
cd skywalking-mcp && go mod tidy

# Build the project
make

Command-line Options

Usage:
  swmcp [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  sse         Start SSE server
  stdio       Start stdio server

Flags:
  -h, --help               help for swmcp
      --log-command        When true, log commands to the log file
      --log-file string    Path to log file
      --log-level string   Logging level (debug, info, warn, error) (default "info")
      --read-only          Restrict the server to read-only operations
      --sw-url string      Specify the OAP URL to connect to (e.g. http://localhost:12800)
  -v, --version            version for swmcp

Use "swmcp [command] --help" for more information about a command.

You could start the MCP server with the following command:

# use stdio server
bin/swmcp stdio --sw-url http://localhost:12800

# or use SSE server
bin/swmcp sse --sse-address localhost:8000 --base-path /mcp --sw-url http://localhost:12800

Usage with Cursor

{
  "mcpServers": {
    "skywalking": {
      "command": "swmcp stdio",
      "args": [
        "--sw-url",
        "http://localhost:12800"
      ]
    }
  }
}

If using Docker:

make build-image to build the Docker image, then configure the MCP server like this:

{
  "mcpServers": {
    "skywalking": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-e",
        "SW_URL",
        "skywalking-mcp:latest"
      ],
      "env": {
        "SW_URL": "http://localhost:12800"
      }
    }
  }
}

Contact Us

License

Apache 2.0 License.