From 3f3b8a4e4c3c21cbc02ff900eb4acabe866de260 Mon Sep 17 00:00:00 2001 From: Atsushi NAGASE Date: Thu, 11 Sep 2025 05:24:31 +0900 Subject: [PATCH] Rename package dropbox-mcp to dropbox-mcp-server --- .github/workflows/ci.yml | 4 ++-- .gitignore | 2 +- .goreleaser.yml | 12 +++++----- CLAUDE.md | 10 ++++---- README.md | 44 +++++++++++++++++------------------ SECURITY.md | 2 +- go.mod | 2 +- internal/config/config.go | 2 +- internal/dropbox/client.go | 4 ++-- internal/handlers/handlers.go | 6 ++--- main.go | 14 +++++------ mcp.json | 2 +- version.go | 3 +++ 13 files changed, 55 insertions(+), 52 deletions(-) create mode 100644 version.go diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 76bb407..a7765be 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -97,8 +97,8 @@ jobs: run: go build -v ./... - name: Build CLI tool - run: go build -v -o dropbox-mcp${{ matrix.os == 'windows-latest' && '.exe' || '' }} . + run: go build -v -o dropbox-mcp-server${{ matrix.os == 'windows-latest' && '.exe' || '' }} . - name: Verify binary - run: ./dropbox-mcp${{ matrix.os == 'windows-latest' && '.exe' || '' }} -h || true + run: ./dropbox-mcp-server${{ matrix.os == 'windows-latest' && '.exe' || '' }} -h || true shell: bash diff --git a/.gitignore b/.gitignore index df9f34b..8135f97 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,7 @@ *.dll *.so *.dylib -dropbox-mcp +dropbox-mcp-server # Test binary, built with `go test -c` *.test diff --git a/.goreleaser.yml b/.goreleaser.yml index d6a66cc..1cc92d9 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,6 +1,6 @@ # This is an example .goreleaser.yml file with some sensible defaults. # Make sure to check the documentation at https://goreleaser.com -project_name: dropbox-mcp +project_name: dropbox-mcp-server before: hooks: @@ -9,7 +9,7 @@ before: builds: - main: . - binary: dropbox-mcp + binary: dropbox-mcp-server env: - CGO_ENABLED=0 goos: @@ -72,7 +72,7 @@ changelog: release: github: owner: ngs - name: dropbox-mcp + name: dropbox-mcp-server draft: false prerelease: auto name_template: "{{.ProjectName}} v{{.Version}}" @@ -84,15 +84,15 @@ brews: name: homebrew-tap branch: main directory: Formula - homepage: https://github.com/ngs/dropbox-mcp + homepage: https://github.com/ngs/dropbox-mcp-server description: "MCP server for Dropbox integration" license: MIT test: | - system "#{bin}/dropbox-mcp -h" + system "#{bin}/dropbox-mcp-server -h" nfpms: - file_name_template: "{{ .ProjectName }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}" - homepage: https://github.com/ngs/dropbox-mcp + homepage: https://github.com/ngs/dropbox-mcp-server description: "MCP server for Dropbox integration" maintainer: Atsushi Nagase license: MIT diff --git a/CLAUDE.md b/CLAUDE.md index 3afc533..852507a 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -5,7 +5,7 @@ This is a Model Context Protocol (MCP) server for Dropbox integration, written i ## Project Structure ``` -dropbox-mcp/ +dropbox-mcp-server/ ├── main.go # MCP server implementation with stdio transport ├── go.mod # Go module definition ├── internal/ @@ -23,7 +23,7 @@ dropbox-mcp/ - Implements OAuth 2.0 browser-based flow - Opens local HTTP server to receive callback - Handles token refresh automatically -- Stores tokens in `~/.dropbox-mcp/config.json` +- Stores tokens in `~/.dropbox-mcp-server/config.json` ### MCP Protocol (main.go) - Uses stdio transport for communication @@ -72,7 +72,7 @@ dropbox-mcp/ ### Build ```bash -go build -o dropbox-mcp +go build -o dropbox-mcp-server ``` ### Run Tests @@ -83,7 +83,7 @@ go test ./... ### Manual Testing ```bash # Test with direct stdio -echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{}}}' | ./dropbox-mcp +echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{}}}' | ./dropbox-mcp-server # Check logs in Claude Desktop tail -f ~/Library/Logs/Claude/mcp-server-dropbox.log @@ -96,7 +96,7 @@ tail -f ~/Library/Logs/Claude/mcp-server-dropbox.log - `DROPBOX_CLIENT_SECRET` - Dropbox App secret ### Config File -Location: `~/.dropbox-mcp/config.json` +Location: `~/.dropbox-mcp-server/config.json` ```json { "client_id": "...", diff --git a/README.md b/README.md index dd4000f..f99d631 100644 --- a/README.md +++ b/README.md @@ -23,39 +23,39 @@ A Model Context Protocol (MCP) server implementation for Dropbox integration, wr ```bash brew tap ngs/tap -brew install dropbox-mcp +brew install dropbox-mcp-server ``` ### Option 2: Install with Go ```bash -go install go.ngs.io/dropbox-mcp@latest +go install go.ngs.io/dropbox-mcp-server@latest ``` ### Option 3: Download Pre-built Binary -Download the latest release for your platform from the [releases page](https://github.com/ngs/dropbox-mcp/releases). +Download the latest release for your platform from the [releases page](https://github.com/ngs/dropbox-mcp-server/releases). ```bash # Example for macOS (Apple Silicon) -curl -L https://github.com/ngs/dropbox-mcp/releases/latest/download/dropbox-mcp_darwin_arm64.tar.gz | tar xz -sudo mv dropbox-mcp /usr/local/bin/ +curl -L https://github.com/ngs/dropbox-mcp-server/releases/latest/download/dropbox-mcp-server_darwin_arm64.tar.gz | tar xz +sudo mv dropbox-mcp-server /usr/local/bin/ # Example for macOS (Intel) -curl -L https://github.com/ngs/dropbox-mcp/releases/latest/download/dropbox-mcp_darwin_amd64.tar.gz | tar xz -sudo mv dropbox-mcp /usr/local/bin/ +curl -L https://github.com/ngs/dropbox-mcp-server/releases/latest/download/dropbox-mcp-server_darwin_amd64.tar.gz | tar xz +sudo mv dropbox-mcp-server /usr/local/bin/ # Example for Linux (x86_64) -curl -L https://github.com/ngs/dropbox-mcp/releases/latest/download/dropbox-mcp_linux_amd64.tar.gz | tar xz -sudo mv dropbox-mcp /usr/local/bin/ +curl -L https://github.com/ngs/dropbox-mcp-server/releases/latest/download/dropbox-mcp-server_linux_amd64.tar.gz | tar xz +sudo mv dropbox-mcp-server /usr/local/bin/ ``` ### Option 4: Build from Source ```bash -git clone https://github.com/ngs/dropbox-mcp.git -cd dropbox-mcp -go build -o dropbox-mcp +git clone https://github.com/ngs/dropbox-mcp-server.git +cd dropbox-mcp-server +go build -o dropbox-mcp-server ``` ## Setup @@ -91,12 +91,12 @@ If you have Claude MCP CLI installed, you can register the server with a single ```bash # Basic registration (replace with YOUR OWN App credentials) -claude mcp add dropbox dropbox-mcp \ +claude mcp add dropbox dropbox-mcp-server \ --env DROPBOX_CLIENT_ID=your_own_app_key \ --env DROPBOX_CLIENT_SECRET=your_own_app_secret # With custom binary path -claude mcp add dropbox /path/to/dropbox-mcp \ +claude mcp add dropbox /path/to/dropbox-mcp-server \ --env DROPBOX_CLIENT_ID=your_own_app_key \ --env DROPBOX_CLIENT_SECRET=your_own_app_secret ``` @@ -115,7 +115,7 @@ Add the following to your Claude Desktop configuration file: { "mcpServers": { "dropbox": { - "command": "dropbox-mcp", + "command": "dropbox-mcp-server", "env": { "DROPBOX_CLIENT_ID": "your_app_key_here", "DROPBOX_CLIENT_SECRET": "your_app_secret_here" @@ -126,8 +126,8 @@ Add the following to your Claude Desktop configuration file: ``` **Note**: -- If you installed via Homebrew or placed the binary in `/usr/local/bin`, you can use just `"command": "dropbox-mcp"` -- If you built from source or downloaded to a custom location, use the full path: `"command": "/path/to/dropbox-mcp"` +- If you installed via Homebrew or placed the binary in `/usr/local/bin`, you can use just `"command": "dropbox-mcp-server"` +- If you built from source or downloaded to a custom location, use the full path: `"command": "/path/to/dropbox-mcp-server"` ### 3. Verify Installation @@ -151,7 +151,7 @@ When you first use the Dropbox MCP server in Claude: 2. Your browser will open to Dropbox's authorization page 3. Log in and authorize the app 4. You'll be redirected to a success page -5. The authentication token will be saved to `~/.dropbox-mcp/config.json` +5. The authentication token will be saved to `~/.dropbox-mcp-server/config.json` ### Available Tools @@ -192,7 +192,7 @@ When you first use the Dropbox MCP server in Claude: ## Configuration -The server stores configuration in `~/.dropbox-mcp/config.json`: +The server stores configuration in `~/.dropbox-mcp-server/config.json`: ```json { @@ -218,7 +218,7 @@ Tokens are automatically refreshed when they expire. ### Authentication Issues - Ensure redirect URI is correctly configured in Dropbox App Console - Check that client ID and secret are correct -- Try deleting `~/.dropbox-mcp/config.json` and re-authenticating +- Try deleting `~/.dropbox-mcp-server/config.json` and re-authenticating ### Permission Errors - Verify your Dropbox app has the required scopes enabled @@ -235,7 +235,7 @@ Tokens are automatically refreshed when they expire. ```bash go mod download -go build -o dropbox-mcp +go build -o dropbox-mcp-server ``` ### Running Tests @@ -247,7 +247,7 @@ go test ./... ### Project Structure ``` -dropbox-mcp/ +dropbox-mcp-server/ ├── main.go # MCP server implementation ├── go.mod # Go module definition ├── internal/ diff --git a/SECURITY.md b/SECURITY.md index c79a1f0..990599a 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -27,7 +27,7 @@ For public distribution without CLIENT_SECRET: #### 3. Configuration File with Proper Permissions Store credentials in a protected config file: ```bash -chmod 600 ~/.dropbox-mcp/config.json +chmod 600 ~/.dropbox-mcp-server/config.json ``` ### For Developers diff --git a/go.mod b/go.mod index 305792a..ac05705 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module go.ngs.io/dropbox-mcp +module go.ngs.io/dropbox-mcp-server go 1.21 diff --git a/internal/config/config.go b/internal/config/config.go index 59383dc..ee9355f 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -21,7 +21,7 @@ func GetConfigPath() (string, error) { if err != nil { return "", fmt.Errorf("failed to get home directory: %w", err) } - return filepath.Join(homeDir, ".dropbox-mcp", "config.json"), nil + return filepath.Join(homeDir, ".dropbox-mcp-server", "config.json"), nil } func Load() (*Config, error) { diff --git a/internal/dropbox/client.go b/internal/dropbox/client.go index b1cdb49..0cbadae 100644 --- a/internal/dropbox/client.go +++ b/internal/dropbox/client.go @@ -11,8 +11,8 @@ import ( "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox" "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/files" "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/sharing" - "go.ngs.io/dropbox-mcp/internal/auth" - "go.ngs.io/dropbox-mcp/internal/config" + "go.ngs.io/dropbox-mcp-server/internal/auth" + "go.ngs.io/dropbox-mcp-server/internal/config" ) type Client struct { diff --git a/internal/handlers/handlers.go b/internal/handlers/handlers.go index e62735b..ee75492 100644 --- a/internal/handlers/handlers.go +++ b/internal/handlers/handlers.go @@ -9,9 +9,9 @@ import ( "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/files" "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/sharing" - "go.ngs.io/dropbox-mcp/internal/auth" - "go.ngs.io/dropbox-mcp/internal/config" - "go.ngs.io/dropbox-mcp/internal/dropbox" + "go.ngs.io/dropbox-mcp-server/internal/auth" + "go.ngs.io/dropbox-mcp-server/internal/config" + "go.ngs.io/dropbox-mcp-server/internal/dropbox" ) const ( diff --git a/main.go b/main.go index 7da9dcd..dbafbd8 100644 --- a/main.go +++ b/main.go @@ -9,7 +9,7 @@ import ( "os" "strings" - "go.ngs.io/dropbox-mcp/internal/handlers" + "go.ngs.io/dropbox-mcp-server/internal/handlers" ) var ( @@ -52,19 +52,19 @@ func main() { flag.Parse() if *versionFlag { - fmt.Printf("dropbox-mcp version %s (commit: %s, built: %s)\n", version, commit, date) + fmt.Printf("dropbox-mcp-server version %s (commit: %s, built: %s)\n", version, commit, date) os.Exit(0) } if *helpFlag || *help2Flag { - fmt.Println("dropbox-mcp - MCP server for Dropbox integration") + fmt.Println("dropbox-mcp-server - MCP server for Dropbox integration") fmt.Println("\nUsage:") - fmt.Println(" dropbox-mcp [options]") + fmt.Println(" dropbox-mcp-server [options]") fmt.Println("\nOptions:") fmt.Println(" -h, --help Show this help message") fmt.Println(" --version Show version information") fmt.Println("\nThis tool is designed to be used with Claude Desktop.") - fmt.Println("See https://github.com/ngs/dropbox-mcp for more information.") + fmt.Println("See https://github.com/ngs/dropbox-mcp-server for more information.") os.Exit(0) } @@ -142,8 +142,8 @@ func handleInitialize() interface{} { "tools": map[string]interface{}{}, }, "serverInfo": map[string]interface{}{ - "name": "dropbox-mcp", - "version": "1.0.0", + "name": "dropbox-mcp-server", + "version": VERSION, }, } } diff --git a/mcp.json b/mcp.json index 7deb4b5..77e6b92 100644 --- a/mcp.json +++ b/mcp.json @@ -1,5 +1,5 @@ { - "name": "dropbox-mcp", + "name": "dropbox-mcp-server", "version": "1.0.0", "description": "MCP server for Dropbox integration", "author": "Atsushi Nagase", diff --git a/version.go b/version.go new file mode 100644 index 0000000..a44ae0e --- /dev/null +++ b/version.go @@ -0,0 +1,3 @@ +package main + +const VERSION = "0.1.0"