@florentleveque/mural-mcp-serveur 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Mural MCP Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,301 @@
1
+ # Mural MCP Serveur
2
+
3
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
4
+
5
+ A Model Context Protocol (MCP) server that provides integration with the Mural visual collaboration platform. This server enables AI assistants to interact with Mural workspaces through OAuth 2.0 authentication.
6
+
7
+ > Broad read/write access to the Mural public API — workspaces, rooms, templates, murals (full CRUD) and widgets — over OAuth 2.0 with PKCE.
8
+
9
+ ## Features
10
+
11
+ - **OAuth 2.0 Authentication**: Secure authentication with PKCE support
12
+ - **Workspaces & Rooms**: list workspaces and rooms (incl. open rooms), create rooms
13
+ - **Templates**: list/search a workspace's templates, create a mural from a template
14
+ - **Murals**: full CRUD — create (blank or from template), read, update, delete, duplicate, export
15
+ - **Widgets**: read, create and update sticky notes, shapes, arrows, text boxes, titles and areas; delete widgets
16
+ - **Pagination**: list endpoints follow the API cursor to return all items
17
+ - **MCP Compliance**: Full Model Context Protocol compatibility
18
+ - **Token Management**: Automatic token refresh and secure storage
19
+
20
+ ## Tools Available
21
+
22
+ **Authentication & utilities**
23
+ - `test-connection`: Test the connection to Mural API and verify authentication
24
+ - `clear-auth`: Clear stored authentication tokens (forces re-authentication)
25
+ - `check-user-scopes`: Show the current token's OAuth scopes
26
+ - `get-rate-limit-status`: Current rate-limiting status
27
+ - `debug-api-response`: Raw workspaces API response (troubleshooting)
28
+
29
+ **Workspaces**
30
+ - `list-workspaces`: List all workspaces the authenticated user has access to
31
+ - `get-workspace`: Get detailed information about a specific workspace
32
+
33
+ **Rooms**
34
+ - `list-workspace-rooms`: List a workspace's rooms (option `openOnly`)
35
+ - `list-room-boards`: List the murals within a room
36
+ - `create-room`: Create a room (`open`/`private`)
37
+
38
+ **Templates**
39
+ - `list-workspace-templates`: List a workspace's templates (default + custom), or search by name
40
+ - `create-mural-from-template`: Create a mural in a room from a template
41
+
42
+ **Murals**
43
+ - `list-workspace-boards`: List a workspace's murals
44
+ - `get-board`: Get details of a specific mural
45
+ - `create-mural`: Create a blank mural in a room
46
+ - `update-mural`: Update a mural (title, status `active`/`archived`, dimensions, sharing…)
47
+ - `delete-mural`: Permanently delete a mural (irreversible)
48
+ - `duplicate-mural`: Duplicate a mural into a room
49
+ - `export-mural`: Export a mural in a given format
50
+
51
+ **Widgets**
52
+ - `get-mural-widgets`: Get all widgets of a mural (paginated)
53
+ - `get-mural-widget`: Get a specific widget by id
54
+ - `create-sticky-notes`: Create sticky notes (up to 1000 per request)
55
+ - `update-sticky-note`: Update a sticky note
56
+ - `create-shapes` / `create-arrows` / `create-text-boxes` / `create-titles` / `create-areas`: Create the corresponding widgets
57
+ - `update-widget`: Update any widget by kind and id
58
+ - `delete-widget`: Permanently delete a widget by id
59
+
60
+ > Write operations require the matching OAuth scopes (`rooms:write`, `murals:write`, `templates:write`).
61
+
62
+ ## Prerequisites
63
+
64
+ 1. **Node.js**: Version 18 or higher
65
+ 2. **Mural Account**: Access to Mural with workspace permissions
66
+ 3. **Mural OAuth App**: Register an app at [Mural Developer Portal](https://app.mural.co/developer)
67
+
68
+ ## Installation
69
+
70
+ ### Option 1: Install from npm (Recommended)
71
+
72
+ ```bash
73
+ npm install -g @florentleveque/mural-mcp-serveur
74
+ # or
75
+ pnpm add -g @florentleveque/mural-mcp-serveur
76
+ ```
77
+
78
+ ### Option 2: Install from source
79
+
80
+ 1. Clone and install dependencies:
81
+ ```bash
82
+ git clone https://github.com/florentleveque/mural-mcp-serveur.git
83
+ cd mural-mcp-serveur
84
+ pnpm install
85
+ ```
86
+
87
+ 2. Build the project:
88
+ ```bash
89
+ pnpm run build
90
+ ```
91
+
92
+ ## Setup
93
+
94
+ 1. Set up environment variables:
95
+ ```bash
96
+ cp .env.example .env
97
+ # Edit .env with your Mural OAuth credentials
98
+ ```
99
+
100
+ ## Configuration
101
+
102
+ ### Environment Variables
103
+
104
+ Create a `.env` file with the following variables:
105
+
106
+ ```bash
107
+ # Required: Your Mural app's client ID
108
+ MURAL_CLIENT_ID=your_client_id_here
109
+
110
+ # Required: Your Mural app's client secret (Mural requires it for the token exchange)
111
+ MURAL_CLIENT_SECRET=your_client_secret_here
112
+
113
+ # Optional: OAuth redirect URI (defaults to http://localhost:3000/callback)
114
+ MURAL_REDIRECT_URI=http://localhost:3000/callback
115
+ ```
116
+
117
+ > Both `MURAL_CLIENT_ID` **and** `MURAL_CLIENT_SECRET` are required: Mural mandates client authentication (the secret) on every token exchange — there is no public-client / PKCE-without-secret mode.
118
+
119
+ ### Mural OAuth App Setup (step by step)
120
+
121
+ You need your own Mural OAuth app. A regular Mural account is enough (no separate developer account).
122
+
123
+ 1. Sign in at [app.mural.co](https://app.mural.co).
124
+ 2. Open **"Create and manage apps"** (from your account/avatar menu) → the **"My apps"** page.
125
+ 3. Click **"New app"**.
126
+ 4. Fill in **App name** (e.g. `mural-mcp`) and **Redirect URL** = `http://localhost:3000/callback`, then **"Save and continue"**.
127
+ 5. On the **Basic Information** page, copy your **Client ID** and **Client secret**.
128
+ - ⚠️ The **Client secret is shown only once** — copy it right away (if lost, use **Reset** to regenerate one).
129
+ 6. Tick the **Authorization scopes** the server uses, then save:
130
+ `workspaces:read`, `rooms:read`, `rooms:write`, `murals:read`, `murals:write`, `templates:read`, `templates:write`, `identity:read`.
131
+ 7. Set both values as `MURAL_CLIENT_ID` / `MURAL_CLIENT_SECRET` in your client config.
132
+
133
+ > No approval is required — the app works immediately, and `http://localhost` is accepted for local use.
134
+
135
+ ## Usage
136
+
137
+ The easiest way is via `npx` (no install needed, always the latest published version).
138
+
139
+ ### With Claude Code (CLI)
140
+
141
+ ```bash
142
+ claude mcp add mural \
143
+ -e MURAL_CLIENT_ID=your_client_id_here \
144
+ -e MURAL_CLIENT_SECRET=your_client_secret_here \
145
+ -- npx -y @florentleveque/mural-mcp-serveur
146
+ ```
147
+
148
+ (add `--scope user` to make it available in all your projects, or `--scope project` to share it via the repo's `.mcp.json`).
149
+
150
+ ### With Claude Desktop
151
+
152
+ Add to your Claude Desktop configuration (`claude_desktop_config.json`), then restart Claude Desktop:
153
+
154
+ ```json
155
+ {
156
+ "mcpServers": {
157
+ "mural": {
158
+ "command": "npx",
159
+ "args": ["-y", "@florentleveque/mural-mcp-serveur"],
160
+ "env": {
161
+ "MURAL_CLIENT_ID": "your_client_id_here",
162
+ "MURAL_CLIENT_SECRET": "your_client_secret_here"
163
+ }
164
+ }
165
+ }
166
+ }
167
+ ```
168
+
169
+ > Installed from source instead? Use `"command": "node", "args": ["/absolute/path/to/mural-mcp-serveur/build/index.js"]`.
170
+
171
+ ### Standalone Usage
172
+
173
+ Run the server directly:
174
+
175
+ ```bash
176
+ # Set environment variables
177
+ export MURAL_CLIENT_ID=your_client_id_here
178
+ export MURAL_CLIENT_SECRET=your_client_secret_here
179
+
180
+ # Start the server
181
+ pnpm start
182
+ ```
183
+
184
+ ### Development
185
+
186
+ For development with hot reloading:
187
+
188
+ ```bash
189
+ pnpm run dev
190
+ ```
191
+
192
+ ## Authentication Flow
193
+
194
+ 1. **First Run**: The server will open a browser window for OAuth authentication
195
+ 2. **Login**: Complete the OAuth flow in your browser
196
+ 3. **Token Storage**: Tokens are securely stored locally in `~/.mural-mcp-tokens.json`
197
+ 4. **Auto-Refresh**: Access tokens are automatically refreshed when needed
198
+
199
+ ## API Endpoints Used
200
+
201
+ - **Authorization**: `https://app.mural.co/api/public/v1/authorization/oauth2/`
202
+ - **Token Exchange**: `https://app.mural.co/api/public/v1/authorization/oauth2/token`
203
+ - **Workspaces**: `https://app.mural.co/api/public/v1/workspaces`
204
+
205
+ ## Example Usage
206
+
207
+ Once configured, you can use the tools through your MCP client:
208
+
209
+ ```
210
+ Human: List my Mural workspaces
211
+ Assistant: I'll list your Mural workspaces using the list-workspaces tool.
212
+
213
+ [Tool executes and returns workspace data]
214
+ ```
215
+
216
+ ## Security Considerations
217
+
218
+ - **PKCE**: Uses Proof Key for Code Exchange for enhanced OAuth security
219
+ - **Token Storage**: Tokens are stored locally in the user's home directory
220
+ - **HTTPS**: All API communications use HTTPS
221
+ - **Scope Limitation**: Requests only necessary OAuth scopes
222
+
223
+ ## Troubleshooting
224
+
225
+ ### Authentication Issues
226
+
227
+ 1. **Token Expired**: Use the `clear-auth` tool to clear tokens and re-authenticate
228
+ 2. **Invalid Client ID**: Verify your `MURAL_CLIENT_ID` in the environment variables
229
+ 3. **Redirect URI Mismatch**: Ensure the redirect URI matches your Mural app configuration
230
+
231
+ ### Connection Issues
232
+
233
+ 1. **Network**: Ensure you can reach `https://app.mural.co`
234
+ 2. **Firewall**: Port 3000 must be available for OAuth callback
235
+ 3. **Test Connection**: Use the `test-connection` tool to verify API access
236
+
237
+ ### Common Error Messages
238
+
239
+ - `Missing required environment variable: MURAL_CLIENT_ID`: Set the required environment variable
240
+ - `OAuth token exchange failed`: Check your client credentials and redirect URI
241
+ - `Mural API request failed: HTTP 401`: Token expired or invalid, clear auth and re-authenticate
242
+ - `Mural API request failed: HTTP 403`: Insufficient permissions or invalid scope
243
+
244
+ ## Development
245
+
246
+ ### Project Structure
247
+
248
+ ```
249
+ mural-mcp-serveur/
250
+ ├── src/
251
+ │ ├── index.ts # Main MCP server (tool definitions + handlers)
252
+ │ ├── oauth.ts # OAuth 2.0 implementation
253
+ │ ├── mural-client.ts # Mural API client
254
+ │ ├── rate-limiter.ts # API rate limiting
255
+ │ └── types.ts # TypeScript interfaces
256
+ ├── build/ # Compiled output
257
+ ├── spec/ # Documentation
258
+ └── package.json
259
+ ```
260
+
261
+ ### Building
262
+
263
+ ```bash
264
+ # Clean build
265
+ rm -rf build && pnpm run build
266
+
267
+ # Development build with watch
268
+ pnpm run dev
269
+ ```
270
+
271
+ ### Testing
272
+
273
+ Test the server manually:
274
+
275
+ ```bash
276
+ # Build and run
277
+ pnpm run build
278
+ node build/index.js
279
+
280
+ # In another terminal, test with MCP inspector
281
+ npx @modelcontextprotocol/inspector node build/index.js
282
+ ```
283
+
284
+ ## Contributing
285
+
286
+ 1. Fork the repository
287
+ 2. Create a feature branch
288
+ 3. Make your changes
289
+ 4. Add tests if applicable
290
+ 5. Submit a pull request
291
+
292
+ ## License
293
+
294
+ MIT License - see LICENSE file for details
295
+
296
+ ## Support
297
+
298
+ For issues and questions:
299
+ - Check the troubleshooting section above
300
+ - Review Mural API documentation
301
+ - Create an issue in the repository
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import 'dotenv/config';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,eAAe,CAAC"}