Skip to content

Commit a9b0163

Browse files
committed
docs: comprehensive README improvements for better getting started experience
- Add complete prerequisites section (macOS, DEVONthink Pro, Node.js, Claude) - Add three installation options (npm global, npx, local development) - Add Claude Desktop configuration section with file location and all config options - Add comprehensive Claude Code section with CLI setup and scope configuration - Add detailed troubleshooting including real-world issues (tsc not found, restart requirements) - Fix dependency installation documentation to prevent TypeScript build errors - Improve verification and testing instructions for both Claude Desktop and Code
1 parent 6fb2827 commit a9b0163

1 file changed

Lines changed: 210 additions & 1 deletion

File tree

README.md

Lines changed: 210 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,35 @@ Returns:
120120
}
121121
```
122122

123-
## Usage with Claude
123+
## Getting Started
124+
125+
### Prerequisites
126+
127+
1. **DEVONthink Pro** - The DEVONthink application must be installed and running
128+
2. **Node.js** (v18 or later) - Required to run the MCP server
129+
3. **Claude Desktop or Claude Code** - To use the MCP server
130+
131+
### Installation
132+
133+
#### Option 1: Install from npm (Recommended)
134+
135+
```bash
136+
npm install -g mcp-server-devonthink
137+
```
138+
139+
Then add to your Claude configuration:
140+
141+
```json
142+
{
143+
"mcpServers": {
144+
"devonthink": {
145+
"command": "mcp-server-devonthink"
146+
}
147+
}
148+
}
149+
```
150+
151+
#### Option 2: Use via npx
124152

125153
Add to your Claude configuration:
126154

@@ -135,6 +163,187 @@ Add to your Claude configuration:
135163
}
136164
```
137165

