Skip to content
Open
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
19 changes: 19 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Ensure consistent line endings across platforms
* text=auto eol=lf

# Specific file types that should have Unix line endings
*.ts text eol=lf
*.js text eol=lf
*.json text eol=lf
*.md text eol=lf
*.yml text eol=lf
*.yaml text eol=lf
*.sh text eol=lf

# Binary files
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.pdf binary
23 changes: 15 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,17 @@ name: CI

on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
branches: [main]

jobs:
build-and-test:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18, 20, 22]

steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -27,9 +26,14 @@ jobs:
- name: Install dependencies
run: make install

- name: Run linting (if configured)
- name: Check code formatting
run: make format-check

- name: Run linting
run: make lint
continue-on-error: true

- name: Run type checking
run: make typecheck

- name: Run tests
run: make test
Expand All @@ -50,7 +54,7 @@ jobs:
package-validation:
runs-on: ubuntu-latest
needs: build-and-test

steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -64,11 +68,14 @@ jobs:
- name: Install dependencies
run: make install

- name: Run all quality checks
run: make check

- name: Build package
run: make build

- name: Validate package.json
run: make info

- name: Dry run publish
run: make validate
run: make validate
10 changes: 5 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
permissions:
contents: read
id-token: write

steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down Expand Up @@ -60,13 +60,13 @@ jobs:
release_name: Release ${{ github.ref_name }}
body: |
## Changes in this Release

See the [CHANGELOG](./CHANGELOG.md) for detailed information about this release.

## Installation

```bash
npm install @vonage/vonage-mcp-server-api-bindings@${{ github.ref_name }}
```
draft: false
prerelease: false
prerelease: false
23 changes: 23 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Ignore build artifacts
build/
dist/
node_modules/

# Ignore package files
package-lock.json
*.tgz

# Ignore git files
.git/

# Ignore IDE files
.vscode/
.idea/

# Ignore OS files
.DS_Store
Thumbs.db

# Ignore log files
*.log
npm-debug.log*
28 changes: 28 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"semi": true,
"trailingComma": "es5",
"singleQuote": true,
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"bracketSpacing": true,
"arrowParens": "avoid",
"endOfLine": "lf",
"quoteProps": "as-needed",
"bracketSameLine": false,
"overrides": [
{
"files": "*.md",
"options": {
"printWidth": 100,
"proseWrap": "always"
}
},
{
"files": "*.json",
"options": {
"tabWidth": 2
}
}
]
}
24 changes: 24 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,27 @@ start: ## Start the built application
npm run start

# Quality checks
format: ## Format code with Prettier
npm run format

format-check: ## Check code formatting
npm run format:check

lint: ## Run ESLint
npm run lint

lint-fix: ## Fix ESLint issues
npm run lint:fix

typecheck: ## Run TypeScript type checking
npm run typecheck

check: ## Run all quality checks (format, lint, typecheck)
npm run check

fix: ## Fix all auto-fixable issues (format and lint)
npm run fix

check-clean: ## Check if working directory is clean
@if [ -n "$$(git status --porcelain)" ]; then \
echo "❌ Working directory is not clean. Please commit or stash changes."; \
Expand Down Expand Up @@ -58,6 +79,8 @@ pre-release: check-branch check-clean ## Run all pre-release checks
@echo "🔍 Running pre-release checks..."
@echo "📥 Pulling latest changes..."
git pull origin main
@echo "🎨 Checking code formatting..."
$(MAKE) check
@echo "🧪 Running tests..."
$(MAKE) test
@echo "🔨 Building project..."
Expand Down Expand Up @@ -108,6 +131,7 @@ setup: ## Initial project setup
validate: ## Validate the package without publishing
@echo "✅ Validating package structure..."
@node -e "const pkg = require('./package.json'); console.log('Package:', pkg.name, 'v' + pkg.version)"
$(MAKE) check
$(MAKE) build
npm publish --dry-run
@echo "✅ Package validation passed"
Expand Down
28 changes: 18 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,44 +4,50 @@

