cyrus-mcp-tools 0.1.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/.editorconfig ADDED
@@ -0,0 +1,10 @@
1
+ root = true
2
+
3
+ [*]
4
+ end_of_line = lf
5
+ insert_final_newline = true
6
+ charset = utf-8
7
+ trim_trailing_whitespace = true
8
+
9
+ [*.md]
10
+ trim_trailing_whitespace = false
package/.env.example ADDED
@@ -0,0 +1,15 @@
1
+ # Server Configuration
2
+ PORT=3000
3
+ NODE_ENV=development
4
+
5
+ # Linear API
6
+ LINEAR_API_URL=https://api.linear.app/graphql
7
+ LINEAR_API_TOKEN=<YOUR_TOKEN>
8
+
9
+ # Security
10
+ CORS_ORIGINS=http://localhost:3000,https://your-deployed-domain.com
11
+ RATE_LIMIT_WINDOW_MS=60000
12
+ RATE_LIMIT_MAX=100
13
+
14
+ # Logging
15
+ LOG_LEVEL=info
package/.eslintrc.json ADDED
@@ -0,0 +1,27 @@
1
+ {
2
+ "env": {
3
+ "node": true,
4
+ "es2022": true,
5
+ "jest": true
6
+ },
7
+ "extends": [
8
+ "eslint:recommended",
9
+ "plugin:@typescript-eslint/recommended",
10
+ "prettier"
11
+ ],
12
+ "parser": "@typescript-eslint/parser",
13
+ "parserOptions": {
14
+ "ecmaVersion": "latest",
15
+ "sourceType": "module"
16
+ },
17
+ "plugins": ["@typescript-eslint"],
18
+ "rules": {
19
+ "no-console": "warn",
20
+ "@typescript-eslint/no-unused-vars": [
21
+ "error",
22
+ { "argsIgnorePattern": "^_" }
23
+ ],
24
+ "@typescript-eslint/explicit-function-return-type": "off",
25
+ "@typescript-eslint/explicit-module-boundary-types": "off"
26
+ }
27
+ }
@@ -0,0 +1,62 @@
1
+ name: Publish to npm
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ version:
7
+ description: 'Version bump type (patch, minor, major)'
8
+ required: true
9
+ default: 'patch'
10
+ type: choice
11
+ options:
12
+ - patch
13
+ - minor
14
+ - major
15
+
16
+ jobs:
17
+ publish:
18
+ runs-on: ubuntu-latest
19
+ permissions:
20
+ contents: write
21
+ steps:
22
+ - name: Checkout repository
23
+ uses: actions/checkout@v3
24
+ with:
25
+ fetch-depth: 0
26
+
27
+ - name: Setup Node.js
28
+ uses: actions/setup-node@v3
29
+ with:
30
+ node-version: '20.x'
31
+ registry-url: 'https://registry.npmjs.org/'
32
+
33
+ - name: Install dependencies
34
+ run: npm ci
35
+
36
+ - name: Run tests
37
+ run: npm test
38
+
39
+ - name: Build
40
+ run: npm run build
41
+
42
+ - name: Version bump
43
+ id: version
44
+ run: |
45
+ git config --global user.name 'GitHub Action'
46
+ git config --global user.email 'action@github.com'
47
+ npm version ${{ github.event.inputs.version }} -m "Bump version to %s [skip ci]"
48
+ echo "VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
49
+
50
+ - name: Push changes
51
+ run: git push --follow-tags
52
+
53
+ - name: Create GitHub Release
54
+ uses: softprops/action-gh-release@v1
55
+ with:
56
+ tag_name: v${{ steps.version.outputs.VERSION }}
57
+ generate_release_notes: true
58
+
59
+ - name: Publish to npm
60
+ run: npm publish --access public
61
+ env:
62
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
package/.prettierrc ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "semi": true,
3
+ "trailingComma": "all",
4
+ "singleQuote": true,
5
+ "printWidth": 100,
6
+ "tabWidth": 2
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "recommendations": [
3
+ "esbenp.prettier-vscode",
4
+ "dbaeumer.vscode-eslint",
5
+ "editorconfig.editorconfig"
6
+ ]
7
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "editor.formatOnSave": true,
3
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
4
+ "editor.codeActionsOnSave": {
5
+ "source.fixAll.eslint": "explicit"
6
+ },
7
+ "[typescript]": {
8
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
9
+ },
10
+ "[javascript]": {
11
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
12
+ },
13
+ "[json]": {
14
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
15
+ },
16
+ "[jsonc]": {
17
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
18
+ },
19
+ "prettier.useEditorConfig": true,
20
+ "prettier.requireConfig": true,
21
+ "typescript.tsdk": "node_modules/typescript/lib",
22
+ "typescript.enablePromptUseWorkspaceTsdk": true,
23
+ "javascript.preferences.importModuleSpecifier": "non-relative",
24
+ "typescript.preferences.importModuleSpecifier": "non-relative"
25
+ }
package/DEVELOPMENT.md ADDED
@@ -0,0 +1,61 @@
1
+ ## Development
2
+
3
+ To develop locally:
4
+
5
+ ```bash
6
+ # Clone the repository
7
+ git clone https://github.com/tacticlaunch/mcp-linear.git
8
+ cd mcp-linear
9
+
10
+ # Install dependencies
11
+ npm install
12
+
13
+ # Run in development mode
14
+ npm run dev -- --token YOUR_LINEAR_API_TOKEN
15
+ ```
16
+
17
+ ### Inspecting the server
18
+
19
+ To inspect the server by @modelcontextprotocol/inspector:
20
+
21
+ ```bash
22
+ npm run inspect -- -e LINEAR_API_TOKEN=YOUR_LINEAR_API_TOKEN
23
+ ```
24
+
25
+ ### Extending the Server
26
+
27
+ To add new tools to the server:
28
+
29
+ 1. Follow the implementation guide in the [TOOLS.md](./TOOLS.md) document
30
+ 2. Make sure to follow the established code structure in the `src/` directory
31
+ 3. Update the documentation to reflect your changes
32
+
33
+ ### Publishing to npm
34
+
35
+ To publish this package to npm:
36
+
37
+ 1. Update the version in package.json
38
+
39
+ ```bash
40
+ npm version patch # or minor, or major
41
+ ```
42
+
43
+ 2. Build the project
44
+
45
+ ```bash
46
+ npm run build
47
+ ```
48
+
49
+ 3. Make sure you've already logged in to npm
50
+
51
+ ```bash
52
+ npm login
53
+ ```
54
+
55
+ 4. Publish to npm
56
+
57
+ ```bash
58
+ npm publish --access public
59
+ ```
60
+
61
+ 5. For Smithery registry, you'll need to work with the Smithery team to get your server listed in their catalog.
package/Dockerfile ADDED
@@ -0,0 +1,33 @@
1
+ # Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
2
+ FROM node:lts-alpine AS builder
3
+
4
+ WORKDIR /app
5
+
6
+ # Copy package.json and package-lock.json if exists
7
+ COPY package.json ./
8
+
9
+ # Install dependencies without running scripts to avoid issues
10
+ RUN npm install --ignore-scripts
11
+
12
+ # Copy the rest of the files
13
+ COPY . ./
14
+
15
+ # Build the project
16
+ RUN npm run build
17
+
18
+
19
+ FROM node:lts-alpine
20
+
21
+ WORKDIR /app
22
+
23
+ # Copy only necessary files for runtime
24
+ COPY package.json ./
25
+ COPY --from=builder /app/dist ./dist
26
+
27
+ # Install only production dependencies
28
+ RUN npm install --production --ignore-scripts
29
+
30
+ EXPOSE 3000
31
+
32
+ # Run the server
33
+ CMD ["npm", "start"]
package/LICENSE.md ADDED
@@ -0,0 +1,9 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Alexey Elizarov
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,131 @@
1
+ # cyrus-mcp-tools
2
+
3
+ MCP tools for Cyrus - including Linear file uploads and other utilities.
4
+
5
+ ![Cyrus MCP Tools](https://img.shields.io/badge/Cyrus-MCP%20Tools-blue)
6
+ [![npm version](https://img.shields.io/npm/v/cyrus-mcp-tools.svg)](https://www.npmjs.com/package/cyrus-mcp-tools)
7
+
8
+ ## Overview
9
+
10
+ This MCP server provides tools for Cyrus, currently including:
11
+ - File uploads to Linear's cloud storage for use in issues, comments, and other content
12
+
13
+ ## Features
14
+
15
+ - Upload files from local filesystem to Linear
16
+ - Auto-detection of MIME types
17
+ - Configurable public/private access
18
+ - Returns Linear-compatible asset URLs
19
+ - Built on the official Linear SDK
20
+
21
+ ## Installation
22
+
23
+ ### Prerequisites
24
+
25
+ - Node.js 20+
26
+ - Linear API token
27
+
28
+ ### Getting Your Linear API Token
29
+
30
+ 1. Log in to your Linear account at [linear.app](https://linear.app)
31
+ 2. Click on your organization avatar (top-left corner)
32
+ 3. Select **Settings**
33
+ 4. Navigate to **Security & access** in the left sidebar
34
+ 5. Under **Personal API Keys** click **New API Key**
35
+ 6. Give your key a name (e.g., `MCP Linear Uploads`)
36
+ 7. Copy the generated API token and store it securely
37
+
38
+ ### Install via npm
39
+
40
+ ```bash
41
+ npm install -g cyrus-mcp-tools
42
+ ```
43
+
44
+ ## Configuration
45
+
46
+ Add the following to your MCP settings file:
47
+
48
+ ```json
49
+ {
50
+ "mcpServers": {
51
+ "linear-uploads": {
52
+ "command": "npx",
53
+ "args": ["-y", "cyrus-mcp-tools"],
54
+ "env": {
55
+ "LINEAR_API_TOKEN": "<YOUR_TOKEN>"
56
+ }
57
+ }
58
+ }
59
+ }
60
+ ```
61
+
62
+ ### Client-Specific Configuration Locations
63
+
64
+ - **Cursor**: `~/.cursor/mcp.json`
65
+ - **Claude Desktop**: `~/Library/Application Support/Claude/claude_desktop_config.json`
66
+ - **Claude VSCode Extension**: `~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json`
67
+
68
+ ## Usage
69
+
70
+ ### Available Tool
71
+
72
+ The server provides a single tool:
73
+
74
+ #### `linear_upload_file`
75
+
76
+ Upload a file to Linear and get an asset URL.
77
+
78
+ **Parameters:**
79
+ - `filePath` (required): Absolute path to the file to upload
80
+ - `filename` (optional): Custom filename for Linear (defaults to file basename)
81
+ - `contentType` (optional): MIME type (auto-detected if not provided)
82
+ - `makePublic` (optional): Make file publicly accessible (default: false)
83
+
84
+ **Returns:**
85
+ - `assetUrl`: Linear asset URL for use in issues/comments
86
+ - `filename`: Filename used for the upload
87
+ - `size`: File size in bytes
88
+ - `contentType`: MIME type of the uploaded file
89
+
90
+ ### Example Usage
91
+
92
+ Once configured, you can use prompts like:
93
+
94
+ - "Upload the screenshot at /Users/me/Desktop/bug-screenshot.png to Linear"
95
+ - "Upload this log file to Linear and make it publicly accessible"
96
+ - "Upload the design mockup and give me the asset URL"
97
+
98
+ ## Manual Execution
99
+
100
+ You can also run the server directly:
101
+
102
+ ```bash
103
+ # With environment variable
104
+ export LINEAR_API_TOKEN=your_token_here
105
+ cyrus-mcp-tools
106
+
107
+ # Or with command line argument
108
+ cyrus-mcp-tools --token your_token_here
109
+ ```
110
+
111
+ ## Development
112
+
113
+ ```bash
114
+ # Clone and install
115
+ git clone https://github.com/ceedaragents/cyrus
116
+ cd packages/cyrus-mcp-tools
117
+ npm install
118
+
119
+ # Development mode
120
+ npm run dev
121
+
122
+ # Build
123
+ npm run build
124
+
125
+ # Test
126
+ npm test
127
+ ```
128
+
129
+ ## License
130
+
131
+ MIT License - see LICENSE file for details.