Skip to content

Commit 4b58018

Browse files
authored
feat: dotenv config files and plugin registry support (#75)
Add support for loading configuration from project-level .mcp-outline.env and user-level ~/.config/mcp-outline/.env, with empty env var stripping for Claude Code compatibility. Add plugin/registry metadata (.claude-plugin/, .mcp.json, server.json, glama.json) for discoverability across Claude Code, VS Code, Glama, and the official MCP registry. New dependency: python-dotenv>=1.0.0
1 parent e265f88 commit 4b58018

File tree

15 files changed

+485
-33
lines changed

15 files changed

+485
-33
lines changed

.claude-plugin/marketplace.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"name": "mcp-outline",
3+
"owner": {
4+
"name": "Vortiago",
5+
"url": "https://github.com/Vortiago"
6+
},
7+
"metadata": {
8+
"description": "Outline knowledge base integration for Claude Code"
9+
},
10+
"plugins": [
11+
{
12+
"name": "mcp-outline",
13+
"source": "./",
14+
"description": "Connect Claude Code to Outline for document search, reading, creation, and management",
15+
"version": "1.6.0",
16+
"author": {
17+
"name": "Vortiago"
18+
},
19+
"license": "MIT"
20+
}
21+
]
22+
}

.claude-plugin/plugin.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "mcp-outline",
3+
"description": "Connect Claude Code to Outline for document search, reading, creation, and management",
4+
"version": "1.6.0",
5+
"author": {
6+
"name": "Vortiago"
7+
},
8+
"homepage": "https://github.com/Vortiago/mcp-outline",
9+
"repository": "https://github.com/Vortiago/mcp-outline",
10+
"license": "MIT",
11+
"keywords": [
12+
"outline",
13+
"documents",
14+
"wiki",
15+
"knowledge-base",
16+
"mcp"
17+
]
18+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Publish to MCP Registry
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
publish:
10+
name: Publish to MCP Registry
11+
runs-on: ubuntu-latest
12+
permissions:
13+
id-token: write # Required for GitHub OIDC authentication
14+
contents: read
15+
16+
steps:
17+
- uses: actions/checkout@v6
18+
19+
- name: Update server.json version from tag
20+
run: |
21+
VERSION="${GITHUB_REF_NAME#v}"
22+
jq --arg v "$VERSION" '.version = $v | .packages[0].version = $v' server.json > server.json.tmp
23+
mv server.json.tmp server.json
24+
cat server.json
25+
26+
- name: Install mcp-publisher
27+
run: |
28+
curl -fsSL "https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz" | tar xz mcp-publisher
29+
30+
- name: Publish to MCP Registry
31+
run: ./mcp-publisher publish

.mcp.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"mcpServers": {
3+
"outline": {
4+
"command": "uvx",
5+
"args": ["mcp-outline"],
6+
"env": {
7+
"OUTLINE_API_KEY": "${OUTLINE_API_KEY:-}",
8+
"OUTLINE_API_URL": "${OUTLINE_API_URL:-}",
9+
"OUTLINE_READ_ONLY": "${OUTLINE_READ_ONLY:-}",
10+
"OUTLINE_DISABLE_DELETE": "${OUTLINE_DISABLE_DELETE:-}",
11+
"OUTLINE_DISABLE_AI_TOOLS": "${OUTLINE_DISABLE_AI_TOOLS:-}",
12+
"OUTLINE_VERIFY_SSL": "${OUTLINE_VERIFY_SSL:-}"
13+
}
14+
}
15+
}
16+
}

README.md

Lines changed: 57 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,16 @@ Before using this MCP server, you need:
2929
3030
## Quick Start
3131