This MCP server provides access to various Vonage API functionalities through the following tools:

| Category | Tool Name | Description |
|----------|-----------|-------------|
| **Account Management** | `balance` | Get your Vonage account balance |
| | `list-applications` | List all applications attached to your API key with their configurations and capabilities |
| | `list-purchased-numbers` | List telephone numbers associated with your account and their metadata |
| **Number Management** | `link-number-to-vonage-application` | Link an owned number to a specific Vonage Application |
| **Messaging & Communication** | `SMS` | Send SMS messages using Vonage |
| | `outbound-voice-message` | Send outbound voice messages with Vonage |
| Category | Tool Name | Description |
| ----------------------------- | ----------------------------------- | ----------------------------------------------------------------------------------------- |
| **Account Management** | `balance` | Get your Vonage account balance |
| | `list-applications` | List all applications attached to your API key with their configurations and capabilities |
| | `list-purchased-numbers` | List telephone numbers associated with your account and their metadata |
| **Number Management** | `link-number-to-vonage-application` | Link an owned number to a specific Vonage Application |
| **Messaging & Communication** | `SMS` | Send SMS messages using Vonage |
| | `outbound-voice-message` | Send outbound voice messages with Vonage |

### Usage Examples

#### Check Account Balance

```
Can you check my Vonage account balance?
```

#### List Your Phone Numbers

```
Can you list out the numbers that I own for Vonage?
```

#### List Applications

```
Can you list out the applications on my account?
```

#### Send an SMS

```
Can you send an SMS to +1234567890 with the message "Hello from Vonage!"?
```

## Set up the MCP server

- [VS Code](https://code.visualstudio.com/docs/copilot/chat/mcp-servers#_add-an-mcp-server)
- [Cursor](https://docs.cursor.com/context/mcp)
- [Windsurf](https://docs.windsurf.com/windsurf/cascade/mcp)
- [Claude Desktop](https://modelcontextprotocol.io/quickstart/user)

The details of the MCP server should look like this.

```JSON
"vonage-mcp-server-api-bindings": {
"type": "stdio",
Expand All @@ -60,5 +66,7 @@ The details of the MCP server should look like this.
}
```

> Right now, we only use a base64 encoded Private Key. I created a tool that will convert the private key file into the encoded string that you can copy and paste. Everything is done in your browser, no inforamtion is sent anywhere: [https://mylight.work/private-key-to-environment-variable](https://mylight.work/private-key-to-environment-variable)

> Right now, we only use a base64 encoded Private Key. I created a tool that will convert the
> private key file into the encoded string that you can copy and paste. Everything is done in your
> browser, no inforamtion is sent anywhere:
> [https://mylight.work/private-key-to-environment-variable](https://mylight.work/private-key-to-environment-variable)
61 changes: 61 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import js from '@eslint/js';
import tseslint from '@typescript-eslint/eslint-plugin';
import tsparser from '@typescript-eslint/parser';
import prettier from 'eslint-plugin-prettier';
import prettierConfig from 'eslint-config-prettier';
import globals from 'globals';

export default [
js.configs.recommended,
{
files: ['src/**/*.ts'],
languageOptions: {
parser: tsparser,
parserOptions: {
ecmaVersion: 2022,
sourceType: 'module',
project: './tsconfig.json',
},
globals: {
...globals.node,
},
},
plugins: {
'@typescript-eslint': tseslint,
prettier: prettier,
},
rules: {
...tseslint.configs.recommended.rules,
...prettierConfig.rules,
// TypeScript specific rules
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
],
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-non-null-assertion': 'warn',

// General rules
'no-console': 'warn',
'prefer-const': 'error',
'no-var': 'error',
'no-trailing-spaces': 'error',
'eol-last': 'error',

// Prettier integration
'prettier/prettier': 'error',
},
},
{
files: ['**/*.js', '**/*.mjs'],
languageOptions: {
ecmaVersion: 2022,
sourceType: 'module',
},
},
{
ignores: ['build/', 'dist/', 'node_modules/', '*.d.ts', 'coverage/'],
},
];
Loading
Loading