Openstatus www.openstatus.dev

✍️ guide MCP server (#1278)

* ✍️ guide MCP server

* ci: apply automated fixes

* ✍️ rewrite

* ✍️ a little more content

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

authored by

Thibault Le Ouay
autofix-ci[bot]
and committed by
GitHub
3f765e00 de45348d

+130 -9
+1 -1
.github/workflows/dx.yml
··· 32 32 - name: Set up pnpm 33 33 uses: pnpm/action-setup@v4 34 34 with: 35 - version: 10.11.0 35 + version: 10.12.4 36 36 37 37 - name: ⎔ Setup node 38 38 uses: actions/setup-node@v4
+1 -1
.github/workflows/lint.yml
··· 22 22 - name: Set up pnpm 23 23 uses: pnpm/action-setup@v4 24 24 with: 25 - version: 10.11.0 25 + version: 10.12.4 26 26 27 27 - name: ⎔ Setup node 28 28 uses: actions/setup-node@v4
+1 -1
.github/workflows/migrate.yml
··· 19 19 - name: Set up pnpm 20 20 uses: pnpm/action-setup@v4 21 21 with: 22 - version: 10.11.0 22 + version: 10.12.4 23 23 24 24 - name: ⎔ Setup node 25 25 uses: actions/setup-node@v4
+1 -1
.github/workflows/test.yml
··· 32 32 - name: Set up pnpm 33 33 uses: pnpm/action-setup@v4 34 34 with: 35 - version: 10.11.0 35 + version: 10.12.4 36 36 37 37 - name: ⎔ Setup node 38 38 uses: actions/setup-node@v4
+1 -1
apps/docs/.env.example
··· 1 - NEXT_PUBLIC_OPENPANEL_CLIENT_ID= 1 + NEXT_PUBLIC_OPENPANEL_CLIENT_ID=your-id
+119
apps/docs/src/content/docs/guides/how-to-monitor-mcp-server.mdx
··· 1 + --- 2 + title: How to monitor your Model Context Provider (MCP) server? 3 + description: Learn how to monitor your MCP server with openstatus. 4 + sidebar: 5 + label: Monitor your MCP Server 6 + --- 7 + In this guide, we will show you how to monitor your remote MCP server using OpenStatus. We will use the Hugging Face MCP server for this article, but you can apply the same principles to any MCP server. You can find the code for this guide on [GitHub](https://github.com/openstatusHQ/template/tree/a69eac06e9d3d8579768dad803304e456f56ec33/mcp-server). 8 + 9 + **Prerequisites** 10 + 11 + - An OpenStatus account and CLI 12 + - An MCP server 13 + 14 + ## Model Context Provider (MCP) 15 + 16 + A Model Context Provider is a component that supplies additional context, data, or capabilities to AI models during runtime through the Model Context Protocol (MCP). It acts as a bridge, allowing AI models to access external resources such as databases, APIs, file systems, or other services not included in their original training data. 17 + 18 + ### What is an MCP Server? 19 + 20 + The server component of the MCP protocol hosts and manages external resources, tools, or data sources that AI models can access. It handles incoming requests from MCP clients, processes them according to the protocol specifications, and returns the requested information or executes the specified actions. The MCP server serves as the backend provider, exposing capabilities like database queries, file operations, or API calls in a standardized format for AI models to interact with. 21 + 22 + The protocol must adhere to the [JSON-RPC 2.0 specification](https://www.jsonrpc.org/specification). 23 + 24 + ### JSON-RPC Protocol 25 + 26 + JSON-RPC is a remote procedure call protocol that uses JSON as its data format. It is designed to be simple and easy to implement while providing a robust and flexible way to communicate between clients and servers. The JSON-RPC protocol is transport-independent, but for MCP servers, it uses HTTP/HTTPS, making it easy to monitor with OpenStatus. 27 + 28 + ### Ping Utility 29 + 30 + The official [MCP documentation](https://modelcontextprotocol.io/docs/concepts/architecture#debugging-and-monitoring) recommends implementing a health check for your MCP server. The protocol includes a mechanism to verify that the server is still responsive: the ping utility. The ping feature operates using a basic request/response mechanism. 31 + 32 + ## Create Your OpenStatus Monitor 33 + 34 + OpenStatus allows you to monitor your MCP server by sending a ping request to your MCP server's endpoint on a regular basis from multiple locations around the world. Making it easy to monitor your remote MCP server's health and performance. 35 + 36 + ### YAML Configuration 37 + 38 + The [OpenStatus CLI](/cli/getting-started/) allows you to create monitor defined in a YAML configuration file. This is perfect solution if want to manage your monitors via GitOps. 39 + 40 + Here's an example of a monitor configuration for Hugging Face MCP server: 41 + 42 + ```YAML 43 + # yaml-language-server: $schema=https://www.openstatus.dev/schema.json 44 + 45 + mcp-server: 46 + name: "HF MCP Server" 47 + description: "Hugging Face MCP server monitoring" 48 + frequency: "1m" 49 + active: true 50 + regions: ["iad", "ams", "lax"] 51 + retry: 3 52 + kind: http 53 + request: 54 + url: https://hf.co/mcp 55 + method: POST 56 + body: > 57 + { 58 + "jsonrpc": "2.0", 59 + "id": "openstatus", 60 + "method": "ping" 61 + } 62 + headers: 63 + User-Agent: OpenStatus 64 + Accept: application/json, text/event-stream 65 + Content-Type: application/json 66 + assertions: 67 + - kind: statusCode 68 + compare: eq 69 + target: 200 70 + - kind: textBody 71 + compare: eq 72 + target: '{"result":{},"jsonrpc":"2.0","id":"openstatus"}' 73 + ``` 74 + 75 + ### What Does This Monitor Do? 76 + 77 + We send an HTTP POST request to the MCP server. The request body contains a JSON-RPC request with the method "ping". 78 + 79 + ```json 80 + { 81 + "jsonrpc": "2.0", 82 + "id": "openstatus", 83 + "method": "ping" 84 + } 85 + ``` 86 + 87 + We set our headers to accept `application/json` and `text/event-stream`. We also include assertions to verify the response. 88 + 89 + First, we check that the status code is 200. 90 + 91 + ```YAML 92 + - kind: statusCode 93 + compare: eq 94 + target: 200 95 + ``` 96 + 97 + Next, we verify that the response body is correct. 98 + 99 + ```YAML 100 + - kind: textBody 101 + compare: eq 102 + target: '{"result":{},"jsonrpc":"2.0","id":"openstatus"}' 103 + ``` 104 + 105 + ### Using OpenStatus CLI to Create Your Monitor 106 + 107 + To create your monitor, use the OpenStatus CLI. 108 + 109 + ```bash 110 + openstatus create openstatus.yaml 111 + ``` 112 + 113 + ## Conclusion 114 + 115 + This guide has shown you how to create a monitor for your MCP server using the OpenStatus CLI. You can view the monitor in the OpenStatus dashboard. 116 + 117 + For example, here is our monitor for the HF MCP server: 118 + 119 + [https://www.openstatus.dev/public/monitors/5961](https://www.openstatus.dev/public/monitors/5961)
+2 -2
apps/docs/src/content/docs/guides/how-to-run-synthetic-test-github-action.mdx
··· 2 2 title: How to run a synthetic test in a GitHub Action 3 3 description: Learn how to run a synthetic test in a GitHub Action using OpenStatus. 4 4 sidebar: 5 - label: GitHub Action for Synthetics 5 + label: GitHub Action for Synthetics Tests 6 6 --- 7 7 8 8 In this guide, we will show you how to run a synthetic test in a GitHub Action using OpenStatus. ··· 65 65 66 66 ### Run the GitHub Action 67 67 68 - On every push to the main branch, the GitHub Action will run the synthetic tests you have configured in the configuration file. 68 + On every push to the main branch, the GitHub Action will run the synthetic tests you have configured in the configuration file.
+3 -1
apps/docs/src/content/docs/guides/introduction.mdx
··· 12 12 13 13 - [Deploy your own Status Page to Cloudflare Pages](/guides/how-deploy-status-page-cf-pages) 14 14 15 - - [How to run synthetic tests in your GitHub Actions](/guides/how-to-run-synthetic-test-github-action/) 15 + - [How to monitor your MCP Server using OpenStatus](/guides/how-to-monitor-mcp-server/) 16 + 17 + - [How to run synthetic tests in your GitHub Actions](/guides/how-to-run-synthetic-test-github-action/)
+1 -1
package.json
··· 21 21 "turbo": "2.3.2", 22 22 "typescript": "5.7.2" 23 23 }, 24 - "packageManager": "pnpm@10.11.0", 24 + "packageManager": "pnpm@10.12.4", 25 25 "pnpm": { 26 26 "onlyBuiltDependencies": ["@swc/core", "sharp"] 27 27 },