166+
#### Option 3: Local Development Setup
167+
168+
If you want to modify or contribute to this project:
169+
170+
1. **Clone the repository:**
171+
```bash
172+
git clone https://github.com/dvcrn/mcp-server-devonthink.git
173+
cd mcp-server-devonthink
174+
```
175+
176+
2. **Install dependencies:**
177+
```bash
178+
npm install
179+
```
180+
181+
*Note: The project specifies Yarn as the package manager, but npm works fine for installation.*
182+
183+
**Important**: You must run `npm install` before building, as it installs TypeScript (`tsc`) and other build tools.
184+
185+
3. **Build the project:**
186+
```bash
187+
npm run build
188+
# or use the justfile if you have just installed
189+
just build
190+
```
191+
192+
4. **Test the server:**
193+
```bash
194+
node dist/index.js
195+
```
196+
197+
The server should start without errors. Press Ctrl+C to stop.
198+
199+
5. **Add to Claude configuration:**
200+
```json
201+
{
202+
"mcpServers": {
203+
"devonthink": {
204+
"command": "node",
205+
"args": ["/path/to/mcp-server-devonthink/dist/index.js"]
206+
}
207+
}
208+
}
209+
```
210+
211+
### Claude Configuration
212+
213+
Your Claude Desktop configuration file is located at:
214+
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
215+
216+
Create or update this file with the MCP server configuration. Choose the configuration that matches your installation method:
217+
218+
**Option 1: Global npm installation**
219+
```json
220+
{
221+
"mcpServers": {
222+
"devonthink": {
223+
"command": "mcp-server-devonthink"
224+
}
225+
}
226+
}
227+
```
228+
229+
**Option 2: Using npx**
230+
```json
231+
{
232+
"mcpServers": {
233+
"devonthink": {
234+
"command": "npx",
235+
"args": ["-y", "mcp-server-devonthink"]
236+
}
237+
}
238+
}
239+
```
240+
241+
**Option 3: Local development setup**
242+
```json
243+
{
244+
"mcpServers": {
245+
"devonthink": {
246+
"command": "node",
247+
"args": ["/path/to/mcp-server-devonthink/dist/index.js"]
248+
}
249+
}
250+
}
251+
```
252+
*Replace `/path/to/mcp-server-devonthink` with your actual project directory path.*
253+
254+
## Usage with Claude Desktop
255+
256+
1. **Start DEVONthink** - Ensure DEVONthink Pro is running
257+
2. **Restart Claude Desktop** - After updating the configuration
258+
3. **Test the connection** - In Claude, try asking: "Is DEVONthink running?"
259+
260+
If everything is set up correctly, Claude should be able to use the `is_running` tool and confirm that DEVONthink is active.
261+
262+
## Usage with Claude Code
263+
264+
Claude Code users can install this MCP server using the command-line interface. Based on testing experience, here's the complete setup process:
265+
266+
### Prerequisites
267+
268+
- Ensure Claude Code CLI is installed and working (`claude --version`)
269+
- DEVONthink Pro must be running
270+
271+
### Installation
272+
273+
Choose the installation method that matches your setup:
274+
275+
**Option 1: Global npm installation**
276+
```bash
277+
npm install -g mcp-server-devonthink
278+
claude mcp add devonthink -- mcp-server-devonthink
279+
```
280+
281+
**Option 2: Using npx (no installation required)**
282+
```bash
283+
claude mcp add devonthink -- npx -y mcp-server-devonthink
284+
```
285+
286+
**Option 3: Local development setup**
287+
```bash
288+
# After cloning and building the project locally
289+
claude mcp add devonthink -- node /path/to/mcp-server-devonthink/dist/index.js
290+
```
291+
292+
### Scope Configuration
293+
294+
By default, MCP servers are added with **local scope** (only available in the current project directory). For global availability:
295+
296+
```bash
297+
claude mcp add devonthink --scope user -- node /path/to/mcp-server-devonthink/dist/index.js
298+
```
299+
300+
### Verification & Testing
301+
302+
1. **Check server status:**
303+
```bash
304+
claude mcp list
305+
```
306+
You should see: `devonthink: ✓ Connected`
307+
308+
2. **Test in Claude Code:**
309+
- Use `/mcp` command to verify server connection
310+
- Try asking: "Is DEVONthink running?"
311+
- Test with: "List my open databases"
312+
313+
### Management Commands
314+
315+
- **List servers:** `claude mcp list`
316+
- **Get server details:** `claude mcp get devonthink`
317+
- **Remove server:** `claude mcp remove devonthink`
318+
319+
### Important Notes
320+
321+
- **Restart Required**: If `/mcp` shows "No MCP servers configured" after adding the server, you may need to completely quit and restart Claude Code
322+
- **Scope Matters**: Local scope servers only work in the directory where they were configured
323+
- **User Scope**: Use `--scope user` to make the server available in all your projects
324+
325+
### Troubleshooting
326+
327+
#### Build Errors
328+
- **"tsc: command not found"** - Run `npm install` to install TypeScript and other dependencies
329+
- **Permission errors** - The build process makes the dist/index.js file executable automatically
330+
331+
#### Claude Desktop Connection Issues
332+
- **Server not found** - Verify the path in your Claude Desktop configuration
333+
- **DEVONthink not responding** - Ensure DEVONthink Pro (not DEVONthink Personal) is installed and running
334+
- **Permission errors** - macOS may require granting accessibility permissions to Claude Desktop
335+
336+
#### Claude Code Connection Issues
337+
- **"/mcp shows no servers"** - Try completely quitting and restarting Claude Code
338+
- **"Server not connected"** - Run `claude mcp list` to verify CLI shows server as connected
339+
- **Local vs User scope** - If server only works in specific directories, reconfigure with `--scope user`
340+
- **CLI vs IDE mismatch** - The CLI and running Claude Code process may use different configurations
341+
342+
#### Optional Tools
343+
344+
- **just** - Task runner for convenient build commands (install with `brew install just`)
345+
- **Yarn** - Alternative package manager (the project was originally developed with Yarn)
346+
138347
## Implementation Details
139348

140349
- Uses JXA (JavaScript for Automation) to control DEVONthink via AppleScript APIs

0 commit comments

Comments
 (0)