32+
### One-Click Install
33+
34+
Click a button to install with interactive API key prompt:
35+
36+
[![Install in VS Code](https://img.shields.io/badge/Install_in-VS_Code-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect/mcp/install?name=mcp-outline&inputs=%5B%7B%22id%22%3A%22outline_api_key%22%2C%22type%22%3A%22promptString%22%2C%22description%22%3A%22Enter%20OUTLINE_API_KEY%22%2C%22password%22%3Atrue%7D%2C%7B%22id%22%3A%22outline_api_url%22%2C%22type%22%3A%22promptString%22%2C%22description%22%3A%22Outline%20API%20URL%20(optional%2C%20for%20self-hosted)%22%2C%22password%22%3Afalse%7D%5D&config=%7B%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22mcp-outline%22%5D%2C%22env%22%3A%7B%22OUTLINE_API_KEY%22%3A%22%24%7Binput%3Aoutline_api_key%7D%22%2C%22OUTLINE_API_URL%22%3A%22%24%7Binput%3Aoutline_api_url%7D%22%7D%7D)
37+
[![Install in VS Code Insiders](https://img.shields.io/badge/Install_in-VS_Code_Insiders-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=mcp-outline&inputs=%5B%7B%22id%22%3A%22outline_api_key%22%2C%22type%22%3A%22promptString%22%2C%22description%22%3A%22Enter%20OUTLINE_API_KEY%22%2C%22password%22%3Atrue%7D%2C%7B%22id%22%3A%22outline_api_url%22%2C%22type%22%3A%22promptString%22%2C%22description%22%3A%22Outline%20API%20URL%20(optional%2C%20for%20self-hosted)%22%2C%22password%22%3Afalse%7D%5D&config=%7B%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22mcp-outline%22%5D%2C%22env%22%3A%7B%22OUTLINE_API_KEY%22%3A%22%24%7Binput%3Aoutline_api_key%7D%22%2C%22OUTLINE_API_URL%22%3A%22%24%7Binput%3Aoutline_api_url%7D%22%7D%7D&quality=insiders)
38+
[![Install in Cursor](https://img.shields.io/badge/Install_in-Cursor-000000?style=flat-square&logoColor=white)](https://cursor.com/en/install-mcp?name=mcp-outline&config=eyJjb21tYW5kIjoidXZ4IiwiYXJncyI6WyJtY3Atb3V0bGluZSJdLCJlbnYiOnsiT1VUTElORV9BUElfS0VZIjoiJHtpbnB1dDpvdXRsaW5lX2FwaV9rZXl9IiwiT1VUTElORV9BUElfVVJMIjoiJHtpbnB1dDpvdXRsaW5lX2FwaV91cmx9In0sImlucHV0cyI6W3siaWQiOiJvdXRsaW5lX2FwaV9rZXkiLCJ0eXBlIjoicHJvbXB0U3RyaW5nIiwiZGVzY3JpcHRpb24iOiJFbnRlciBPVVRMSU5FX0FQSV9LRVkiLCJwYXNzd29yZCI6dHJ1ZX0seyJpZCI6Im91dGxpbmVfYXBpX3VybCIsInR5cGUiOiJwcm9tcHRTdHJpbmciLCJkZXNjcmlwdGlvbiI6Ik91dGxpbmUgQVBJIFVSTCAob3B0aW9uYWwsIGZvciBzZWxmLWhvc3RlZCkiLCJwYXNzd29yZCI6ZmFsc2V9XX0=)
39+
40+
### Manual Install
41+
3242
Install with uv (recommended), pip, or Docker:
3343

3444
```bash
@@ -41,7 +51,49 @@ pip install mcp-outline # using pip
4151
docker run -e OUTLINE_API_KEY=<your-key> ghcr.io/vortiago/mcp-outline:latest
4252
```
4353

44-
Then add to your MCP client. Example for **Claude Desktop** (`~/Library/Application Support/Claude/claude_desktop_config.json`):
54+
Then add to your MCP client config (works with VS Code, Claude Desktop, Cursor, and others):
55+
56+
```json
57+
{
58+
"inputs": [
59+
{
60+
"id": "outline_api_key",
61+
"type": "promptString",
62+
"description": "Enter OUTLINE_API_KEY",
63+
"password": true
64+
},
65+
{
66+
"id": "outline_api_url",
67+
"type": "promptString",
68+
"description": "Outline API URL (optional, for self-hosted)",
69+
"password": false
70+
}
71+
],
72+
"servers": {
73+
"mcp-outline": {
74+
"command": "uvx",
75+
"args": ["mcp-outline"],
76+
"env": {
77+
"OUTLINE_API_KEY": "${input:outline_api_key}",
78+
"OUTLINE_API_URL": "${input:outline_api_url}"
79+
}
80+
}
81+
}
82+
}
83+
```
84+
85+
<details>
86+
<summary>Claude Code</summary>
87+
88+
```bash
89+
claude mcp add mcp-outline uvx mcp-outline
90+
```
91+
</details>
92+
93+
<details>
94+
<summary>Claude Desktop</summary>
95+
96+
Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:
4597

4698
```json
4799
{
@@ -51,20 +103,21 @@ Then add to your MCP client. Example for **Claude Desktop** (`~/Library/Applicat
51103
"args": ["mcp-outline"],
52104
"env": {
53105
"OUTLINE_API_KEY": "<YOUR_API_KEY>",
54-
"OUTLINE_API_URL": "<YOUR_OUTLINE_URL>" // Optional
106+
"OUTLINE_API_URL": "<YOUR_OUTLINE_URL>"
55107
}
56108
}
57109
}
58110
}
59111
```
112+
</details>
60113

61-
Setup guides for other clients: [Cursor, VS Code, Cline, Docker (HTTP), pip](docs/client-setup.md)
114+
Setup guides for more clients: [Docker (HTTP), Cline, Codex, Windsurf, and others](docs/client-setup.md)
62115

63116
## Configuration
64117

65118
| Variable | Required | Default | Notes |
66119
|----------|----------|---------|-------|
67-
| `OUTLINE_API_KEY` | Yes* | - | Required for stdio transport. For SSE/HTTP, can be provided per-user via `x-outline-api-key` header instead ([details](docs/configuration.md#per-user-outline-api-keys)) |
120+
| `OUTLINE_API_KEY` | Yes* | - | Required for tool calls to succeed. For SSE/HTTP, can alternatively be provided per-request via `x-outline-api-key` header ([details](docs/configuration.md#per-user-outline-api-keys)) |
68121
| `OUTLINE_API_URL` | No | `https://app.getoutline.com/api` | For self-hosted: `https://your-domain/api` |
69122
| `OUTLINE_VERIFY_SSL` | No | `true` | Set `false` for self-signed certificates |
70123
| `OUTLINE_READ_ONLY` | No | `false` | `true` = disable ALL write operations ([details](docs/configuration.md#read-only-mode)) |

docs/client-setup.md

Lines changed: 63 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -25,51 +25,57 @@ Edit `~/Library/Application Support/Claude/claude_desktop_config.json` (or `%APP
2525

2626
## Cursor
2727

28-
Go to **Settings → MCP** and click **Add Server**:
28+
**One-click install**: [![Install in Cursor](https://img.shields.io/badge/Install_in-Cursor-000000?style=flat-square&logoColor=white)](https://cursor.com/en/install-mcp?name=mcp-outline&config=eyJjb21tYW5kIjoidXZ4IiwiYXJncyI6WyJtY3Atb3V0bGluZSJdLCJlbnYiOnsiT1VUTElORV9BUElfS0VZIjoiJHtpbnB1dDpvdXRsaW5lX2FwaV9rZXl9IiwiT1VUTElORV9BUElfVVJMIjoiJHtpbnB1dDpvdXRsaW5lX2FwaV91cmx9In0sImlucHV0cyI6W3siaWQiOiJvdXRsaW5lX2FwaV9rZXkiLCJ0eXBlIjoicHJvbXB0U3RyaW5nIiwiZGVzY3JpcHRpb24iOiJFbnRlciBPVVRMSU5FX0FQSV9LRVkiLCJwYXNzd29yZCI6dHJ1ZX0seyJpZCI6Im91dGxpbmVfYXBpX3VybCIsInR5cGUiOiJwcm9tcHRTdHJpbmciLCJkZXNjcmlwdGlvbiI6Ik91dGxpbmUgQVBJIFVSTCAob3B0aW9uYWwsIGZvciBzZWxmLWhvc3RlZCkiLCJwYXNzd29yZCI6ZmFsc2V9XX0=)
29+
30+
Or go to **Settings → MCP** and click **Add Server**:
2931

3032
```json
3133
{
3234
"mcp-outline": {
3335
"command": "uvx",
3436
"args": ["mcp-outline"],
3537
"env": {
36-
"OUTLINE_API_KEY": "<YOUR_API_KEY>",
37-
"OUTLINE_API_URL": "<YOUR_OUTLINE_URL>" // Optional
38-
}
38+
"OUTLINE_API_KEY": "${input:outline_api_key}",
39+
"OUTLINE_API_URL": "${input:outline_api_url}"
40+
},
41+
"inputs": [
42+
{
43+
"id": "outline_api_key",
44+
"type": "promptString",
45+
"description": "Enter OUTLINE_API_KEY",
46+
"password": true
47+
},
48+
{
49+
"id": "outline_api_url",
50+
"type": "promptString",
51+
"description": "Outline API URL (optional, for self-hosted)",
52+
"password": false
53+
}
54+
]
3955
}
4056
}
4157
```
4258

4359
## VS Code
4460

45-
Create a `.vscode/mcp.json` file in your workspace:
46-
47-
```json
48-
{
49-
"servers": {
50-
"mcp-outline": {
51-
"type": "stdio",
52-
"command": "uvx",
53-
"args": ["mcp-outline"],
54-
"env": {
55-
"OUTLINE_API_KEY": "<YOUR_API_KEY>",
56-
"OUTLINE_API_URL": "<YOUR_OUTLINE_URL>" // Optional
57-
}
58-
}
59-
}
60-
}
61-
```
61+
**One-click install**: [![Install in VS Code](https://img.shields.io/badge/Install_in-VS_Code-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect/mcp/install?name=mcp-outline&inputs=%5B%7B%22id%22%3A%22outline_api_key%22%2C%22type%22%3A%22promptString%22%2C%22description%22%3A%22Enter%20OUTLINE_API_KEY%22%2C%22password%22%3Atrue%7D%2C%7B%22id%22%3A%22outline_api_url%22%2C%22type%22%3A%22promptString%22%2C%22description%22%3A%22Outline%20API%20URL%20(optional%2C%20for%20self-hosted)%22%2C%22password%22%3Afalse%7D%5D&config=%7B%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22mcp-outline%22%5D%2C%22env%22%3A%7B%22OUTLINE_API_KEY%22%3A%22%24%7Binput%3Aoutline_api_key%7D%22%2C%22OUTLINE_API_URL%22%3A%22%24%7Binput%3Aoutline_api_url%7D%22%7D%7D)
6262

63-
**Optional**: Use input variables for sensitive credentials:
63+
Or create a `.vscode/mcp.json` file in your workspace (recommended — uses secure password prompts):
6464

6565
```json
6666
{
6767
"inputs": [
6868
{
6969
"type": "promptString",
70-
"id": "outline-api-key",
71-
"description": "Outline API Key",
70+
"id": "outline_api_key",
71+
"description": "Enter OUTLINE_API_KEY",
7272
"password": true
73+
},
74+
{
75+
"type": "promptString",
76+
"id": "outline_api_url",
77+
"description": "Outline API URL (optional, for self-hosted)",
78+
"password": false
7379
}
7480
],
7581
"servers": {
@@ -78,13 +84,20 @@ Create a `.vscode/mcp.json` file in your workspace:
7884
"command": "uvx",
7985
"args": ["mcp-outline"],
8086
"env": {
81-
"OUTLINE_API_KEY": "${input:outline-api-key}"
87+
"OUTLINE_API_KEY": "${input:outline_api_key}",
88+
"OUTLINE_API_URL": "${input:outline_api_url}"
8289
}
8390
}
8491
}
8592
}
8693
```
8794

95+
You can also install via the CLI:
96+
97+
```bash
98+
code --add-mcp '{"name":"mcp-outline","command":"uvx","args":["mcp-outline"],"env":{"OUTLINE_API_KEY":"${input:outline_api_key}","OUTLINE_API_URL":"${input:outline_api_url}"},"inputs":[{"id":"outline_api_key","type":"promptString","description":"Enter OUTLINE_API_KEY","password":true},{"id":"outline_api_url","type":"promptString","description":"Outline API URL (optional, for self-hosted)","password":false}]}'
99+
```
100+
88101
See the [official VS Code MCP documentation](https://code.visualstudio.com/docs/copilot/chat/mcp-servers) for more details.
89102

90103
## Cline (VS Code)
@@ -104,6 +117,31 @@ In Cline extension settings, add to MCP servers:
104117
}
105118
```
106119

120+
## Claude Code (Plugin)
121+
122+
Install directly as a Claude Code plugin from GitHub:
123+
124+
```bash
125+
/plugin marketplace add Vortiago/mcp-outline
126+
/plugin install mcp-outline@mcp-outline
127+
```
128+
129+
Or test locally during development:
130+
131+
```bash
132+
claude --plugin-dir ./path-to-mcp-outline
133+
```
134+
135+
Set your Outline API key in your shell profile (`~/.bashrc` or `~/.zshrc`):
136+
137+
```bash
138+
export OUTLINE_API_KEY="your-api-key-here"
139+
# For self-hosted Outline:
140+
export OUTLINE_API_URL="https://your-instance.example.com/api"
141+
```
142+
143+
Restart Claude Code after setting environment variables. If `OUTLINE_API_KEY` is not configured, each tool call will return an error with setup instructions.
144+
107145
## Using pip Instead of uvx
108146

109147
If you prefer to use `pip` instead:

docs/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Then connect from your client with a user-specific key:
8787
}
8888
```
8989

90-
> **Note:** The `x-outline-api-key` header is only available for HTTP transports. In `stdio` mode, the `OUTLINE_API_KEY` environment variable is the only option.
90+
> **Note:** The `x-outline-api-key` header is only available for HTTP transports (SSE, streamable-http). In `stdio` mode, you must set `OUTLINE_API_KEY` via environment variable or a [dotenv config file](client-setup.md#claude-code-plugin). If it is missing, the server still starts but every tool call will return an error with setup instructions.
9191
9292
### Dynamic Tool List
9393

docs/registries.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Registries & Marketplaces
2+
3+
Where mcp-outline is listed and which files control each listing.
4+
5+
| Registry | Config Files | Published How | Notes |
6+
|----------|-------------|---------------|-------|
7+
| **PyPI** | `pyproject.toml` | CI on tag (`publish.yml`) | Version from git tag via setuptools-scm |
8+
| **Docker (GHCR)** | `Dockerfile` | CI on tag | Image: `ghcr.io/vortiago/mcp-outline` |
9+
| **MCP Official Registry** | `server.json` | CI on tag (`publish-mcp-registry.yml`) | Version patched from tag at publish time |
10+
| **Glama** | `glama.json` | Manual claim at [glama.ai](https://glama.ai) | Only sets maintainer for ownership |
11+
| **Claude Code Plugin** | `.claude-plugin/plugin.json`, `.claude-plugin/marketplace.json`, `.mcp.json` | Repo discovery | Install: `/plugin marketplace add Vortiago/mcp-outline` |
12+
13+
## File reference
14+
15+
- **`server.json`** — MCP Registry server manifest. Schema: `2025-12-11`. Versions updated by CI at publish time.
16+
- **`glama.json`** — Glama ownership claim. Minimal: just `$schema` + `maintainers`.
17+
- **`.claude-plugin/plugin.json`** — Claude Code plugin metadata (name, description, keywords).
18+
- **`.claude-plugin/marketplace.json`** — Claude Code marketplace entry. Lists plugins available from this repo.
19+
- **`.mcp.json`** — MCP server config used by the Claude Code plugin. Defines how to run the server with env vars.

glama.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"$schema": "https://glama.ai/mcp/schemas/server.json",
3+
"maintainers": [
4+
"Vortiago"
5+
]
6+
}

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ license-files = ["LICENSE"]
1515
dependencies = [
1616
"mcp[cli]>=1.20.0",
1717
"httpx>=0.27.0",
18+
"python-dotenv>=1.0.0",
1819
]
1920

2021
[project.scripts]

0 commit comments

Comments
 (0)