Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,6 @@ npx @anthropic-ai/dxt pack

This will generate `mcp-devkit-server.dxt` using the configuration in `manifest.json`.

### Installing the DXT Package

Users can install the DXT package by:

1. Opening the `.dxt` file with a compatible application (e.g., Claude Desktop)
2. Following the installation prompts
3. Providing their Mapbox access token when prompted

The DXT package includes:

- Pre-built server code (`dist/index.js`)
Expand Down
30 changes: 27 additions & 3 deletions docs/claude-desktop-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,33 @@ See the [Token Requirements](#token-requirements) section below for detailed sco

### Configure Claude Desktop

## Option 1: DXT Package Installation (Recommended)

The easiest way to install this MCP server is using the pre-built DXT package:

**⚠️ Important: Make sure you have the latest version of Claude Desktop installed. DXT support requires recent versions of Claude Desktop to function properly.**

**[📦 Download DXT Package](https://github.com/mapbox/mcp-devkit-server/releases/latest/download/mcp-devkit-server.dxt)**

### Installation Steps

1. **Update Claude Desktop** - [Download the latest version](https://claude.ai/download) if you haven't recently
2. Download the `.dxt` file from the link above
3. Open the file with Claude Desktop
4. Follow the installation prompts
5. Provide your Mapbox access token when prompted

This method automatically handles the configuration and setup, providing a one-click installation experience.

## Option 2: Manual Configuration

For users who prefer manual configuration or need custom setups, you can configure the server directly:

1. Open Claude Desktop settings
2. Navigate to the Model Context Protocol section
3. Modify `claude_desktop_config.json` to add the new server:

#### Option 1: NPM Package (Recommended)
### NPM Package

```json
{
Expand All @@ -56,7 +78,7 @@ See the [Token Requirements](#token-requirements) section below for detailed sco
}
```

#### Option 2: Docker Runtime
### Docker Runtime

```json
{
Expand All @@ -76,7 +98,7 @@ See the [Token Requirements](#token-requirements) section below for detailed sco
}
```

#### Option 3: Local Development
### Local Development

If you want to use a local version (need to clone and build from this repo):

Expand All @@ -94,6 +116,8 @@ If you want to use a local version (need to clone and build from this repo):
}
```

**⚠️ Important: Make sure you have the latest version of Claude Desktop installed. DXT support requires recent versions of Claude Desktop to function properly.**

## Usage Examples

Once configured, you can use natural language to interact with Mapbox development tools:
Expand Down
6 changes: 3 additions & 3 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"dxt_version": "0.1",
"name": "@mapbox/mcp-devkit-server",
"display_name": "Mapbox MCP Server",
"version": "0.2.1",
"display_name": "Mapbox MCP DevKit Server",
"version": "0.2.3",
"description": "Mapbox MCP devkit server",
"author": {
"name": "Mapbox, Inc."
Expand All @@ -16,7 +16,7 @@
"${__dirname}/dist/index.js"
],
"env": {
"MAPBOX_ACCESS_TOKEN" : "${user_config.MAPBOX_ACCESS_TOKEN}"
"MAPBOX_ACCESS_TOKEN": "${user_config.MAPBOX_ACCESS_TOKEN}"
}
}
},
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mapbox/mcp-devkit-server",
"version": "0.2.2",
"version": "0.2.3",
"description": "Mapbox MCP devkit server",
"main": "dist/index.js",
"module": "dist/index-esm.js",
Expand All @@ -17,10 +17,11 @@
"format:fix": "prettier --write \"./src/**/*.{ts,tsx,js,json,md}\"",
"prepare": "husky && node .husky/setup-hooks.js",
"test": "jest",
"build": "npm run prepare && npm run build:esm && npm run build:cjs && npm run generate-version && node scripts/build-helpers.cjs copy-json && node scripts/add-shebang.cjs",
"build": "npm run prepare && npm run sync-manifest-version && npm run build:esm && npm run build:cjs && npm run generate-version && node scripts/build-helpers.cjs copy-json && node scripts/add-shebang.cjs",
"build:esm": "node scripts/build-helpers.cjs esm-package && tsc -p tsconfig.json",
"build:cjs": "node scripts/build-helpers.cjs cjs-package && tsc -p tsconfig.json",
"generate-version": "node scripts/build-helpers.cjs generate-version",
"sync-manifest-version": "node scripts/build-helpers.cjs sync-manifest-version",
"dev": "tsc -p tsconfig.json --watch"
},
"lint-staged": {
Expand Down
14 changes: 14 additions & 0 deletions scripts/build-helpers.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,17 @@ function generateVersion() {
fs.writeFileSync('dist/version.json', JSON.stringify(versionInfo, null, 2));
}

// Sync version from package.json to manifest.json
function syncManifestVersion() {
const packageJson = JSON.parse(fs.readFileSync('package.json', 'utf8'));
const manifestJson = JSON.parse(fs.readFileSync('manifest.json', 'utf8'));

manifestJson.version = packageJson.version;

fs.writeFileSync('manifest.json', JSON.stringify(manifestJson, null, 2) + '\n');
console.log(`Synced version ${packageJson.version} from package.json to manifest.json`);
}

// Copy JSON files to dist
function copyJsonFiles() {
const srcDir = 'src';
Expand Down Expand Up @@ -79,6 +90,9 @@ switch (command) {
case 'generate-version':
generateVersion();
break;
case 'sync-manifest-version':
syncManifestVersion();
break;
case 'copy-json':
copyJsonFiles();
break;
Expand Down
Loading