Skip to content

Commit fe3ae9f

Browse files
committed
Update README to include new installation instructions
1 parent b8a111c commit fe3ae9f

File tree

1 file changed

+35
-38
lines changed

1 file changed

+35
-38
lines changed

README.md

+35-38
Original file line numberDiff line numberDiff line change
@@ -45,49 +45,47 @@ This is useful if you don't use certain functionality or if you don't want to ta
4545
## Usage
4646

4747
1. Create a service account in Grafana with enough permissions to use the tools you want to use,
48-
generate a service account token, and copy it to the clipboard for use in the configuration file.
49-
Follow the [Grafana documentation][service-account] for details.
50-
51-
2. Add the server configuration to your client configuration file. For example, for Claude Desktop:
52-
53-
```json
54-
{
55-
"mcpServers": {
56-
"grafana": {
57-
"command": "uvx",
58-
"args": [
59-
"mcp-grafana"
60-
],
61-
"env": {
62-
"GRAFANA_URL": "http://localhost:3000",
63-
"GRAFANA_API_KEY": "<your service account token>"
64-
}
65-
}
66-
}
67-
}
68-
```
48+
generate a service account token, and copy it to the clipboard for use in the configuration file.
49+
Follow the [Grafana documentation][service-account] for details.
6950

70-
> Note: if you see `Error: spawn uvx ENOENT` in Claude Desktop, you need to specify the full path to `uvx` (see [discussion](https://github.com/orgs/modelcontextprotocol/discussions/20))
51+
2. Download the latest release of `mcp-grafana` from the [releases page](https://github.com/grafana/mcp-grafana/releases) and place it in your `$PATH`.
7152

72-
To disable a category of tools, set the environment variable `GRAFANA_TOOLS__<CATEGORY>__ENABLED` to `"false"`.
73-
For example, to disable the search tools, set `"GRAFANA_TOOLS__SEARCH__ENABLED": "false"`.
53+
If you have a Go toolchain installed you can also build and install it from source, using the `GOBIN` environment variable
54+
to specify the directory where the binary should be installed. This should also be in your `PATH`.
7455

75-
## Development
56+
```bash
57+
GOBIN="$HOME/go/bin" go install github.com/grafana/mcp-grafana@latest
58+
```
7659

77-
Contributions are welcome! Please open an issue or submit a pull request if you have any suggestions or improvements.
60+
3. Add the server configuration to your client configuration file. For example, for Claude Desktop:
7861

79-
This project uses [`uv`] to manage dependencies. Install `uv` following the instructions for your platform.
62+
```json
63+
{
64+
"mcpServers": {
65+
"grafana": {
66+
"command": "mcp-grafana",
67+
"args": [],
68+
"env": {
69+
"GRAFANA_URL": "http://localhost:3000",
70+
"GRAFANA_API_KEY": "<your service account token>"
71+
}
72+
}
73+
}
74+
}
75+
```
8076

81-
You can then create a virtual environment and install the dependencies with:
77+
> Note: if you see `Error: spawn mcp-grafana ENOENT` in Claude Desktop, you need to specify the full path to `mcp-grafana`.
8278
83-
```bash
84-
uv sync --all-groups
85-
```
79+
## Development
8680

87-
To run the server and edit the source code live, use:
81+
Contributions are welcome! Please open an issue or submit a pull request if you have any suggestions or improvements.
82+
83+
This project is written in Go. Install Go following the instructions for your platform.
84+
85+
To run the server, use:
8886

8987
```bash
90-
uvx --with-editable . mcp-grafana
88+
go run ./...
9189
```
9290

9391
You can also run the server using the SSE transport inside Docker. To build the image, use
@@ -104,14 +102,14 @@ docker run -it --rm -p 8000:8000 mcp-grafana:latest
104102

105103
### Testing
106104

107-
TL;DR: start a Grafana instance with `docker-compose up`, run `uv run ruff check .` for lints, and `uv run pytest tests --integration` to run unit and integration tests.
108-
109105
To run unit tests, run:
110106

111107
```bash
112-
uv run pytest tests
108+
go run ./...
113109
```
114110

111+
**TODO: add integration tests and cloud tests.**
112+
115113
More comprehensive integration tests will require a Grafana instance to be running locally on port 3000; you can start one with Docker Compose:
116114

117115
```bash
@@ -135,12 +133,11 @@ GRAFANA_URL=https://myinstance.grafana.net GRAFANA_API_KEY=my-api-key uv run pyt
135133

136134
### Linting
137135

138-
This project uses [ruff](https://github.com/charliermarsh/ruff) for linting.
136+
**TODO: add golangci-lint and document it here.**
139137

140138
## License
141139

142140
This project is licensed under the [Apache License, Version 2.0](LICENSE).
143141

144142
[mcp]: https://modelcontextprotocol.io/
145143
[service-account]: https://grafana.com/docs/grafana/latest/administration/service-accounts/
146-
[`uv`]: https://docs.astral.sh/uv/

0 commit comments

Comments
 (0)