MCP Server¶
What is MCP Server?¶
MCP Server, Model Context Protocol (MCP) is an open protocol designed to standardize secure connections and data source access between applications and AI models. Its core goal is to enable developers to easily provide contextual information (such as data, content, operations) to models through unified "tools" and "resources", thereby enhancing model capabilities without the need to retrain the models.
Services built based on MCP Server ultimately provide a unified multi-model callable interface. This service supports multi-client access and uses an API Key authentication mechanism to securely access the core functionalities of Guance, including Monitors, Logs, Dashboards, and DQL queries.
Getting Started¶
Here, the method of accessing via Cherry Studio is used as an example.
Access Methods
More access methods are currently under development. Stay tuned!
Download Version¶
-
Download the MCP Server client Cherry Studio and select the corresponding version.
-
Open Cherry Studio and begin configuring the basic services for the large model.
Here, Volcengine is used as an example to configure the API Key.
Configure Guance MCP Service¶
- Customize the input service name and description.
- Select the type as
streamableHttp. - Define the URL:
https://obsy-ai.guance.com/obsy_ai_mcp/mcp. - The request header format is:
Authorization=DF-API-KEY;Endpoint=SITE_KEY. - After configuring the MCP service, save and enable it. Then return to the homepage and select the MCP service.
Configuration Notes¶
-
The interface uses API KEY as the authentication method. Each request uses the value of DF-API-KEY in the request header for validity verification and as the basis for limiting the workspace for this request (using the workspace to which this DF-API-KEY belongs).
-
All interfaces currently displayed by the MCP service only require providing the API KEY (Header: DF-API-KEY) as the credential. If the credential exists and is valid, it is considered authenticated.
-
The MCP Endpoint configuration parameter is SITE_KEY, for example:
cn1. The specific corresponding MAP is as follows:
SITE_KEY_MAP = {
# === China SaaS Deployment ===
"cn1": "https://openapi.guance.com", # China Region 1 (Hangzhou) — Default
"cn2": "https://aws-openapi.guance.com", # China Region 2 (Ningxia)
"cn4": "https://cn4-openapi.guance.com", # China Region 4 (Guangzhou)
"cn6": "https://cn6-openapi.guance.one", # China Region 6 (Hong Kong)
"us1": "https://us1-openapi.guance.com", # Overseas Region 1 (Oregon)
"eu1": "https://eu1-openapi.guance.one", # Europe Region 1 (Frankfurt)
"ap1": "https://ap1-openapi.guance.one", # Asia-Pacific Region 1 (Singapore)
"za1": "https://za1-openapi.guance.com", # Africa Region 1 (South Africa)
"id1": "https://id1-openapi.guance.com", # Indonesia Region 1 (Jakarta)
}
Calling MCP Services¶
Tool Name |
Function | Input Example | Notes |
|---|---|---|---|
| Monitor Management | List the monitors in Guance | List the monitors in Guance | Queries the first 10 entries by default |
| Log Data Access Rules | List the log data access rules in Guance | List the log data access rules in Guance | Queries the first 10 entries by default |
| Dashboard Management | Get the list of dashboards in Guance | Get the list of dashboards in Guance | Queries the first 10 entries by default |
| Log Query | Execute DQL log queries | Logs from the last 15 minutes where service:mysql and status:error |
Queries all logs from the last 5 minutes by default ❗️Please input query conditions in a similar format, using structured "key:value" pairs for queries, and avoid using natural language sentences. |
