Skip to content
Closed
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
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
# Force LF line endings for all text files (for consistent prettier formatting)
* text=auto eol=lf

package-lock.json linguist-generated=true
110 changes: 108 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,138 @@ on:
pull_request:
branches: [main]

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
name: Linux x64
- os: ubuntu-24.04-arm
name: Linux ARM64
- os: windows-latest
name: Windows x64
- os: windows-11-arm
name: Windows ARM64
# Use x64-baseline build via emulation (native ARM64 not yet available)
bun-download-url: https://github.com/oven-sh/bun/releases/latest/download/bun-windows-x64-baseline.zip
- os: macos-latest
name: macOS ARM64

name: Build (${{ matrix.name }})
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4

- name: Verify no private URLs in package-lock.json
shell: bash
run: '! grep -E "\"resolved\": \"https?://" package-lock.json | grep -v registry.npmjs.org'

- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
bun-download-url: ${{ matrix.bun-download-url }}

- uses: actions/setup-node@v4
with:
node-version: "20"

- run: npm install

- run: npm run build:all
# Build SDK (all platforms) and examples (Unix only - they use INPUT=... syntax)
- run: npm run build

- name: Build examples
if: runner.os != 'Windows'
run: npm run examples:build

- name: Verify generated schemas are up-to-date
shell: bash
run: |
npm run generate:schemas
git diff --exit-code src/generated/ || (echo "Generated schemas are out of date. Run 'npm run generate:schemas' and commit." && exit 1)

- run: npm test

- run: npm run prettier

# Test build in Windows WSL (Ubuntu)
build-wsl:
name: Build (Windows WSL)
runs-on: windows-latest

steps:
- uses: actions/checkout@v4

- uses: Vampire/setup-wsl@v5
with:
distribution: Ubuntu-24.04

- name: Install dependencies in WSL
shell: wsl-bash {0}
run: |
# Install Node.js and Bun
sudo apt-get update
sudo apt-get install -y unzip
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs
curl -fsSL https://bun.sh/install | bash
echo 'export BUN_INSTALL="$HOME/.bun"' >> ~/.bashrc
echo 'export PATH="$BUN_INSTALL/bin:$PATH"' >> ~/.bashrc

- name: Build and test in WSL
shell: wsl-bash {0}
run: |
export BUN_INSTALL="$HOME/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"
npm install
npm run build
npm test
npm run prettier

# Test that the package can be installed from git (triggers prepare script)
test-git-install:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
name: Linux x64
- os: ubuntu-24.04-arm
name: Linux ARM64
- os: windows-latest
name: Windows x64
- os: windows-11-arm
name: Windows ARM64
bun-download-url: https://github.com/oven-sh/bun/releases/latest/download/bun-windows-x64-baseline.zip
- os: macos-latest
name: macOS ARM64

name: Test git install (${{ matrix.name }})
runs-on: ${{ matrix.os }}

steps:
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
bun-download-url: ${{ matrix.bun-download-url }}

- uses: actions/setup-node@v4
with:
node-version: "20"

- name: Create test project and install from git
shell: bash
run: |
mkdir test-project
cd test-project
npm init -y
# Install from the PR branch
npm install "git+https://github.com/${{ github.repository }}#${{ github.head_ref || github.ref_name }}"
# Verify the package is usable (ESM import)
node --input-type=module -e "import { App } from '@modelcontextprotocol/ext-apps'; console.log('Import successful:', typeof App)"
3 changes: 3 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- uses: actions/setup-node@v4
with:
node-version: 22
Expand Down
33 changes: 33 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,39 @@

We welcome contributions to the MCP Apps SDK! This document outlines the process for contributing to the project.

## Prerequisites

