Skip to content

Commit 1b7ff6b

Browse files
artmin96claude
andcommitted
Prepare for npm publishing
- Fix installation instructions to use proper npm workflow - Remove --cwd flags that cause errors - Show cd to project directory first, then simple command names - Update package.json with bin field for global install - Add repository metadata and npm publishing config 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 27d3dc2 commit 1b7ff6b

File tree

2 files changed

+56
-22
lines changed

2 files changed

+56
-22
lines changed

README.md

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -31,46 +31,49 @@ A Model Context Protocol (MCP) server for Yii2 framework, providing database sch
3131

3232
## Installation
3333

34-
1. **Install Dependencies**
34+
### Option 1: NPM Install (Recommended)
35+
36+
```bash
37+
npm install -g yii2-mcp-server
38+
```
39+
40+
Then configure Claude Code from your Yii2 project directory:
41+
```bash
42+
cd /path/to/your/yii2/project
43+
claude mcp add yii2 yii2-mcp-server
44+
```
45+
46+
### Option 2: Manual Installation
47+
48+
1. **Clone and Install**
3549
```bash
50+
git clone https://github.com/ArtMin96/yii2-mcp-server.git
3651
cd yii2-mcp-server
3752
npm install
38-
```
39-
40-
2. **Build the Server**
41-
```bash
4253
npm run build
4354
```
4455

45-
3. **Configure Claude Code**
56+
2. **Configure Claude Code**
4657

47-
**Recommended Method - Using Claude CLI:**
58+
**Using Claude CLI:**
4859
```bash
49-
claude mcp add yii2 node /var/www/billing/yii2-mcp-server/dist/index.js --cwd /var/www/billing
60+
cd /path/to/your/yii2/project
61+
claude mcp add yii2 node /path/to/yii2-mcp-server/dist/index.js
5062
```
5163

52-
**Alternative - Manual JSON Configuration:**
53-
54-
Add this MCP server configuration to your Claude Code settings. The server will automatically detect your Yii2 project configuration.
55-
64+
**Manual JSON Configuration:**
5665
```json
5766
{
5867
"mcpServers": {
5968
"yii2": {
6069
"command": "node",
61-
"args": ["/path/to/your/project/yii2-mcp-server/dist/index.js"],
70+
"args": ["/path/to/yii2-mcp-server/dist/index.js"],
6271
"cwd": "/path/to/your/yii2/project"
6372
}
6473
}
6574
}
6675
```
6776

68-
**Using NPM Global Install:**
69-
```bash
70-
npm install -g ./yii2-mcp-server
71-
claude mcp add yii2 yii2-mcp-server --cwd /path/to/your/yii2/project
72-
```
73-
7477
## Configuration
7578

7679
The MCP server automatically detects your Yii2 project configuration:

package.json

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,46 @@
33
"version": "1.0.0",
44
"description": "MCP Server for Yii2 Framework - Database schema inspection, command execution, and project management",
55
"main": "dist/index.js",
6+
"bin": {
7+
"yii2-mcp-server": "dist/index.js"
8+
},
69
"type": "module",
710
"scripts": {
811
"build": "tsc",
912
"dev": "tsc --watch",
10-
"start": "node dist/index.js"
13+
"start": "node dist/index.js",
14+
"prepublishOnly": "npm run build"
1115
},
12-
"keywords": ["mcp", "yii2", "php", "database", "laravel-boost"],
13-
"author": "Claude Code",
16+
"files": [
17+
"dist/",
18+
"README.md",
19+
"package.json",
20+
"install.sh"
21+
],
22+
"keywords": [
23+
"mcp",
24+
"yii2",
25+
"php",
26+
"database",
27+
"claude-code",
28+
"model-context-protocol",
29+
"yii-framework",
30+
"database-inspection",
31+
"console-commands"
32+
],
33+
"author": "ArtMin96",
1434
"license": "MIT",
35+
"repository": {
36+
"type": "git",
37+
"url": "https://github.com/ArtMin96/yii2-mcp-server.git"
38+
},
39+
"homepage": "https://github.com/ArtMin96/yii2-mcp-server#readme",
40+
"bugs": {
41+
"url": "https://github.com/ArtMin96/yii2-mcp-server/issues"
42+
},
43+
"engines": {
44+
"node": ">=18.0.0"
45+
},
1546
"dependencies": {
1647
"@modelcontextprotocol/sdk": "^0.6.0",
1748
"mysql2": "^3.11.0",

0 commit comments

Comments
 (0)