Skip to content

Commit 94c5b36

Browse files
committed
Add publication metadata: repository URLs, changelog, contributing guide, CI
- Add repository/homepage/bugs URLs to package.json for npm page - Add CHANGELOG.md with v1.0.0 release notes - Add CONTRIBUTING.md with dev setup and guidelines - Add GitHub Actions CI workflow (typecheck + build on Node 20/22)
1 parent a0b97a9 commit 94c5b36

4 files changed

Lines changed: 137 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build:
11+
runs-on: macos-latest
12+
strategy:
13+
matrix:
14+
node-version: [20, 22]
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Use Node.js ${{ matrix.node-version }}
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: ${{ matrix.node-version }}
23+
24+
- name: Install dependencies
25+
run: npm ci
26+
27+
- name: TypeScript type check
28+
run: npx tsc --noEmit
29+
30+
- name: Build
31+
run: npm run build
32+
33+
- name: Verify dist output
34+
run: |
35+
test -f dist/index.js || (echo "dist/index.js not found" && exit 1)
36+
test -f dist/index.d.ts || (echo "dist/index.d.ts not found" && exit 1)
37+
echo "Build output verified"
38+
39+
- name: Check package contents
40+
run: npm pack --dry-run

CHANGELOG.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/), and this project adheres to [Semantic Versioning](https://semver.org/).
6+
7+
## [1.0.0] - 2026-03-06
8+
9+
### Added
10+
11+
- MCP server with stdio transport for clipboard image access
12+
- Swift clipboard watcher daemon polling NSPasteboard every 500ms
13+
- `paste_recent` tool — returns recent images from clipboard captures, native screenshots dir, and Spotlight
14+
- `cleanup_images` tool — manual cleanup of temporary session files
15+
- Multi-source image discovery (watcher + native dir + Spotlight mdfind)
16+
- Smart image resizing via `sips` (default max 1568px long edge)
17+
- Password/concealed clipboard detection (1Password, Bitwarden, macOS Keychain)
18+
- Session isolation with UUID-based temp directories
19+
- Symlink protection via `lstat`
20+
- 3-layer auto-cleanup (TTL, max files, max size)
21+
- Configurable via 9 environment variables
22+
- macOS-native: zero external dependencies beyond Node.js and Swift
23+
24+
### Security
25+
26+
- ConcealedType/TransientType clipboard checks before reading
27+
- File permissions: 0600 files, 0700 directories
28+
- maxBuffer + timeout limits on child processes
29+
- No content logging, no network calls, zero telemetry
30+
31+
[1.0.0]: https://github.com/zelentsov-dev/clipsnap-mcp/releases/tag/v1.0.0

CONTRIBUTING.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Contributing to ClipSnap
2+
3+
Thanks for your interest in contributing!
4+
5+
## Getting Started
6+
7+
```bash
8+
git clone https://github.com/zelentsov-dev/clipsnap-mcp.git
9+
cd clipsnap-mcp
10+
npm install
11+
npm run build
12+
```
13+
14+
## Development
15+
16+
```bash
17+
npm run dev # run with tsx (hot reload)
18+
npm run build # compile TypeScript + Swift watcher
19+
```
20+
21+
## Guidelines
22+
23+
- **Open an issue first** before starting work on large changes
24+
- Keep PRs focused — one feature or fix per PR
25+
- Follow existing code style (TypeScript strict mode, 2-space indent)
26+
- Test your changes manually on macOS with iTerm2 + Claude Code
27+
- No external runtime dependencies — the project is intentionally dependency-light
28+
29+
## Architecture
30+
31+
```
32+
src/
33+
index.ts — MCP server entry point, tool definitions
34+
config.ts — environment variable parsing
35+
clipboard.ts — pngpaste + osascript clipboard reading
36+
image.ts — sips-based image processing
37+
screenshots.ts — multi-source screenshot discovery
38+
security.ts — concealed clipboard detection
39+
storage.ts — session file management + cleanup
40+
watcher.ts — Swift watcher process lifecycle
41+
42+
watcher/
43+
Sources/ — Swift clipboard watcher daemon
44+
Package.swift — Swift package manifest
45+
```
46+
47+
## Reporting Bugs
48+
49+
Use the [bug report template](https://github.com/zelentsov-dev/clipsnap-mcp/issues/new?template=bug_report.yml). Include:
50+
51+
- ClipSnap version (`npm list -g clipsnap-mcp`)
52+
- macOS version
53+
- Terminal app (iTerm2, Terminal.app, etc.)
54+
- MCP client (Claude Code, Cursor, etc.)
55+
56+
## License
57+
58+
By contributing, you agree that your contributions will be licensed under the [MIT License](LICENSE).

package.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@
3636
],
3737
"author": "Aleksei Zelentsov",
3838
"license": "MIT",
39+
"repository": {
40+
"type": "git",
41+
"url": "git+https://github.com/zelentsov-dev/clipsnap-mcp.git"
42+
},
43+
"homepage": "https://github.com/zelentsov-dev/clipsnap-mcp#readme",
44+
"bugs": {
45+
"url": "https://github.com/zelentsov-dev/clipsnap-mcp/issues"
46+
},
3947
"dependencies": {
4048
"@modelcontextprotocol/sdk": "^1.27.0"
4149
},

0 commit comments

Comments
 (0)