Development requires [Bun](https://bun.sh) (used for building and testing).

<details>
<summary><strong>macOS / Linux</strong></summary>

```bash
curl -fsSL https://bun.sh/install | bash
```

</details>

<details>
<summary><strong>Windows (native)</strong></summary>

```powershell
powershell -c "irm bun.sh/install.ps1 | iex"
```

> **ARM64 note**: Native binaries aren't available yet; the x64 build runs via emulation.

</details>

<details>
<summary><strong>Windows (WSL)</strong></summary>

```bash
curl -fsSL https://bun.sh/install | bash
```

</details>

## Getting Started

1. Fork the repository
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ The [`examples/`](https://github.com/modelcontextprotocol/ext-apps/tree/main/exa

To run all examples together:

```
```bash
# Bun is required for development (see CONTRIBUTING.md for install instructions)
npm install
npm run examples:start
```
Expand Down
1 change: 0 additions & 1 deletion examples/basic-host/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"@types/react": "^19.2.2",
"@types/react-dom": "^19.2.2",
"@vitejs/plugin-react": "^4.3.4",
"bun": "^1.3.2",
"concurrently": "^9.2.1",
"cors": "^2.8.5",
"express": "^5.1.0",
Expand Down
1 change: 0 additions & 1 deletion examples/basic-server-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"@types/react": "^19.2.2",
"@types/react-dom": "^19.2.2",
"@vitejs/plugin-react": "^4.3.4",
"bun": "^1.3.2",
"concurrently": "^9.2.1",
"cors": "^2.8.5",
"express": "^5.1.0",
Expand Down
1 change: 0 additions & 1 deletion examples/basic-server-vanillajs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"@types/cors": "^2.8.19",
"@types/express": "^5.0.0",
"@types/node": "^22.0.0",
"bun": "^1.3.2",
"concurrently": "^9.2.1",
"cors": "^2.8.5",
"express": "^5.1.0",
Expand Down
1 change: 0 additions & 1 deletion examples/budget-allocator-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"@types/cors": "^2.8.19",
"@types/express": "^5.0.0",
"@types/node": "^22.0.0",
"bun": "^1.3.2",
"concurrently": "^9.2.1",
"cors": "^2.8.5",
"express": "^5.1.0",
Expand Down
1 change: 0 additions & 1 deletion examples/cohort-heatmap-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"@types/react": "^19.2.2",
"@types/react-dom": "^19.2.2",
"@vitejs/plugin-react": "^4.3.4",
"bun": "^1.3.2",
"concurrently": "^9.2.1",
"cors": "^2.8.5",
"express": "^5.1.0",
Expand Down
1 change: 0 additions & 1 deletion examples/customer-segmentation-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"@types/cors": "^2.8.19",
"@types/express": "^5.0.0",
"@types/node": "^22.0.0",
"bun": "^1.3.2",
"concurrently": "^9.2.1",
"cors": "^2.8.5",
"express": "^5.1.0",
Expand Down
1 change: 0 additions & 1 deletion examples/scenario-modeler-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"@types/react": "^19.2.2",
"@types/react-dom": "^19.2.2",
"@vitejs/plugin-react": "^4.3.4",
"bun": "^1.3.2",
"concurrently": "^9.2.1",
"cors": "^2.8.5",
"express": "^5.1.0",
Expand Down
1 change: 0 additions & 1 deletion examples/system-monitor-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"@types/cors": "^2.8.19",
"@types/express": "^5.0.0",
"@types/node": "^22.0.0",
"bun": "^1.3.2",
"concurrently": "^9.2.1",
"cors": "^2.8.5",
"express": "^5.1.0",
Expand Down
1 change: 0 additions & 1 deletion examples/threejs-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
"@types/react-dom": "^19.2.2",
"@types/three": "^0.181.0",
"@vitejs/plugin-react": "^4.3.4",
"bun": "^1.3.2",
"concurrently": "^9.2.1",
"cors": "^2.8.5",
"express": "^5.1.0",
Expand Down
1 change: 0 additions & 1 deletion examples/wiki-explorer-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"@types/cors": "^2.8.19",
"@types/express": "^5.0.0",
"@types/node": "^22.0.0",
"bun": "^1.3.2",
"concurrently": "^9.2.1",
"cors": "^2.8.5",
"express": "^5.1.0",
Expand Down
Loading
Loading