Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
10 changes: 10 additions & 0 deletions .cz.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"commitizen": {
"name": "cz_conventional_commits",
"tag_format": "v$version",
"version_scheme": "semver",
"version_provider": "npm",
"update_changelog_on_bump": true,
"major_version_zero": true
}
}
8 changes: 8 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
node_modules
npm-debug.log
dist
coverage
.git
.github
.husky
.vscode
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
57 changes: 57 additions & 0 deletions .github/ISSUE_TEMPLATE/general.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: General Issue
description: Report a bug, request a feature, or propose a task
title: "[Issue] <brief summary>"
labels: [needs-triage]
body:
- type: dropdown
id: type
attributes:
label: Type of Issue
description: What kind of issue is being reported?
options:
- Bug Report
- Feature Request
- Refactor / Cleanup
- Documentation
- Question
validations:
required: true

- type: input
id: context
attributes:
label: Context or Problem
description: What was observed or what problem is this issue addressing?
placeholder: e.g., "The tool crashes when..."
validations:
required: true

- type: textarea
id: steps
attributes:
label: Steps to Reproduce or Task Description
description: Provide a clear sequence of actions to replicate the issue or complete the task.
placeholder: |
1. Open the app
2. Click "Run"
3. Observe error message
validations:
required: false

- type: textarea
id: expected
attributes:
label: Expected Outcome
description: What was expected to happen?
placeholder: "The tool should complete without errors..."
validations:
required: false

- type: textarea
id: notes
attributes:
label: Additional Notes or References
description: Include logs, screenshots, or links that support this issue.
placeholder: "Logs, screenshots, related issues, design notes..."
validations:
required: false
25 changes: 25 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
## Description

<!-- Provide a clear explanation of what has been implemented or fixed. Mention any related context, requirements, or issues. -->

- Closes #[issue-number] (if applicable)

---

## Testing

<!-- Include logs, screenshots, terminal output, or any relevant proof of successful testing. -->

---

## Checklist

- [ ] Code has been tested locally
- [ ] Unit tests have been added or updated
- [ ] Documentation has been updated if needed

---

## Additional Notes

<!-- Include any further details, follow-up items, or decisions relevant to the reviewer. -->
36 changes: 36 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Run Tests

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "22"

- name: Install dependencies
run: npm ci

- name: Run linter
run: npm run lint

- name: Check formatting
run: npm run format

- name: Compile typescript
run: npm run build

- name: Run tests
run: npm test
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules/
dist/
*.log
.DS_Store
.env
.env.local
.env.*.local
2 changes: 2 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env sh
npx lint-staged
39 changes: 39 additions & 0 deletions .husky/setup-hooks.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*global console*/
import { writeFileSync, mkdirSync, chmodSync, constants } from 'fs';
import { execSync } from 'child_process';
import { platform } from 'os';

mkdirSync('.husky', { recursive: true });

execSync('git config core.hooksPath .husky');

writeFileSync(
'.husky/pre-commit',
`#!/usr/bin/env sh
npx lint-staged`
);

// Cross-platform way to make the file executable
if (platform() === 'win32') {
// On Windows, executable permissions don't matter as much
console.log('pre-commit script created.');
} else {
// On Unix systems, use chmod
try {
execSync('chmod +x .husky/pre-commit');
console.log('pre-commit script created.');
} catch {
// Fallback to Node.js fs.chmodSync if available
try {
chmodSync(
'.husky/pre-commit',
constants.S_IRWXU | constants.S_IRGRP | constants.S_IXGRP
); // 0o750
console.log('pre-commit script created.');
} catch {
console.warn(
'Warning: Could not set executable permissions on the hook file'
);
}
}
}
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v22
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
dist/
node_modules/
*.log
coverage/
.git/
10 changes: 10 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"tabWidth": 2,
"semi": true,
"bracketSpacing": true,
"arrowParens": "always",
"endOfLine": "lf"
}
30 changes: 26 additions & 4 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,29 @@
### License
BSD 3-Clause License

Mapbox MCP Server
Copyright (c) 2025, Mapbox, Inc.
All rights reserved.

Copyright &copy; 2025 Mapbox, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

The software and files in this repository (collectively, “Software”) are licensed under the Mapbox TOS for use only with the relevant Mapbox product(s) listed at www.mapbox.com/pricing. This license allows developers with a current active Mapbox account to use and modify the authorized portions of the Software as needed for use only with the relevant Mapbox product(s) through their Mapbox account in accordance with the Mapbox TOS. This license terminates automatically if a developer no longer has a Mapbox account in good standing or breaches the Mapbox TOS. For the license terms, please see the Mapbox TOS at https://www.mapbox.com/legal/tos/ which incorporates the Mapbox Product Terms at www.mapbox.com/legal/service-terms. If this Software is a SDK, modifications that change or interfere with marked portions of the code related to billing, accounting, or data collection are not authorized and the SDK sends limited de-identified location and usage data which is used in accordance with the Mapbox TOS. [Updated 2023-01]
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
6 changes: 3 additions & 3 deletions docs/claude-code-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Follow the installation instructions at [Claude Code documentation](https://docs
Add the MCP server directly from the command line:

```bash
claude mcp add mapbox-devkit npx @mapbox/mcp-devkit-server-private -e MAPBOX_ACCESS_TOKEN=<YOUR_TOKEN>
claude mcp add mapbox-devkit npx @mapbox/mcp-devkit-server -e MAPBOX_ACCESS_TOKEN=<YOUR_TOKEN>
```

Replace `<YOUR_TOKEN>` with your actual Mapbox access token.
Expand All @@ -58,7 +58,7 @@ Add to your Claude Code MCP configuration:
"mcpServers": {
"mapbox-devkit": {
"command": "npx",
"args": ["-y", "@mapbox/mcp-devkit-server-private"],
"args": ["-y", "@mapbox/mcp-devkit-server"],
"env": {
"MAPBOX_ACCESS_TOKEN": "your_token_here"
}
Expand Down Expand Up @@ -193,7 +193,7 @@ Enable verbose error reporting by adding the environment variable:
"mcpServers": {
"mapbox-devkit": {
"command": "npx",
"args": ["-y", "@mapbox/mcp-devkit-server-private"],
"args": ["-y", "@mapbox/mcp-devkit-server"],
"env": {
"MAPBOX_ACCESS_TOKEN": "your_token_here",
"VERBOSE_ERRORS": "true"
Expand Down
4 changes: 2 additions & 2 deletions docs/claude-desktop-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ See the [Token Requirements](#token-requirements) section below for detailed sco
"mcpServers": {
"mapbox-devkit": {
"command": "npx",
"args": ["-y", "@mapbox/mcp-devkit-server-private"],
"args": ["-y", "@mapbox/mcp-devkit-server"],
"env": {
"MAPBOX_ACCESS_TOKEN": "your_token_here"
}
Expand Down Expand Up @@ -153,7 +153,7 @@ Enable verbose error reporting by adding the environment variable:
"mcpServers": {
"mapbox-devkit": {
"command": "npx",
"args": ["-y", "@mapbox/mcp-devkit-server-private"],
"args": ["-y", "@mapbox/mcp-devkit-server"],
"env": {
"MAPBOX_ACCESS_TOKEN": "your_token_here",
"VERBOSE_ERRORS": "true"
Expand Down
Loading
Loading