Logo Apache SkyWalking MCP

Apache SkyWalking MCP

Tổ chức
apache

Apache SkyWalking MCP Server

Nhà phát hànhapache
Kho mãskywalking-mcp
Ngôn ngữGo
Bản fork
13
Sao
36
Công cụ có sẵn
0
Phương thức truyền tảistdio
Danh mục
Giấy phépApache-2.0
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    Apache SkyWalking MCP cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 0 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Cấu hình sẵn để sao chép

    Dùng các đoạn cấu hình cài đặt mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Chỉ số quan tâm đến mã nguồn mở

    36 sao và 13 bản fork từ kho mã được liên kết.

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

bash
# 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

bash
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
  streamable  Start Streamable server

Global 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)
      --sw-username string   Username for basic auth to SkyWalking OAP (supports ${ENV_VAR} syntax)
      --sw-password string   Password for basic auth to SkyWalking OAP (supports ${ENV_VAR} syntax)
      --sw-insecure          Skip TLS certificate verification for OAP connections (use only in development)
  -v, --version              version for swmcp

SSE-specific Flags:
      --sse-address string     Host and port for the SSE server (default "localhost:8000")
      --base-path string       Base path for the SSE server
      --allowed-origins string Comma-separated list of allowed CORS origins. Empty reflects any origin (open CORS). Use * to send the wildcard header.
      --disable-localhost-protection  Disable DNS rebinding protection (see Reverse proxies below)

Streamable-specific Flags:
      --address string         Host and port for the Streamable HTTP server (default "localhost:8000")
      --endpoint-path string   Endpoint path for the Streamable HTTP server (default "/mcp")
      --allowed-origins string Comma-separated list of allowed CORS origins. Empty reflects any origin (open CORS). Use * to send the wildcard header.
      --disable-localhost-protection  Disable DNS rebinding protection (see Reverse proxies below)

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

You could start the MCP server with the following command:

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

# with basic auth (raw password)
bin/swmcp stdio --sw-url http://localhost:12800 --sw-username admin --sw-password admin

# with basic auth (password from environment variable)
bin/swmcp stdio --sw-url http://localhost:12800 --sw-username admin --sw-password '${SW_PASSWORD}'

# skip TLS verification (development only, e.g. self-signed certs)
bin/swmcp stdio --sw-url https://localhost:12800 --sw-insecure

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

# restrict CORS to specific origins (SSE and streamable transports)
bin/swmcp streamable --sw-url http://localhost:12800 --allowed-origins "http://localhost:3000,https://app.example.com"

Transport URL behavior:

  • stdio, sse, and streamable all use the configured --sw-url value (or the default http://localhost:12800/graphql).
  • sse and streamable ignore request-level URL override headers.

Reverse proxies

The HTTP transports reject a request that arrives over a loopback address while carrying a non-loopback Host header, answering 403 Forbidden: invalid Host header. This is DNS rebinding protection: a malicious page can point its own hostname at 127.0.0.1 to reach a server running on the visitor's machine, and such a request is indistinguishable from a legitimate one except for that Host.

A same-host reverse proxy that forwards to 127.0.0.1 while preserving the public Host produces the same shape and is rejected too. Prefer having the proxy rewrite Host to localhost, or point it at a non-loopback address.

When you do opt out, pair it with --allowed-origins. A browser on the proxy host reaches 127.0.0.1 just as the proxy does, so the origin allowlist is the only defense left:

bash
bin/swmcp streamable --sw-url http://localhost:12800 \
  --disable-localhost-protection --allowed-origins https://mcp.example.com

Disabling the protection while leaving CORS open (the default) lets any web page drive the server through the browser of anyone on that host.

Usage with Cursor, Copilot, Claude Code

json
{
  "mcpServers": {
    "skywalking": {
      "command": "swmcp stdio",
      "args": [
        "--sw-url", "http://localhost:12800",
        "--sw-username", "admin",
        "--sw-password", "${SW_PASSWORD}"
      ]
    }
  }
}

If using Docker:

make build-image builds a local linux/amd64 image by default. For multi-platform publishing, use make docker-push, which builds and pushes linux/amd64,linux/arm64 images via Docker Buildx.

Common variants:

bash
# Build a local image and load it into your Docker daemon
make build-image

# Build and push a multi-platform image to the default registry
make docker-push VERSION=0.1.0

# Push to a custom registry/repository
make docker-push IMAGE=ghcr.io/your-org/skywalking-mcp VERSION=0.1.0

# Build for a custom platform set
make docker-build PLATFORMS=linux/arm64 OUTPUT=--load

Then configure the MCP server like this:

json
{
  "mcpServers": {
    "skywalking": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
		"skywalking-mcp:latest",
		"--sw-url",
		"http://localhost:12800"
      ]
    }
  }
}

Available Tools

SkyWalking MCP provides the following tools to query and analyze SkyWalking OAP data:

