mcp-zenskar 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/npm-publish.yml +50 -0
- package/INSTALL.md +115 -0
- package/README.md +129 -0
- package/package.json +42 -0
- package/src/mcp-config.json +4587 -0
- package/src/response-processor.js +26 -0
- package/src/server.js +229 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
name: Publish to NPM
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
npm-publish:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
|
|
13
|
+
steps:
|
|
14
|
+
- name: Checkout code
|
|
15
|
+
uses: actions/checkout@v4
|
|
16
|
+
|
|
17
|
+
- name: Setup Node.js for NPM
|
|
18
|
+
uses: actions/setup-node@v4
|
|
19
|
+
with:
|
|
20
|
+
node-version: 22
|
|
21
|
+
registry-url: https://registry.npmjs.org/
|
|
22
|
+
cache: npm
|
|
23
|
+
|
|
24
|
+
- name: Install dependencies
|
|
25
|
+
run: npm ci
|
|
26
|
+
|
|
27
|
+
- name: Extract version from package.json
|
|
28
|
+
id: package-version
|
|
29
|
+
run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
|
|
30
|
+
|
|
31
|
+
- name: Publish to NPM
|
|
32
|
+
run: npm publish
|
|
33
|
+
env:
|
|
34
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
35
|
+
|
|
36
|
+
- name: Create package summary
|
|
37
|
+
run: |
|
|
38
|
+
echo "## 📦 Package Published Successfully!" >> $GITHUB_STEP_SUMMARY
|
|
39
|
+
echo "- **Package**: mcp-zenskar" >> $GITHUB_STEP_SUMMARY
|
|
40
|
+
echo "- **Version**: ${{ steps.package-version.outputs.version }}" >> $GITHUB_STEP_SUMMARY
|
|
41
|
+
echo "- **Registry**: NPM (Public)" >> $GITHUB_STEP_SUMMARY
|
|
42
|
+
echo "" >> $GITHUB_STEP_SUMMARY
|
|
43
|
+
echo "### 📋 Install Command" >> $GITHUB_STEP_SUMMARY
|
|
44
|
+
echo "\`\`\`bash" >> $GITHUB_STEP_SUMMARY
|
|
45
|
+
echo "npm install mcp-zenskar@${{ steps.package-version.outputs.version }}" >> $GITHUB_STEP_SUMMARY
|
|
46
|
+
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
|
|
47
|
+
echo "" >> $GITHUB_STEP_SUMMARY
|
|
48
|
+
echo "### 🌐 NPM Package" >> $GITHUB_STEP_SUMMARY
|
|
49
|
+
echo "🔗 [View on NPM](https://www.npmjs.com/package/mcp-zenskar)" >> $GITHUB_STEP_SUMMARY
|
|
50
|
+
|
package/INSTALL.md
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# Installation Guide for Zenskar MCP Server
|
|
2
|
+
|
|
3
|
+
## Quick Setup for Claude Desktop
|
|
4
|
+
|
|
5
|
+
### Step 1: Install the Package
|
|
6
|
+
```bash
|
|
7
|
+
npm install -g mcp-zenskar
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
### Step 2: Configure Claude Desktop
|
|
11
|
+
|
|
12
|
+
1. Open Claude Desktop configuration file:
|
|
13
|
+
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
14
|
+
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
15
|
+
- **Linux**: `~/.config/Claude/claude_desktop_config.json`
|
|
16
|
+
|
|
17
|
+
2. Add the Zenskar MCP server configuration:
|
|
18
|
+
|
|
19
|
+
```json
|
|
20
|
+
{
|
|
21
|
+
"mcpServers": {
|
|
22
|
+
"zenskar": {
|
|
23
|
+
"command": "mcp-zenskar"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Step 3: Get Your Credentials
|
|
30
|
+
|
|
31
|
+
1. **Organization ID**:
|
|
32
|
+
- Login to your Zenskar dashboard
|
|
33
|
+
- Go to Settings → Organization
|
|
34
|
+
- Copy your Organization ID
|
|
35
|
+
|
|
36
|
+
2. **API Token**:
|
|
37
|
+
- Go to Settings → API Keys
|
|
38
|
+
- Generate a new API token
|
|
39
|
+
- Copy the Bearer token
|
|
40
|
+
|
|
41
|
+
### Step 4: Usage in Claude
|
|
42
|
+
|
|
43
|
+
Now you can ask Claude to interact with Zenskar. **Important**: You'll need to provide your credentials with each request.
|
|
44
|
+
|
|
45
|
+
Example:
|
|
46
|
+
```
|
|
47
|
+
Can you list my customers? Use organization ID "your-org-id" and authorization "Bearer your-token"
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Alternative Setup Methods
|
|
51
|
+
|
|
52
|
+
### Method 1: Direct NPX Usage
|
|
53
|
+
```bash
|
|
54
|
+
npx mcp-zenskar
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Method 2: Local Development
|
|
58
|
+
```bash
|
|
59
|
+
git clone <this-repo>
|
|
60
|
+
cd mcp-zenskar
|
|
61
|
+
npm install
|
|
62
|
+
npm start
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Method 3: Environment Variables (Future Feature)
|
|
66
|
+
You can set environment variables and modify the server to use them:
|
|
67
|
+
```bash
|
|
68
|
+
export ZENSKAR_ORGANIZATION="your-org-id"
|
|
69
|
+
export ZENSKAR_AUTH_TOKEN="Bearer your-token"
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Security Best Practices
|
|
73
|
+
|
|
74
|
+
1. **Never commit credentials** to version control
|
|
75
|
+
2. **Use environment variables** for storing credentials when possible
|
|
76
|
+
3. **Rotate API tokens** regularly
|
|
77
|
+
4. **Limit token permissions** to minimum required scope
|
|
78
|
+
5. **Monitor API usage** in your Zenskar dashboard
|
|
79
|
+
|
|
80
|
+
## Troubleshooting
|
|
81
|
+
|
|
82
|
+
### Common Issues
|
|
83
|
+
|
|
84
|
+
1. **"Organization ID is required"**
|
|
85
|
+
- Ensure you're providing the organization parameter in your requests
|
|
86
|
+
- Check that your organization ID is correct
|
|
87
|
+
|
|
88
|
+
2. **"Authorization token is required"**
|
|
89
|
+
- Provide the authorization parameter
|
|
90
|
+
- Ensure token starts with "Bearer " or the server will add it
|
|
91
|
+
|
|
92
|
+
3. **HTTP 401 Unauthorized**
|
|
93
|
+
- Verify your API token is valid and not expired
|
|
94
|
+
- Check that your organization ID is correct
|
|
95
|
+
- Ensure you have proper permissions
|
|
96
|
+
|
|
97
|
+
4. **HTTP 403 Forbidden**
|
|
98
|
+
- Your token may not have permission for this operation
|
|
99
|
+
- Contact your Zenskar admin to verify permissions
|
|
100
|
+
|
|
101
|
+
### Debug Mode
|
|
102
|
+
To see detailed request logs, check the Claude Desktop logs or run the server manually with debug output.
|
|
103
|
+
|
|
104
|
+
## Available Operations
|
|
105
|
+
|
|
106
|
+
The server provides access to all Zenskar API endpoints including:
|
|
107
|
+
|
|
108
|
+
- Customer management (list, get, create, update)
|
|
109
|
+
- Invoice operations (create, retrieve, manage)
|
|
110
|
+
- Subscription handling
|
|
111
|
+
- Billing operations
|
|
112
|
+
- Contact management
|
|
113
|
+
- And many more...
|
|
114
|
+
|
|
115
|
+
For a complete list, see the `mcp-config.json` file in the package.
|
package/README.md
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# Zenskar MCP Server
|
|
2
|
+
|
|
3
|
+
A Model Context Protocol (MCP) server that provides AI assistants with access to the Zenskar API for customer management, invoicing, and billing operations.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Customer Management**: List, search, create, and update customers
|
|
8
|
+
- **Invoice Operations**: Create, retrieve, and manage invoices
|
|
9
|
+
- **Subscription Management**: Handle subscription lifecycle
|
|
10
|
+
- **Billing Operations**: Process payments and manage billing
|
|
11
|
+
- **Multi-tenant Support**: Organization-based access control
|
|
12
|
+
- **Secure Authentication**: Bearer token authentication
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
### For Claude Desktop App
|
|
17
|
+
|
|
18
|
+
Add to your Claude Desktop configuration (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):
|
|
19
|
+
|
|
20
|
+
```json
|
|
21
|
+
{
|
|
22
|
+
"mcpServers": {
|
|
23
|
+
"zenskar": {
|
|
24
|
+
"command": "npx",
|
|
25
|
+
"args": ["mcp-zenskar"],
|
|
26
|
+
"env": {
|
|
27
|
+
"ZENSKAR_ORGANIZATION": "your-org-id",
|
|
28
|
+
"ZENSKAR_AUTH_TOKEN": "your-bearer-token"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### For Other AI Applications
|
|
36
|
+
|
|
37
|
+
Install globally:
|
|
38
|
+
```bash
|
|
39
|
+
npm install -g mcp-zenskar
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Or run directly:
|
|
43
|
+
```bash
|
|
44
|
+
npx mcp-zenskar
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Authentication
|
|
48
|
+
|
|
49
|
+
This MCP server requires two authentication parameters for every request:
|
|
50
|
+
|
|
51
|
+
1. **Organization ID**: Your Zenskar organization identifier
|
|
52
|
+
2. **Authorization Token**: Your API Bearer token
|
|
53
|
+
|
|
54
|
+
### Getting Your Credentials
|
|
55
|
+
|
|
56
|
+
1. **Organization ID**: Available in your Zenskar dashboard settings
|
|
57
|
+
2. **API Token**: Generate from Zenskar dashboard → Settings → API Keys
|
|
58
|
+
|
|
59
|
+
## Usage
|
|
60
|
+
|
|
61
|
+
### In Claude Desktop
|
|
62
|
+
|
|
63
|
+
Once configured, you can ask Claude to interact with your Zenskar data:
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
"Show me my recent customers"
|
|
67
|
+
"Create an invoice for customer XYZ"
|
|
68
|
+
"List all active subscriptions"
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Manual Tool Calls
|
|
72
|
+
|
|
73
|
+
Each tool requires authentication parameters:
|
|
74
|
+
|
|
75
|
+
```javascript
|
|
76
|
+
{
|
|
77
|
+
"organization": "your-org-id",
|
|
78
|
+
"authorization": "Bearer your-token",
|
|
79
|
+
// ... other tool-specific parameters
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Available Tools
|
|
84
|
+
|
|
85
|
+
The server provides access to all Zenskar API endpoints including:
|
|
86
|
+
|
|
87
|
+
- `listCustomers` - Retrieve paginated customer lists
|
|
88
|
+
- `getCustomer` - Get specific customer details
|
|
89
|
+
- `createCustomer` - Create new customers
|
|
90
|
+
- `updateCustomer` - Update existing customers
|
|
91
|
+
- `listInvoices` - Retrieve invoice lists
|
|
92
|
+
- `createInvoice` - Generate new invoices
|
|
93
|
+
- `getInvoice` - Get invoice details
|
|
94
|
+
- And many more...
|
|
95
|
+
|
|
96
|
+
## Security
|
|
97
|
+
|
|
98
|
+
- All API requests require valid organization ID and Bearer token
|
|
99
|
+
- Multi-tenant isolation ensures data privacy
|
|
100
|
+
- No credentials are stored by the MCP server
|
|
101
|
+
- All authentication is passed through from the client
|
|
102
|
+
|
|
103
|
+
## Development
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
# Clone the repository
|
|
107
|
+
git clone https://github.com/your-org/mcp-zenskar
|
|
108
|
+
cd mcp-zenskar
|
|
109
|
+
|
|
110
|
+
# Install dependencies
|
|
111
|
+
npm install
|
|
112
|
+
|
|
113
|
+
# Run the server
|
|
114
|
+
npm start
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Configuration
|
|
118
|
+
|
|
119
|
+
The server uses `src/mcp-config.json` to define available tools and API endpoints. This file contains the complete mapping of MCP tools to Zenskar API operations.
|
|
120
|
+
|
|
121
|
+
## License
|
|
122
|
+
|
|
123
|
+
MIT
|
|
124
|
+
|
|
125
|
+
## Support
|
|
126
|
+
|
|
127
|
+
For issues and support:
|
|
128
|
+
- GitHub Issues: https://github.com/your-org/mcp-zenskar/issues
|
|
129
|
+
- Zenskar Documentation: https://docs.zenskar.com
|
package/package.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "mcp-zenskar",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Model Context Protocol (MCP) server for Zenskar API - customer management, invoicing, and billing operations",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "src/server.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"mcp-zenskar": "src/server.js"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"start": "node src/server.js",
|
|
12
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [
|
|
15
|
+
"mcp",
|
|
16
|
+
"model-context-protocol",
|
|
17
|
+
"zenskar",
|
|
18
|
+
"billing",
|
|
19
|
+
"invoicing",
|
|
20
|
+
"customer-management",
|
|
21
|
+
"ai-tool",
|
|
22
|
+
"claude",
|
|
23
|
+
"llm"
|
|
24
|
+
],
|
|
25
|
+
"author": "Abhishek Gahlot <me@abhishek.it>",
|
|
26
|
+
"license": "MIT",
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@modelcontextprotocol/sdk": "^1.18.0",
|
|
29
|
+
"zod": "^3.22.0"
|
|
30
|
+
},
|
|
31
|
+
"engines": {
|
|
32
|
+
"node": ">=16.0.0"
|
|
33
|
+
},
|
|
34
|
+
"repository": {
|
|
35
|
+
"type": "git",
|
|
36
|
+
"url": "https://github.com/zenskar/mcp-zenskar"
|
|
37
|
+
},
|
|
38
|
+
"bugs": {
|
|
39
|
+
"url": "https://github.com/zenskar/mcp-zenskar/issues"
|
|
40
|
+
},
|
|
41
|
+
"homepage": "https://github.com/zenskar/mcp-zenskar#readme"
|
|
42
|
+
}
|