{
  "markdown": "# Chronosphere MCP Server\nMCP server for [Chronosphere](https://chronosphere.io). Serves tools for fetching logs, metrics, traces, events as well as select entities.\n\nThis project uses [semver](https://semver.org/) for release versions. We have not graduated to 1.0, so breaking\nchanges may occur for minor version bumps.\n\n## MCP config with popular hosts (claude desktop, cursor)\n### Remote Server\nThe easiest way to use the MCP server is using our remote hosted server:\n\n### Auth\nYou can use either a [Chronosphere API token](https://docs.chronosphere.io/tooling/api-info#create-an-api-token) or OAuth\nwith the Chronosphere MCP server. To use MCP with OAuth, the MCP client must support OAuth. \n\nOAuth support is new and have not been tested with all clients. If it does not work for you, please raise the issue to\nChronosphere support in slack with the following information:\n1. MCP client you're using (e.g. VS code, codex, cursor, etc)\n2. What steps you took to attempt authentication\n3. What error you're seeing.\n\n### Header-based configuration\nSome MCP hosts let you attach custom HTTP headers to requests sent to the MCP server. The Chronosphere MCP server supports\nthe following user-facing headers.\n\n#### Disable tools (`X-Chrono-MCP-Disable-Tools`)\nUse this header to hide specific tools from the tool list exposed to your MCP client.\n\n- **Format**: comma-separated list of MCP tool names (the **Tool Name** column in the [Available Tools](#available-tools) table)\n- **Example value**: `query_logs_range,render_prometheus_range_query`\n- **Notes**: whitespace is ignored; unknown tool names are ignored\n\n#### Enable writes (`X-Chrono-MCP-Enable-Writes`)\nWrite tools are hidden and cannot be called by default. The server operator must first permit writes with\n`server.tools.enableWrites: true`. HTTP and SSE clients must additionally set this header to `true`; the header cannot\noverride a disabled server setting. Other values do not enable writes.\n\nStdio has no request headers, so the server setting alone enables writes for that transport. The Chronosphere credentials\nused by the server must still authorize the underlying API operation.\n\n#### Cursor/VSCode\n```json\n{\n    \"mcpServers\": {\n        \"chronosphere\": {\n            \"url\": \"https://<org name>.chronosphere.io/api/mcp/mcp\",\n            \"headers\": {\n                \"Authorization\": \"Bearer <chronosphere api token>\",\n                \"X-Chrono-MCP-Disable-Tools\": \"<optional list of tools to disable>\"\n            }\n        }\n    }\n}\n```\n\nThis configuration should work for Cursor and VSCode. Leave out the `headers` section to use OAuth instead of a Chronosphere API token.\nRemove `X-Chrono-MCP-Disable-Tools` to expose all tools.\n\nMore details for VSCode [here](https://code.visualstudio.com/docs/copilot/customization/mcp-servers) and Cursor [here](https://cursor.com/docs/context/mcp)\n\n#### Claude code\nAdding chronosphere MCP server to claude code\n```shell\nclaude mcp add -t http \\\n  -H \"Authorization: Bearer ${CHRONOSPHERE_API_TOKEN}\" \\\n  -H \"X-Chrono-MCP-Disable-Tools: <list of tools to disable>\" \\\n  chronosphere \"https://${CHRONOSPHERE_ORG_NAME}.chronosphere.io/api/mcp/mcp\"\n```\n\nYou can leave out the Authorization header if you are using OAuth. Once you're in claude type `/mcp` and select the server to login to trigger the OAuth flow.\nRemove the `X-Chrono-MCP-Disable-Tools` header to expose all tools.\n\nMore details [here](https://docs.claude.com/en/docs/claude-code/mcp)\n\n#### Codex CLI\n```\nexperimental_use_rmcp_client = true\n[mcp_servers.chronosphere]\nurl = \"https://<org_name>.chronosphere.io/api/mcp/mcp\"\nbearer_token = \"<chronosphere api token>\"\n```\n\nFor oauth login, you must enable `experimental_use_rmcp_client = true` and then run `codex mcp login chronosphere`\n\nMore details [here](https://github.com/openai/codex/blob/main/docs/config.md#mcp_servers)\n\n#### Gemini CLI\n```\nCHRONOSPHERE_ORG_NAME=<your org>\nCHRONOSPHERE_API_TOKEN=<your api token>\ngemini mcp add chronosphere \"https://${CHRONOSPHERE_ORG_NAME}.chronosphere.io/api/mcp/mcp\" \\\n  -H \"Authorization: Bearer ${CHRONOSPHERE_API_TOKEN}\" \\\n  -H \"X-Chrono-MCP-Disable-Tools: <list of tools to disable>\"\n\n# Drop the -H authorization header option if you want to use OAuth.\n```\n\nSee [Gemini MCP docs](https://geminicli.com/docs/tools/mcp-server/) for more information.\n\n### Building from source\nFirst build the binary\n```sh\nmake chronomcp\n```\n\n```json\n{\n  \"mcpServers\": {\n    \"chronosphere-mcp\": {\n      \"command\": \"<PATH/TO/REPO>/bin/chronomcp\",\n      \"args\": [\n        \"-c\",\n        \"<PATH/TO/REPO>/config.yaml\"\n      ],\n      \"env\": {\n        \"CHRONOSPHERE_ORG_NAME\": \"<your org here>\",\n        \"CHRONOSPHERE_API_TOKEN\": \"<your api token here>\"\n      }\n    }\n  }\n}\n```\n\n## Developing\n### Running the server\n#### Authentication to Chronosphere\n\nThis MCP server uses the same authentication methods as chronoctl. By default, the Makefile expects the API token to be stored in `.chronosphere_api_token`.\n\n#### Run the mcp server\n```sh\nmake run-chronomcp CHRONOSPHERE_ORG_NAME=<your org here> CHRONOSPHERE_API_TOKEN=<your api token here>\n```\n\n### Debugging MCP Tools\n\nThe MCP project provides an inspector useful for directly calling tools APIs. To use:\n\n1. Start the MCP server with streamable http transport `make run-chronomcp CONFIG_FILE=./config.http.yaml CHRONOSPHERE_ORG_NAME=<your org here>`\n1. Run `npx @modelcontextprotocol/inspector node build/index.js`.\n1. Open http://localhost:6274/#resources , fill in `http://0.0.0.0:8081/mcp` in the URL, with transport type Streamable HTTP.\n\n## Available Tools\n\n| Group | Tool Name | Description |\n|-------|-----------|-------------|\n| configapi | get_classic_dashboard | Get classic-dashboards resource |\n| configapi | get_dashboard | Get dashboards resource |\n| configapi | get_drop_rule | Get drop-rules resource |\n| configapi | get_mapping_rule | Get mapping-rules resource |\n| configapi | get_monitor | Get monitors resource |\n| configapi | get_notification_policy | Get notification-policies resource |\n| configapi | get_recording_rule | Get recording-rules resource |\n| configapi | get_rollup_rule | Get rollup-rules resource |\n| configapi | get_slo | Get slos resource |\n| configapi | list_classic_dashboards | List classic-dashboards resources |\n| configapi | list_dashboards | List dashboards resources |\n| configapi | list_drop_rules | List drop-rules resources |\n| configapi | list_mapping_rules | List mapping-rules resources |\n| configapi | list_monitors | List monitors resources |\n| configapi | list_notification_policies | List notification-policies resources |\n| configapi | list_recording_rules | List recording-rules resources |\n| configapi | list_rollup_rules | List rollup-rules resources |\n| configapi | list_slos | List slos resources |\n| configapi | update_dashboard | Replace a dashboard identified by slug. Use dry_run to validate without saving. |\n| events | get_events_metadata | List properties you can query on events |\n| events | list_events | List events from a given query |\n| events | list_events_label_values | List values for a given label name |\n| logs | get_log | Get a full log message by its ID. The ID is the unique identifier for the log. |\n| logs | get_log_histogram | Get histogram of logs from a given query |\n| logs | list_log_field_names | List field names of logs |\n| logs | list_log_field_values | List field values of logs |\n| logs | query_logs_range | Execute a range query for logs. This endpoint returns logs as either timeSeries or gridData. It may return a large amount of data, so be careful putting the result of this direction into context. U... |\n| metrics | list_prometheus_label_names | Returns the list of label names (keys) available on metrics that match the given selectors. Use this tool when you need to discover what labels are available on specific metrics or services. Exampl... |\n| metrics | list_prometheus_label_values | Returns the list of values for a specific label name, optionally filtered by selectors. Use this tool when you know the label name and want to discover what values it has across your metrics. Commo... |\n| metrics | list_prometheus_series | Returns the complete time series (full label sets with all key-value pairs) that match the given selectors. Each result shows the exact combination of labels for an active time series. Use this too... |\n| metrics | list_prometheus_series_metadata |  |\n| metrics | query_prometheus_instant | Evaluates a Prometheus instant query at a single point in time |\n| metrics | query_prometheus_range | Executes a Prometheus PromQL query over a specified time range and returns time series data points as JSON. Supports standard PromQL syntax plus Chronosphere custom functions: - cardinality_estimat... |\n| metrics | render_prometheus_range_query | Evaluates a Prometheus expression query over a range of time and renders it as a PNG image. |\n| metric_usage | list_metric_usages_by_label_name | Lists metric usage statistics grouped by label name. Use this to find unused or high-cardinality labels that could be dropped. |\n| metric_usage | list_metric_usages_by_metric_name | Lists metric usage statistics grouped by metric name. Use this to find unused or underutilized metrics that could be dropped to reduce costs. |\n| metric_usage | list_rule_evaluations | Lists rule evaluation issues for monitors and recording rules. Use this to identify monitors or recording rules that are failing or having problems. |\n| monitors | list_monitor_statuses | Lists the current status of monitors in Chronosphere. Returns monitor statuses with alert states and optional signal and series details. |\n| traces | list_traces | List traces from a given query |\n\n*Note: To regenerate this table after tool updates, run: `make tools-gen && go run scripts/generate-tools-table.go`*\n\n### Releases\nWe use [goreleaser](https://goreleaser.com/) to manage releases.\n\nYou'll need a [github token](https://github.com/settings/personal-access-tokens/) and put it in a .github_release_token file.\nThe token needs at least the following [permissions](https://goreleaser.com/ci/actions/#token-permissions)\n- `content: write`\n- `issues: write`\n\nTo create a new release, first create a tag:\n```sh\ngit tag vX.Y.Z\ngit push origin vX.Y.Z\n```\n\nThen run the following command to perform a dry run of the release:\n\n```\n```sh\nmake release-dry-run\n# verify the release looks good, then run:\nmake release\n```\n",
  "bytes": 10399,
  "sha": "6fe8c6cfb58329373b806453fcfff9250cf6863538e15424f8b2f0ebfc7f87ec",
  "repo_slug": "chronosphereio/chronosphere-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_chronosphereio_chronosphere_mcp_e7cd4544/readme"
}