mcp-sunsama 0.2.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/.changeset/README.md +8 -0
- package/.changeset/config.json +11 -0
- package/.claude/settings.local.json +29 -0
- package/.env.example +10 -0
- package/CHANGELOG.md +29 -0
- package/CLAUDE.md +137 -0
- package/LICENSE +21 -0
- package/README.md +143 -0
- package/TODO_PREPUBLISH.md +182 -0
- package/bun.lock +515 -0
- package/dist/auth/http.d.ts +20 -0
- package/dist/auth/http.d.ts.map +1 -0
- package/dist/auth/http.js +52 -0
- package/dist/auth/stdio.d.ts +13 -0
- package/dist/auth/stdio.d.ts.map +1 -0
- package/dist/auth/stdio.js +27 -0
- package/dist/auth/types.d.ts +9 -0
- package/dist/auth/types.d.ts.map +1 -0
- package/dist/auth/types.js +1 -0
- package/dist/config/transport.d.ts +32 -0
- package/dist/config/transport.d.ts.map +1 -0
- package/dist/config/transport.js +62 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +473 -0
- package/dist/schemas.d.ts +522 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/schemas.js +124 -0
- package/dist/utils/client-resolver.d.ts +10 -0
- package/dist/utils/client-resolver.d.ts.map +1 -0
- package/dist/utils/client-resolver.js +19 -0
- package/dist/utils/task-filters.d.ts +29 -0
- package/dist/utils/task-filters.d.ts.map +1 -0
- package/dist/utils/task-filters.js +42 -0
- package/dist/utils/task-trimmer.d.ts +47 -0
- package/dist/utils/task-trimmer.d.ts.map +1 -0
- package/dist/utils/task-trimmer.js +50 -0
- package/dist/utils/to-tsv.d.ts +8 -0
- package/dist/utils/to-tsv.d.ts.map +1 -0
- package/dist/utils/to-tsv.js +64 -0
- package/mcp-inspector.json +14 -0
- package/package.json +56 -0
- package/src/auth/http.ts +61 -0
- package/src/auth/stdio.ts +33 -0
- package/src/auth/types.ts +9 -0
- package/src/config/transport.ts +80 -0
- package/src/main.ts +542 -0
- package/src/schemas.ts +169 -0
- package/src/utils/client-resolver.ts +23 -0
- package/src/utils/task-filters.ts +49 -0
- package/src/utils/task-trimmer.ts +81 -0
- package/src/utils/to-tsv.ts +73 -0
- package/tsconfig.json +36 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Changesets
|
|
2
|
+
|
|
3
|
+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
|
|
4
|
+
with multi-package repos, or single-package repos to help you version and publish your code. You can
|
|
5
|
+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
|
|
6
|
+
|
|
7
|
+
We have a quick list of common questions to get you started engaging with this project in
|
|
8
|
+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
|
|
3
|
+
"changelog": "@changesets/cli/changelog",
|
|
4
|
+
"commit": false,
|
|
5
|
+
"fixed": [],
|
|
6
|
+
"linked": [],
|
|
7
|
+
"access": "public",
|
|
8
|
+
"baseBranch": "main",
|
|
9
|
+
"updateInternalDependencies": "patch",
|
|
10
|
+
"ignore": []
|
|
11
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"mcp__context7__resolve-library-id",
|
|
5
|
+
"mcp__context7__get-library-docs",
|
|
6
|
+
"mcp__sunsama__get-tasks-by-day",
|
|
7
|
+
"mcp__sunsama__get-user",
|
|
8
|
+
"mcp__time__get_current_time",
|
|
9
|
+
"mcp__sunsama__get-tasks-backlog",
|
|
10
|
+
"Bash(npm run typecheck:*)",
|
|
11
|
+
"Bash(find:*)",
|
|
12
|
+
"Bash(ls:*)",
|
|
13
|
+
"Bash(bun run build:*)",
|
|
14
|
+
"Bash(npm pack:*)",
|
|
15
|
+
"mcp__sequential-thinking__sequentialthinking",
|
|
16
|
+
"Bash(gh auth:*)"
|
|
17
|
+
],
|
|
18
|
+
"deny": []
|
|
19
|
+
},
|
|
20
|
+
"enabledMcpjsonServers": [
|
|
21
|
+
"brave-search",
|
|
22
|
+
"context7",
|
|
23
|
+
"fetch",
|
|
24
|
+
"puppeteer",
|
|
25
|
+
"sequential-thinking",
|
|
26
|
+
"sunsama",
|
|
27
|
+
"time"
|
|
28
|
+
]
|
|
29
|
+
}
|
package/.env.example
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# MCP Server Configuration
|
|
2
|
+
PORT=3002
|
|
3
|
+
|
|
4
|
+
# Sunsama Authentication
|
|
5
|
+
# Option 1: Use session token (recommended for server environments)
|
|
6
|
+
SUNSAMA_SESSION_TOKEN=your-session-token-here
|
|
7
|
+
|
|
8
|
+
# Option 2: Use email/password (for development/testing)
|
|
9
|
+
# SUNSAMA_EMAIL=your-email@example.com
|
|
10
|
+
# SUNSAMA_PASSWORD=your-password
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# mcp-sunsama
|
|
2
|
+
|
|
3
|
+
## 0.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Initial release of MCP Sunsama Server
|
|
8
|
+
|
|
9
|
+
- Full CRUD task management (create, read, update, delete)
|
|
10
|
+
- Dual transport support (stdio and HTTP stream)
|
|
11
|
+
- User operations and stream management
|
|
12
|
+
- Task filtering by completion status
|
|
13
|
+
- Response optimization with task trimming
|
|
14
|
+
- Comprehensive TypeScript support with Zod validation
|
|
15
|
+
- Authentication support for session tokens and email/password
|
|
16
|
+
|
|
17
|
+
## 1.0.0
|
|
18
|
+
|
|
19
|
+
### Major Changes
|
|
20
|
+
|
|
21
|
+
- Initial release of MCP Sunsama Server
|
|
22
|
+
|
|
23
|
+
- Full CRUD task management (create, read, update, delete)
|
|
24
|
+
- Dual transport support (stdio and HTTP stream)
|
|
25
|
+
- User operations and stream management
|
|
26
|
+
- Task filtering by completion status
|
|
27
|
+
- Response optimization with task trimming
|
|
28
|
+
- Comprehensive TypeScript support with Zod validation
|
|
29
|
+
- Authentication support for session tokens and email/password
|
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
4
|
+
|
|
5
|
+
## Development Commands
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# Development
|
|
9
|
+
bun run dev # Run server with .env file
|
|
10
|
+
bun run typecheck # TypeScript type checking
|
|
11
|
+
bun run typecheck:watch # Watch mode type checking
|
|
12
|
+
bun run inspect # MCP Inspector for debugging
|
|
13
|
+
|
|
14
|
+
# Build and Distribution
|
|
15
|
+
bun run build # Compile TypeScript to dist/
|
|
16
|
+
bun test # Run test suite
|
|
17
|
+
|
|
18
|
+
# Version Management (Changeset)
|
|
19
|
+
bun run changeset # Create new changeset
|
|
20
|
+
bun run version # Apply changesets and update version
|
|
21
|
+
bun run release # Build and publish to npm
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Architecture Overview
|
|
25
|
+
|
|
26
|
+
### Dual Transport MCP Server
|
|
27
|
+
This server supports two transport modes with different authentication strategies:
|
|
28
|
+
|
|
29
|
+
**Stdio Transport** (default):
|
|
30
|
+
- Single global SunsamaClient authenticated at startup
|
|
31
|
+
- Uses `SUNSAMA_EMAIL`/`SUNSAMA_PASSWORD` environment variables
|
|
32
|
+
- Session maintained for entire server lifetime
|
|
33
|
+
|
|
34
|
+
**HTTP Stream Transport**:
|
|
35
|
+
- Per-request authentication via HTTP Basic Auth
|
|
36
|
+
- Session-isolated SunsamaClient instances
|
|
37
|
+
- Credentials provided in Authorization header
|
|
38
|
+
|
|
39
|
+
Transport selection via `TRANSPORT_TYPE` environment variable ("stdio" | "httpStream").
|
|
40
|
+
|
|
41
|
+
### Client Resolution Pattern
|
|
42
|
+
`utils/client-resolver.ts` abstracts transport differences:
|
|
43
|
+
- **Stdio**: Returns singleton client from global authentication
|
|
44
|
+
- **HTTP**: Extracts client from session data (authenticated per request)
|
|
45
|
+
- Throws standardized errors for unauthenticated requests
|
|
46
|
+
|
|
47
|
+
### Response Optimization Strategy
|
|
48
|
+
Two-tier optimization for large datasets:
|
|
49
|
+
|
|
50
|
+
1. **Task Filtering** (`utils/task-filters.ts`): Filter by completion status before processing
|
|
51
|
+
2. **Task Trimming** (`utils/task-trimmer.ts`): Remove non-essential fields to reduce payload by 60-80%
|
|
52
|
+
|
|
53
|
+
Always apply filtering before trimming for efficiency.
|
|
54
|
+
|
|
55
|
+
### Schema Architecture
|
|
56
|
+
All tools use Zod schemas from `schemas.ts`:
|
|
57
|
+
- Type-safe parameter validation
|
|
58
|
+
- Automatic TypeScript inference
|
|
59
|
+
- Comprehensive parameter documentation
|
|
60
|
+
- Union types for completion filters
|
|
61
|
+
|
|
62
|
+
## Key Patterns
|
|
63
|
+
|
|
64
|
+
### Tool Structure
|
|
65
|
+
Standard pattern for all MCP tools:
|
|
66
|
+
```typescript
|
|
67
|
+
server.addTool({
|
|
68
|
+
name: "tool-name",
|
|
69
|
+
description: "...",
|
|
70
|
+
parameters: toolSchema,
|
|
71
|
+
execute: async (args, {session, log}) => {
|
|
72
|
+
// 1. Extract/validate parameters
|
|
73
|
+
// 2. Get client via getSunsamaClient(session)
|
|
74
|
+
// 3. Call sunsama-api methods
|
|
75
|
+
// 4. Apply filtering/trimming if needed
|
|
76
|
+
// 5. Return formatted response
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Authentication Flow
|
|
82
|
+
- **Stdio**: `initializeStdioAuth()` creates global client at startup
|
|
83
|
+
- **HTTP**: `httpStreamAuthenticator()` authenticates each request
|
|
84
|
+
- Both store client in session data accessible via `getSunsamaClient()`
|
|
85
|
+
|
|
86
|
+
### Configuration Management
|
|
87
|
+
`config/transport.ts` handles environment-based configuration:
|
|
88
|
+
- Zod validation for environment variables
|
|
89
|
+
- Sensible defaults (stdio transport, port 3000)
|
|
90
|
+
- Clear error messages for invalid configurations
|
|
91
|
+
|
|
92
|
+
### Output Formatting
|
|
93
|
+
- **JSON**: Single objects (user data)
|
|
94
|
+
- **TSV**: Arrays (tasks, streams) - optimized for Claude's data processing
|
|
95
|
+
- **Structured Logging**: Consistent patterns across all tools
|
|
96
|
+
|
|
97
|
+
## Code Organization
|
|
98
|
+
|
|
99
|
+
- `src/main.ts`: FastMCP server setup and tool definitions
|
|
100
|
+
- `src/schemas.ts`: Zod validation schemas for all tools
|
|
101
|
+
- `src/auth/`: Authentication strategies per transport type
|
|
102
|
+
- `src/config/`: Environment configuration and validation
|
|
103
|
+
- `src/utils/`: Reusable utilities (client resolution, filtering, formatting)
|
|
104
|
+
|
|
105
|
+
## Important Notes
|
|
106
|
+
|
|
107
|
+
### Version Synchronization
|
|
108
|
+
Always keep FastMCP server version in `src/main.ts` (line ~32) synchronized with `package.json` version.
|
|
109
|
+
|
|
110
|
+
### Environment Variables
|
|
111
|
+
Required for stdio transport:
|
|
112
|
+
- `SUNSAMA_EMAIL`: Sunsama account email
|
|
113
|
+
- `SUNSAMA_PASSWORD`: Sunsama account password
|
|
114
|
+
|
|
115
|
+
Optional:
|
|
116
|
+
- `TRANSPORT_TYPE`: "stdio" (default) | "httpStream"
|
|
117
|
+
- `PORT`: Server port (default: 3002, HTTP transport only)
|
|
118
|
+
|
|
119
|
+
### Task Operations
|
|
120
|
+
Full CRUD support:
|
|
121
|
+
- **Read**: `get-tasks-by-day`, `get-tasks-backlog`, `get-streams`
|
|
122
|
+
- **Write**: `create-task`, `update-task-complete`, `delete-task`
|
|
123
|
+
|
|
124
|
+
All task operations support completion filtering and response trimming.
|
|
125
|
+
|
|
126
|
+
### Testing Tools
|
|
127
|
+
Use MCP Inspector for debugging: `bun run inspect`
|
|
128
|
+
Configure different server variants in `mcp-inspector.json` for testing various scenarios.
|
|
129
|
+
|
|
130
|
+
## Version Management
|
|
131
|
+
|
|
132
|
+
**IMPORTANT**: Keep the FastMCP server version in sync with package.json version.
|
|
133
|
+
|
|
134
|
+
When updating the version:
|
|
135
|
+
1. Update `package.json` version (done automatically by changesets)
|
|
136
|
+
2. Manually update the FastMCP server version in `src/main.ts`
|
|
137
|
+
3. Both versions must be identical for consistency
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Robert Niimi
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# Sunsama MCP Server
|
|
2
|
+
|
|
3
|
+
A Model Context Protocol (MCP) server that provides comprehensive task management capabilities through the Sunsama API. This server enables AI assistants to access Sunsama tasks, create new tasks, mark tasks complete, and manage your productivity workflow.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
### Task Management
|
|
8
|
+
- **Create Tasks** - Create new tasks with notes, time estimates, due dates, and stream assignments
|
|
9
|
+
- **Read Tasks** - Get tasks by day with completion filtering, access backlog tasks
|
|
10
|
+
- **Update Tasks** - Mark tasks as complete with custom timestamps
|
|
11
|
+
- **Delete Tasks** - Permanently remove tasks from your workspace
|
|
12
|
+
|
|
13
|
+
### User & Stream Operations
|
|
14
|
+
- **User Information** - Access user profile, timezone, and group details
|
|
15
|
+
- **Stream Management** - Get streams/channels for project organization
|
|
16
|
+
- **Dual Transport** - Support for both stdio and HTTP stream MCP transports
|
|
17
|
+
|
|
18
|
+
## Installation
|
|
19
|
+
|
|
20
|
+
### Prerequisites
|
|
21
|
+
- [Bun](https://bun.sh) runtime (for development)
|
|
22
|
+
- Sunsama account with API access
|
|
23
|
+
|
|
24
|
+
### Using NPX (Recommended)
|
|
25
|
+
No installation required! Use directly with:
|
|
26
|
+
```bash
|
|
27
|
+
npx mcp-sunsama
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Development Setup
|
|
31
|
+
1. Clone the repository:
|
|
32
|
+
```bash
|
|
33
|
+
git clone https://github.com/robertn702/mcp-sunsama.git
|
|
34
|
+
cd mcp-sunsama
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
2. Install dependencies:
|
|
38
|
+
```bash
|
|
39
|
+
bun install
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
3. Set up your environment variables:
|
|
43
|
+
```bash
|
|
44
|
+
cp .env.example .env
|
|
45
|
+
# Edit .env and add your Sunsama credentials
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Environment variables:
|
|
49
|
+
- `SUNSAMA_EMAIL` - Your Sunsama account email (required for stdio transport)
|
|
50
|
+
- `SUNSAMA_PASSWORD` - Your Sunsama account password (required for stdio transport)
|
|
51
|
+
- `SUNSAMA_SESSION_TOKEN` - Alternative session token authentication (optional)
|
|
52
|
+
- `PORT` - Server port for HTTP transport (default: 3002)
|
|
53
|
+
- `MCP_TRANSPORT` - Transport type: `stdio` or `httpStream` (default: stdio)
|
|
54
|
+
|
|
55
|
+
## Usage
|
|
56
|
+
|
|
57
|
+
### Running the Server
|
|
58
|
+
|
|
59
|
+
**Stdio Transport (default):**
|
|
60
|
+
```bash
|
|
61
|
+
bun run src/main.ts
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**HTTP Stream Transport:**
|
|
65
|
+
```bash
|
|
66
|
+
MCP_TRANSPORT=httpStream PORT=3002 bun run src/main.ts
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Claude Desktop Configuration
|
|
70
|
+
|
|
71
|
+
Add this configuration to your Claude Desktop MCP settings:
|
|
72
|
+
|
|
73
|
+
```json
|
|
74
|
+
{
|
|
75
|
+
"mcpServers": {
|
|
76
|
+
"sunsama": {
|
|
77
|
+
"command": "npx",
|
|
78
|
+
"args": ["mcp-sunsama"],
|
|
79
|
+
"env": {
|
|
80
|
+
"SUNSAMA_EMAIL": "your-email@example.com",
|
|
81
|
+
"SUNSAMA_PASSWORD": "your-password"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## API Tools
|
|
89
|
+
|
|
90
|
+
### Task Management
|
|
91
|
+
- `create-task` - Create new tasks with optional properties
|
|
92
|
+
- `get-tasks-by-day` - Get tasks for a specific day with completion filtering
|
|
93
|
+
- `get-tasks-backlog` - Get backlog tasks
|
|
94
|
+
- `update-task-complete` - Mark tasks as complete
|
|
95
|
+
- `delete-task` - Delete tasks permanently
|
|
96
|
+
|
|
97
|
+
### User & Stream Operations
|
|
98
|
+
- `get-user` - Get current user information
|
|
99
|
+
- `get-streams` - Get streams/channels for project organization
|
|
100
|
+
|
|
101
|
+
## Development
|
|
102
|
+
|
|
103
|
+
### Running in Development
|
|
104
|
+
```bash
|
|
105
|
+
bun run dev
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### Testing with MCP Inspector
|
|
109
|
+
```bash
|
|
110
|
+
bun run inspect
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Then connect the MCP Inspector to test the tools interactively.
|
|
114
|
+
|
|
115
|
+
### Build
|
|
116
|
+
```bash
|
|
117
|
+
bun run build
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Authentication
|
|
121
|
+
|
|
122
|
+
**Stdio Transport:** Requires `SUNSAMA_EMAIL` and `SUNSAMA_PASSWORD` environment variables.
|
|
123
|
+
|
|
124
|
+
**HTTP Transport:** The Sunsama credentials are passed in the HTTP request. No environment variables needed.
|
|
125
|
+
|
|
126
|
+
## Contributing
|
|
127
|
+
|
|
128
|
+
1. Fork the repository
|
|
129
|
+
2. Create a feature branch
|
|
130
|
+
3. Make your changes
|
|
131
|
+
4. Add tests if applicable
|
|
132
|
+
5. Submit a pull request
|
|
133
|
+
|
|
134
|
+
## License
|
|
135
|
+
|
|
136
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
137
|
+
|
|
138
|
+
## Support
|
|
139
|
+
|
|
140
|
+
- [Sunsama API Documentation](https://help.sunsama.com)
|
|
141
|
+
- [sunsama-api Library](https://github.com/robertn702/sunsama-api) - The underlying API client
|
|
142
|
+
- [Model Context Protocol Documentation](https://modelcontextprotocol.io)
|
|
143
|
+
- [Issue Tracker](https://github.com/robertn702/mcp-sunsama/issues)
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
# MCP Sunsama - Pre-Publish Checklist
|
|
2
|
+
|
|
3
|
+
## ๐จ Critical Blockers (Must Fix Before Publishing)
|
|
4
|
+
|
|
5
|
+
### 1. Package Configuration Issues
|
|
6
|
+
- [x] โ
**Remove `"private": true`** from package.json (publishing now enabled)
|
|
7
|
+
- [x] โ
Add essential package.json metadata:
|
|
8
|
+
- [x] โ
`"version": "0.1.0"`: Initial version
|
|
9
|
+
- [x] โ
`"description": "MCP server for Sunsama API integration"`: Package description
|
|
10
|
+
- [x] โ
`"type": "module"`: ES module support
|
|
11
|
+
- [x] โ
`"keywords": ["mcp", "sunsama", "task-management", "api", "productivity"]`: Search keywords
|
|
12
|
+
- [x] โ
`"author": "Robert Niimi <robertn702@gmail.com>"`: Author information
|
|
13
|
+
- [x] โ
`"license": "MIT"`: License specification
|
|
14
|
+
- [x] โ
`"repository": {"type": "git", "url": "https://github.com/robertn702/mcp-sunsama.git"}`: Git repository
|
|
15
|
+
- [x] โ
`"homepage": "https://github.com/robertn702/mcp-sunsama#readme"`: Homepage URL
|
|
16
|
+
- [x] โ
`"bugs": {"url": "https://github.com/robertn702/mcp-sunsama/issues"}`: Bug tracker
|
|
17
|
+
- [x] โ
`"main": "dist/main.js"`: Entry point
|
|
18
|
+
- [x] โ
`"types": "dist/main.d.ts"`: TypeScript definitions
|
|
19
|
+
- [x] โ
`"bin": {"mcp-sunsama": "./dist/main.js"}`: CLI executable
|
|
20
|
+
- [x] โ
`"publishConfig": {"access": "public"}`: NPM publish settings
|
|
21
|
+
|
|
22
|
+
### 2. Build System Configuration
|
|
23
|
+
- [x] โ
**Fix tsconfig.json** - Build output now properly configured
|
|
24
|
+
- [x] โ
Change `"noEmit": false`
|
|
25
|
+
- [x] โ
Add `"outDir": "dist"`
|
|
26
|
+
- [x] โ
Add `"declaration": true` for TypeScript definitions
|
|
27
|
+
- [x] โ
Add `"declarationMap": true` for source maps
|
|
28
|
+
- [x] โ
Add `"exclude": ["dist", "node_modules"]`
|
|
29
|
+
- [x] โ
Remove `"allowImportingTsExtensions"` (incompatible with emit)
|
|
30
|
+
|
|
31
|
+
### 3. Legal Requirements
|
|
32
|
+
- [x] โ
**Create LICENSE file** (MIT License to match author's other projects)
|
|
33
|
+
|
|
34
|
+
## ๐ฅ High Priority Setup
|
|
35
|
+
|
|
36
|
+
### 4. Changeset Configuration
|
|
37
|
+
- [x] โ
Install changeset: `bun add -D @changesets/cli`
|
|
38
|
+
- [x] โ
Initialize changeset: `bunx changeset init`
|
|
39
|
+
- [x] โ
Add changeset scripts to package.json:
|
|
40
|
+
```json
|
|
41
|
+
{
|
|
42
|
+
"scripts": {
|
|
43
|
+
"changeset": "changeset",
|
|
44
|
+
"version": "changeset version",
|
|
45
|
+
"release": "bun run build && changeset publish"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
- [x] โ
Configure changeset for public access
|
|
50
|
+
|
|
51
|
+
### 5. Build Scripts & Inspection
|
|
52
|
+
- [x] โ
Build script exists: `"build": "bunx tsc"`
|
|
53
|
+
- [ ] Add additional inspection scripts from mcp-openweathermap:
|
|
54
|
+
```json
|
|
55
|
+
{
|
|
56
|
+
"scripts": {
|
|
57
|
+
"inspect:built": "bunx @modelcontextprotocol/inspector --config ./mcp-inspector.json --server sunsama-built",
|
|
58
|
+
"inspect:http": "bunx @modelcontextprotocol/inspector --config ./mcp-inspector.json --server sunsama-http"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
- [x] โ
Test build process: `bun run build`
|
|
63
|
+
- [x] โ
Verify dist/ directory is created with .js and .d.ts files
|
|
64
|
+
|
|
65
|
+
### 6. Dependencies Audit
|
|
66
|
+
- [x] โ
Runtime dependencies properly classified
|
|
67
|
+
- [x] โ
**Fix dev dependencies**: Move TypeScript to devDependencies from peerDependencies
|
|
68
|
+
- [x] โ
Add missing `@changesets/cli` to devDependencies
|
|
69
|
+
|
|
70
|
+
## ๐ Medium Priority Improvements
|
|
71
|
+
|
|
72
|
+
### 7. Documentation Enhancements
|
|
73
|
+
- [ ] Add npm installation instructions to README.md
|
|
74
|
+
- [ ] Add npm version badge
|
|
75
|
+
- [ ] Add license badge
|
|
76
|
+
- [ ] Add contribution guidelines section
|
|
77
|
+
- [ ] Update usage examples for npm installation
|
|
78
|
+
- [ ] Add CLAUDE.md file following mcp-openweathermap pattern with:
|
|
79
|
+
- Development commands
|
|
80
|
+
- Architecture overview
|
|
81
|
+
- Core components documentation
|
|
82
|
+
- Version sync instructions (FastMCP server version)
|
|
83
|
+
|
|
84
|
+
### 8. Package Architecture โ
Confirmed
|
|
85
|
+
- [x] โ
**Executable CLI tool** (following mcp-openweathermap pattern)
|
|
86
|
+
- Uses `"bin"` field for CLI executable
|
|
87
|
+
- Server application distributed via npm
|
|
88
|
+
- Matches established MCP server pattern
|
|
89
|
+
|
|
90
|
+
### 9. Testing Infrastructure
|
|
91
|
+
- [ ] Add test files (currently no tests found)
|
|
92
|
+
- [ ] Add `"test"` script that actually runs tests
|
|
93
|
+
- [ ] Consider adding integration tests for Sunsama API
|
|
94
|
+
- [ ] Add CI/CD workflow for automated testing
|
|
95
|
+
|
|
96
|
+
## ๐งช Pre-Publish Testing Checklist
|
|
97
|
+
|
|
98
|
+
### Phase 1: Fix Critical Issues
|
|
99
|
+
- [x] โ
Complete all critical blockers above
|
|
100
|
+
- [x] โ
Test TypeScript compilation: `bun run typecheck`
|
|
101
|
+
- [x] โ
Test build process: `bun run build`
|
|
102
|
+
|
|
103
|
+
### Phase 2: Package Validation
|
|
104
|
+
- [ ] Validate package contents: `npm pack --dry-run`
|
|
105
|
+
- [ ] Review file list - ensure only necessary files included
|
|
106
|
+
- [ ] Check package size is reasonable
|
|
107
|
+
|
|
108
|
+
### Phase 3: Local Testing
|
|
109
|
+
- [ ] Create test package: `npm pack`
|
|
110
|
+
- [ ] Install .tgz file locally in test project
|
|
111
|
+
- [ ] Verify import/require works correctly
|
|
112
|
+
- [ ] Test actual MCP server functionality
|
|
113
|
+
|
|
114
|
+
### Phase 4: Version Management
|
|
115
|
+
- [ ] Create first changeset: `bunx changeset add`
|
|
116
|
+
- [ ] Write meaningful changeset description
|
|
117
|
+
- [ ] Run version bump: `bun run version`
|
|
118
|
+
- [ ] Review generated CHANGELOG.md
|
|
119
|
+
|
|
120
|
+
### Phase 5: Final Publish
|
|
121
|
+
- [ ] **Important**: Update FastMCP server version in `src/main.ts` to match package.json version
|
|
122
|
+
- [ ] Final build: `bun run build`
|
|
123
|
+
- [ ] Final tests: `bun run test`
|
|
124
|
+
- [ ] Publish: `bun run release`
|
|
125
|
+
- [ ] Verify package appears on npm
|
|
126
|
+
- [ ] Test installation from npm: `npm install mcp-sunsama`
|
|
127
|
+
|
|
128
|
+
## ๐ Current Status Assessment
|
|
129
|
+
|
|
130
|
+
### โ
What's Good
|
|
131
|
+
- โ
Well-structured TypeScript codebase with full CRUD operations
|
|
132
|
+
- โ
Comprehensive task mutation tools (create, update-complete, delete)
|
|
133
|
+
- โ
Good README.md documentation
|
|
134
|
+
- โ
Modern build tooling (Bun) and TypeScript setup
|
|
135
|
+
- โ
Environment configuration handling with dual transport modes
|
|
136
|
+
- โ
Proper error handling and logging patterns
|
|
137
|
+
- โ
Schema validation with Zod
|
|
138
|
+
|
|
139
|
+
### โ
All Major Issues Resolved
|
|
140
|
+
- [x] โ
Package marked as private (blocks publishing) - FIXED
|
|
141
|
+
- [x] โ
No build output configuration (noEmit: true) - FIXED
|
|
142
|
+
- [x] โ
Missing LICENSE file - FIXED
|
|
143
|
+
- [x] โ
No changeset setup - FIXED
|
|
144
|
+
- [x] โ
Missing essential package.json metadata - FIXED
|
|
145
|
+
- [x] โ
TypeScript in wrong dependency category - FIXED
|
|
146
|
+
|
|
147
|
+
### โ
Architecture Confirmed
|
|
148
|
+
- โ
MCP server application (matches mcp-openweathermap pattern)
|
|
149
|
+
- โ
NPM publishing is appropriate distribution method
|
|
150
|
+
- โ
CLI executable pattern established
|
|
151
|
+
- โ
Dual transport support (stdio/HTTP) implemented
|
|
152
|
+
|
|
153
|
+
## ๐ Quick Start Command Sequence
|
|
154
|
+
|
|
155
|
+
Ready for first publication:
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
# 1. Create first changeset
|
|
159
|
+
bunx changeset add
|
|
160
|
+
|
|
161
|
+
# 2. Version and publish
|
|
162
|
+
bun run version
|
|
163
|
+
bun run release
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
**All setup steps completed!** โ
|
|
167
|
+
|
|
168
|
+
## ๐ Important Notes
|
|
169
|
+
|
|
170
|
+
- **Version Sync**: Always keep FastMCP server version in `src/main.ts` line ~31 synchronized with package.json version
|
|
171
|
+
- **Package Type**: โ
Confirmed as executable CLI tool (matches mcp-openweathermap pattern)
|
|
172
|
+
- **Target Audience**: MCP users who want Sunsama task management integration
|
|
173
|
+
- **Security**: โ
No sensitive information in source code (uses environment variables)
|
|
174
|
+
- **Architecture**: โ
Dual transport MCP server with comprehensive task management tools
|
|
175
|
+
|
|
176
|
+
## ๐ฏ Priority Order
|
|
177
|
+
|
|
178
|
+
1. **Critical Blockers** (Sections 1-3): Must be completed before any publishing attempt
|
|
179
|
+
2. **Changeset Setup** (Section 4): Required for version management
|
|
180
|
+
3. **Build Verification** (Section 5): Ensure compilation works
|
|
181
|
+
4. **Documentation** (Section 7): Improve user experience
|
|
182
|
+
5. **Testing** (Section 9): Add comprehensive test coverage
|