Skip to content

Commit 446692a

Browse files
authored
Merge pull request #22 from bucketeer-io/fix/build-npx
feat: add npx command for build index
2 parents 766cee6 + a17be31 commit 446692a

File tree

3 files changed

+41
-3
lines changed

3 files changed

+41
-3
lines changed

README.md

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,44 @@ The server automatically fetches and indexes documentation from the [bucketeer-i
6666
- GitHub cache stored in `files/docs/github_cache.json` with SHA-based change detection
6767
- Use `npm run build:index:force` to force rebuild the entire index
6868

69-
## Cursor and Claude Desktop Configuration
69+
## Using with npx
70+
71+
### First-time Setup
72+
73+
1. Build the document index:
74+
```bash
75+
npx @bucketeer/docs-local-mcp-server build-index
76+
```
77+
78+
2. Use in your MCP configuration as shown in the next section.
7079

71-
### Setup
80+
### Updating the Index
81+
82+
To update the documentation index (e.g., when new documentation is available):
83+
```bash
84+
npx @bucketeer/docs-local-mcp-server build-index --force
85+
```
86+
87+
## Cursor and Claude Desktop Configuration
7288

7389
Configure the MCP Server by adding the following to your `mcp.json` or `claude_desktop_config.json` file, referring to the documentation for Cursor (https://docs.cursor.com/context/model-context-protocol#configuring-mcp-servers) and Claude Desktop (https://modelcontextprotocol.io/quickstart/user):
7490

91+
### Option 1: Using npx (Recommended)
92+
93+
```json
94+
{
95+
"mcpServers": {
96+
"bucketeer-docs": {
97+
"type": "stdio",
98+
"command": "npx",
99+
"args": ["@bucketeer/docs-local-mcp-server"]
100+
}
101+
}
102+
}
103+
```
104+
105+
### Option 2: Using local installation
106+
75107
```json
76108
{
77109
"mcpServers": {
@@ -126,6 +158,8 @@ When the MCP server is running, the following tools are available:
126158
- `npm run build` - Compile TypeScript files to `dist/` directory
127159
- `npm run build:index` - Build/update the document index from GitHub repository
128160
- `npm run build:index:force` - Force rebuild the entire index (ignores cache)
161+
- `npx @bucketeer/docs-local-mcp-server build-index` - Build index using npx
162+
- `npx @bucketeer/docs-local-mcp-server build-index --force` - Force rebuild index using npx
129163
- `npm run dev:index` - Build and update index in development mode
130164
- `npm run dev` - Build and start server in development mode
131165
- `npm run lint` - Run Biome linting

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
"description": "Local MCP Server to query Bucketeer documentation",
55
"main": "dist/main.js",
66
"bin": {
7-
"docs-local-mcp-server": "dist/main.js"
7+
"@bucketeer/docs-local-mcp-server": "dist/main.js",
8+
"docs-local-mcp-server": "dist/main.js",
9+
"build-index": "dist/scripts/buildIndex.js"
810
},
911
"type": "module",
1012
"files": [

src/scripts/buildIndex.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/usr/bin/env node
2+
13
import { fileURLToPath } from 'node:url';
24
import { config } from '../config/index.js';
35
import { DocumentFetcher } from '../core/indexing/documentFetcher.js';

0 commit comments

Comments
 (0)