Skip to content

Commit efc3164

Browse files
committed
docs: added auth to readme
1 parent 7e0c153 commit efc3164

File tree

1 file changed

+48
-1
lines changed

1 file changed

+48
-1
lines changed

README.md

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,53 @@ mcp-server-drupal --version
5252
mcp-server-drupal --help
5353
```
5454

55+
## Authentication
56+
57+
The server supports both authentication via environment variables. You can use either a auth token or a basic auth with username and password combination . The following environment variables are supported:
58+
59+
- `DRUPAL_AUTH_TOKEN`: The authentication token.
60+
- `DRUPAL_AUTH_USER`: The username for authentication.
61+
- `DRUPAL_AUTH_PASSWORD`: The password for authentication.
62+
63+
> [!NOTE]
64+
> Make sure to turn the authentication on the Drupal MCP module settings page.
65+
66+
> [!NOTE]
67+
> If both `DRUPAL_AUTH_TOKEN` and `DRUPAL_AUTH_USER`/`DRUPAL_AUTH_PASSWORD` are set, the token will be used over the username and password.
68+
69+
Example usage with token:
70+
71+
```json
72+
{
73+
"mcpServers": {
74+
"mcp-server-drupal": {
75+
"command": "__BINARY_PATH__",
76+
"args": ["--drupal-url", "__DRUPAL_BASE_URL__"],
77+
"env": {
78+
"DRUPAL_AUTH_TOKEN": "<AUTH_TOKEN>"
79+
}
80+
}
81+
}
82+
}
83+
```
84+
85+
Example usage with username and password:
86+
87+
```json
88+
{
89+
"mcpServers": {
90+
"mcp-server-drupal": {
91+
"command": "__BINARY_PATH__",
92+
"args": ["--drupal-url", "__DRUPAL_BASE_URL__"],
93+
"env": {
94+
"DRUPAL_AUTH_USER": "<BASIC_AUTH_USERNAME>",
95+
"DRUPAL_AUTH_PASSWORD": "<BASIC_AUTH_PASSWORD>"
96+
}
97+
}
98+
}
99+
}
100+
```
101+
55102
## MCP
56103

57104
- All instruments are defined by the Drupal API during the initialization phase
@@ -114,4 +161,4 @@ cosign verify-blob ${YOUR_BINARY_NAME} \
114161
--certificate-oidc-issuer https://token.actions.githubusercontent.com \
115162
--certificate-identity-regexp https://github.com/Omedia/mcp-server-drupal/.github/workflows/release.yml@refs/tags/v \
116163
--certificate-github-workflow-repository Omedia/mcp-server-drupal
117-
```
164+
```

0 commit comments

Comments
 (0)