CategoryTool NameDescription
Tracequery_tracesQuery traces with multi-condition filtering (service, endpoint, state, tags, and time range via start/end/step). Supports full, summary, and errors_only views with performance insights.
Logquery_logsQuery logs with filters for service, instance, endpoint, trace ID, tags, and time range. Supports cold storage and pagination.
MQEexecute_mqe_expressionExecute MQE (Metrics Query Expression) to query and calculate metrics data. Supports calculations, aggregations, TopN, trend analysis, and multiple result types.
MQElist_mqe_metricsList available metrics for MQE queries. Filter by regex pattern; returns metric name, type, and catalog.
MQEget_mqe_metric_typeGet type information (REGULAR_VALUE, LABELED_VALUE, SAMPLED_RECORD) for a specific metric to help build correct MQE expressions.
Metadatalist_layersList all layers registered in SkyWalking OAP (e.g. GENERAL, MESH, K8S).
Metadatalist_servicesList all services registered in SkyWalking OAP under a specific layer.
Metadatalist_instancesList all instances of a service (e.g. pods or JVM processes).
Metadatalist_endpointsList endpoints of a service with optional keyword filtering.
Metadatalist_processesList processes of a service instance.
Eventquery_eventsQuery events (deployments, restarts, scaling) with filters for service, instance, endpoint, type, and layer.
Alarmquery_alarmsQuery alarms triggered by metric threshold breaches. Filter by scope, keyword, and tags.
Topologyquery_services_topologyQuery global or scoped service topology. Optionally filter by specific service IDs or layer.
Topologyquery_instances_topologyQuery service instance topology between a client service and a server service.
Topologyquery_endpoints_topologyQuery endpoint dependency topology for a given endpoint.
Topologyquery_processes_topologyQuery process topology for a given service instance.

Available Prompts

SkyWalking MCP provides the following prompts for guided analysis workflows:

CategoryPrompt NameDescriptionArguments
Performanceanalyze-performanceAnalyze service performance using metrics toolsservice_name (required), start (optional), end (optional)
Performancecompare-servicesCompare performance metrics between multiple servicesservices (required), metrics (optional), start (optional), end (optional)
Performancetop-servicesFind top N services ranked by a given metricmetric_name (required), top_n (optional), order (optional)
Traceinvestigate-tracesInvestigate traces for errors and performance issuesservice_id (optional), trace_state (optional), start (optional), end (optional)
Tracetrace-deep-diveDeep dive analysis of a specific tracetrace_id (required), view (optional)
Loganalyze-logsAnalyze service logs for errors and patternsservice_id (optional), log_level (optional), start (optional), end (optional)
Topologyexplore-service-topologyExplore services, instances, endpoints, and processes within a layer and time rangelayer (required), start (required), end (optional)
MQEbuild-mqe-queryHelp build MQE expressions for complex metric queriesquery_type (required), metrics (required), conditions (optional)
MQEexplore-metricsExplore available metrics and their typespattern (optional), show_examples (optional)
Utilitygenerate_durationConvert a natural-language time range into a {start, end} duration object for use with other toolstime_range (required)

Contact Us

License

Apache 2.0 License.

Cài đặt

TypingMind
{
  "mcpServers": {
    "skywalking-mcp": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-e",
        "SW_URL",
        "skywalking-mcp:latest"
      ],
      "env": {
        "SW_URL": "<SW_URL>"
      }
    }
  }
}

Dùng MCP Apache SkyWalking MCP với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối Apache SkyWalking MCP, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. MCP này chạy cục bộ thông qua trình kết nối MCP của TypingMind trên thiết bị của bạn.

Hướng dẫn thiết lập để dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Cài trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Cài trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Giữ tiến trình chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm Apache SkyWalking MCP làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của Apache SkyWalking MCP.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "skywalking-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của Apache SkyWalking MCP, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của Apache SkyWalking MCP.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng Apache SkyWalking MCP giúp tôi làm việc này không?
Apache SkyWalking MCP
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng Apache SkyWalking MCP.

Câu hỏi thường gặp

Máy chủ MCP Apache SkyWalking MCP dùng để làm gì?

Apache SkyWalking MCP là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP Apache SkyWalking MCP với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng Apache SkyWalking MCP với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP Apache SkyWalking MCP với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối Apache SkyWalking MCP, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP Apache SkyWalking MCP với TypingMind?

Apache SkyWalking MCP hoạt động thông qua trình kết nối MCP cục bộ của TypingMind. Đây là lựa chọn phù hợp nhất khi máy chủ MCP cần truy cập tệp cục bộ, ứng dụng máy tính, công cụ dòng lệnh hoặc tài nguyên riêng trên máy tính của bạn.

MCP Apache SkyWalking MCP cung cấp những công cụ nào trong TypingMind?

Apache SkyWalking MCP cung cấp các chức năng MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP Apache SkyWalking MCP không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu Apache SkyWalking MCP yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