@wsapichat/mcp-server 1.0.4 → 1.0.5

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.
Files changed (3) hide show
  1. package/README.md +5 -5
  2. package/package.json +2 -3
  3. package/CLAUDE.md +0 -96
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  [![npm version](https://badge.fury.io/js/@wsapichat%2Fmcp-server.svg)](https://badge.fury.io/js/@wsapichat%2Fmcp-server)
4
4
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
5
 
6
- A comprehensive Model Context Protocol (MCP) server that provides LLMs with seamless access to WhatsApp functionality through the WSAPI service. This server enables AI assistants to send messages, manage contacts and groups, handle chat operations, and monitor session status.
6
+ A comprehensive Model Context Protocol (MCP) server that provides LLMs with seamless access to WhatsApp functionality through the WSAPI service. This server enables AI assistants to send messages, manage contacts and groups, handle chat operations, and much more functionallity.
7
7
 
8
8
  ## 🚀 Features
9
9
 
@@ -386,18 +386,18 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
386
386
 
387
387
  ## 🔗 Links
388
388
 
389
- - [WSAPI Documentation](https://docs.wsapi.chat)
389
+ - [WSAPI Documentation](https://wsapi.gitbook.io/wsapi-docs)
390
390
  - [Model Context Protocol](https://modelcontextprotocol.io)
391
- - [OpenAPI Specification](./wsapi.yml)
391
+ - [OpenAPI Specification](https://openapi.gitbook.com/o/VqjwkXj2jsuSdFqwsNwR/spec/wsapi-api.yaml)
392
392
 
393
393
  ## 📞 Support
394
394
 
395
395
  For support and questions:
396
396
 
397
397
  - Create an issue in this repository
398
- - Check the [WSAPI documentation](https://docs.wsapi.chat)
398
+ - Check the [WSAPI documentation](https://wsapi.gitbook.io/wsapi-docs)
399
399
  - Contact WSAPI support for API-related issues
400
400
 
401
401
  ---
402
402
 
403
- Built with ❤️ using TypeScript, Zod, and the Model Context Protocol SDK.
403
+ Built with ❤️ using TypeScript, and the Model Context Protocol SDK.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wsapichat/mcp-server",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "A comprehensive Model Context Protocol (MCP) server for WSAPI - the powerful WhatsApp API Gateway. Enables LLMs to send messages, manage contacts and groups, handle chat operations, and monitor session status through WhatsApp.",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -74,8 +74,7 @@
74
74
  "files": [
75
75
  "dist",
76
76
  "README.md",
77
- "LICENSE",
78
- "CLAUDE.md"
77
+ "LICENSE"
79
78
  ],
80
79
  "publishConfig": {
81
80
  "access": "public"
package/CLAUDE.md DELETED
@@ -1,96 +0,0 @@
1
- # CLAUDE.md
2
-
3
- This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
-
5
- ## Project Overview
6
-
7
- This is a TypeScript-based Model Context Protocol (MCP) server that provides LLMs with WhatsApp functionality through the WSAPI service. The server exposes WhatsApp messaging, contact management, group operations, and session handling as MCP tools.
8
-
9
- ## Development Commands
10
-
11
- ### Build & Run
12
- - `npm run build` - Compile TypeScript to JavaScript in dist/ directory
13
- - `npm run dev` - Run in development mode with tsx
14
- - `npm start` - Run compiled server from dist/
15
- - `npm run clean` - Remove dist/ directory
16
-
17
- ### Code Quality
18
- - `npm run lint` - Run ESLint on TypeScript files
19
- - `npm run lint:fix` - Fix ESLint issues automatically
20
- - `npm run type-check` - Run TypeScript compiler without emitting files
21
-
22
- ### Testing
23
- - `npm test` - Run Jest test suite
24
- - `npm run test:watch` - Run tests in watch mode
25
-
26
- ### Type Generation
27
- - `npm run generate-types` - Generate TypeScript types from wsapi.yml OpenAPI spec
28
-
29
- ## Architecture
30
-
31
- ### Core Components
32
- - `src/index.ts` - Entry point with server startup and graceful shutdown
33
- - `src/server.ts` - WSAPIMCPServer class that manages MCP server and tool registration
34
- - `src/client/index.ts` - WSAPI HTTP client wrapper
35
- - `src/config/index.ts` - Environment configuration management
36
-
37
- ### Tool Organization
38
- Tools are organized by functionality in `src/tools/`:
39
- - `messaging.ts` - Basic message sending (text, media, stickers, etc.)
40
- - `messaging-advanced.ts` - Advanced message operations (edit, delete, reactions)
41
- - `contacts.ts` - Contact management and presence
42
- - `groups.ts` - Group creation and management
43
- - `chats.ts` - Chat operations (archive, pin, presence)
44
- - `session.ts` - WhatsApp session management (QR codes, logout)
45
- - `instance.ts` - WSAPI instance configuration
46
- - `account.ts` - Account profile management
47
-
48
- ### Utilities
49
- - `src/utils/logger.ts` - Winston-based logging with structured output
50
- - `src/utils/errors.ts` - Error handling and user-friendly error messages
51
- - `src/validation/schemas.ts` - Zod schemas for input validation
52
- - `src/types/api.ts` - Generated TypeScript types from OpenAPI spec
53
-
54
- ## Key Technical Details
55
-
56
- ### Module System
57
- - Uses ES modules (`"type": "module"` in package.json)
58
- - All imports must use `.js` extensions for compiled output
59
- - TypeScript compiles to ESNext targeting ES2022
60
-
61
- ### Error Handling
62
- - Custom error classes for different error types (ValidationError, APIError, etc.)
63
- - Centralized error handling with user-friendly messages
64
- - Comprehensive logging for debugging
65
-
66
- ### Configuration
67
- Required environment variables:
68
- - `WSAPI_API_KEY` - API authentication key
69
- - `WSAPI_INSTANCE_ID` - WSAPI instance identifier
70
- - `WSAPI_BASE_URL` - API base URL (defaults to https://api.wsapi.chat)
71
-
72
- ### Tool Pattern
73
- Each tool follows a consistent pattern:
74
- - Zod schema for input validation
75
- - Handler function that calls WSAPI client
76
- - Error handling with proper MCP responses
77
- - Structured logging
78
-
79
- ### Testing Setup
80
- - Jest configured for ES modules with ts-jest
81
- - Test files use `.test.ts` or `.spec.ts` extensions
82
- - Coverage collection excludes test files and type definitions
83
-
84
- ## Development Notes
85
-
86
- ### Building
87
- Always run `npm run build` after changes before testing with `npm start`. The MCP server runs the compiled JavaScript, not TypeScript directly.
88
-
89
- ### API Types
90
- When the WSAPI specification changes, regenerate types with `npm run generate-types` to update `src/types/api.ts`.
91
-
92
- ### Logging
93
- Use the logger from `src/utils/logger.ts` for consistent structured logging. Log levels: error, warn, info, debug.
94
-
95
- ### Tool Registration
96
- New tools must be registered in the appropriate tool module and imported/registered in `src/server.ts`.