Skip to content
Draft
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
21 changes: 15 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,22 @@ on:
tags:
- 'v*'

permissions:
contents: read
packages: write

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7

- uses: actions/setup-node@v4
- uses: actions/setup-node@v7
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
registry-url: 'https://npm.pkg.github.com'
scope: '@buzzvil'
package-manager-cache: false

- name: Install dependencies
run: npm ci
Expand All @@ -25,7 +31,10 @@ jobs:
- name: Test
run: npm test

- name: Publish to npm
run: npm publish --access public
- name: Verify package contents
run: npm pack --dry-run

- name: Publish to GitHub Packages
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19 changes: 13 additions & 6 deletions .github/workflows/tagpr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,22 @@ permissions:
pull-requests: write
actions: write
issues: write
packages: write

jobs:
tagpr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/setup-node@v4
- uses: actions/setup-node@v7
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
registry-url: 'https://npm.pkg.github.com'
scope: '@buzzvil'
package-manager-cache: false

- name: Install dependencies
run: npm ci
Expand All @@ -40,8 +43,12 @@ jobs:
if: steps.tagpr.outputs.tag != ''
run: npm test

- name: Publish to npm
- name: Verify package contents
if: steps.tagpr.outputs.tag != ''
run: npm publish --access public
run: npm pack --dry-run

- name: Publish to GitHub Packages
if: steps.tagpr.outputs.tag != ''
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38 changes: 36 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,40 @@ a browser — instead, it reads the cached tokens left behind by

## Installation

### Run with npx from GitHub Packages

GitHub Packages requires npm authentication even for public packages. Create a
classic personal access token with only the `read:packages` scope, then sign in
once (use your GitHub username and the token as the password):

```bash
npm login --scope=@buzzvil --auth-type=legacy --registry=https://npm.pkg.github.com
```

Set the required Redash/OIDC environment variables, then log in to Redash and
run the MCP server:

```bash
export REDASH_URL=https://redash.example.com
export REDASH_OIDC_ISSUER=https://authentik.example.com/application/o/redash-api/
export REDASH_OIDC_CLIENT_ID=redash-api

npx -y @buzzvil/redash-mcp login
npx -y @buzzvil/redash-mcp
```

For non-interactive environments, map the scope and token in `~/.npmrc`:

```ini
@buzzvil:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${GITHUB_PACKAGES_TOKEN}
```

GitHub Packages does not support anonymous npm installs, including for public
packages. Authentication-free `npx` requires publishing to npmjs.org as well.

### Build from source

1. Clone this repository:
```bash
git clone https://github.com/Buzzvil/redash-mcp.git
Expand All @@ -91,7 +125,7 @@ a browser — instead, it reads the cached tokens left behind by
5. **Log in once** — opens your browser, completes PKCE, writes tokens to the cache:
```bash
npm start -- login
# or, after publish: npx @suthio/redash-mcp login
# or, from GitHub Packages: npx -y @buzzvil/redash-mcp login
```
6. Start the server:
```bash
Expand Down Expand Up @@ -124,7 +158,7 @@ To use this MCP server with Claude for Desktop, configure it in your Claude for
"mcpServers": {
"redash": {
"command": "npx",
"args": ["-y", "@suthio/redash-mcp"],
"args": ["-y", "@buzzvil/redash-mcp"],
"env": {
"REDASH_URL": "https://redash.example.com",
"REDASH_OIDC_ISSUER": "https://authentik.example.com/application/o/redash-api/",
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@suthio/redash-mcp",
"name": "@buzzvil/redash-mcp",
"version": "0.1.0",
"description": "MCP server for Redash integration",
"type": "module",
Expand Down Expand Up @@ -30,6 +30,13 @@
],
"author": "",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/Buzzvil/redash-mcp.git"
},
"publishConfig": {
"registry": "https://npm.pkg.github.com"
},
"dependencies": {
"@modelcontextprotocol/sdk": "^1.1.0",
"axios": "^1.6.2",
Expand Down
Loading