@projora/mcp-server 1.1.0 ā 1.3.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/README.md +25 -10
- package/build/setup.d.ts +2 -0
- package/build/setup.js +171 -0
- package/package.json +5 -3
package/README.md
CHANGED
|
@@ -32,18 +32,27 @@ Or install globally:
|
|
|
32
32
|
npm install -g @projora/mcp-server
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
##
|
|
35
|
+
## Quick Setup
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
Run this single command to automatically configure Claude Code or OpenCode:
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
```bash
|
|
40
|
+
npx @projora/mcp-server setup
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
The setup wizard will:
|
|
44
|
+
1. Prompt for your API token (get it from [Projora Settings](https://projora.app/settings/integrations))
|
|
45
|
+
2. Automatically configure your AI coding assistant
|
|
46
|
+
3. No manual editing of config files required!
|
|
41
47
|
|
|
42
|
-
|
|
48
|
+
### Manual Configuration
|
|
43
49
|
|
|
44
|
-
|
|
50
|
+
If you prefer to manually configure, see below:
|
|
45
51
|
|
|
46
|
-
|
|
52
|
+
<details>
|
|
53
|
+
<summary>Claude Code Manual Setup</summary>
|
|
54
|
+
|
|
55
|
+
Add to your `~/.claude.json`:
|
|
47
56
|
|
|
48
57
|
```json
|
|
49
58
|
{
|
|
@@ -56,10 +65,12 @@ Add to your Claude Code configuration (`~/.claude.json`):
|
|
|
56
65
|
}
|
|
57
66
|
}
|
|
58
67
|
```
|
|
68
|
+
</details>
|
|
59
69
|
|
|
60
|
-
|
|
70
|
+
<details>
|
|
71
|
+
<summary>OpenCode Manual Setup</summary>
|
|
61
72
|
|
|
62
|
-
Add to your
|
|
73
|
+
Add to your `opencode.json`:
|
|
63
74
|
|
|
64
75
|
```json
|
|
65
76
|
{
|
|
@@ -75,8 +86,12 @@ Add to your OpenCode configuration (`opencode.json`):
|
|
|
75
86
|
}
|
|
76
87
|
}
|
|
77
88
|
```
|
|
89
|
+
</details>
|
|
90
|
+
|
|
91
|
+
### Environment Variables
|
|
78
92
|
|
|
79
|
-
|
|
93
|
+
- `PROJORA_AUTH_TOKEN` - Your API token (required)
|
|
94
|
+
- `PROJORA_GRAPHQL_URL` - GraphQL endpoint (defaults to `https://api.projora.app/graphql`, only set for self-hosted)
|
|
80
95
|
|
|
81
96
|
## Example Prompts
|
|
82
97
|
|
package/build/setup.d.ts
ADDED
package/build/setup.js
ADDED
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import * as fs from 'fs';
|
|
3
|
+
import * as path from 'path';
|
|
4
|
+
import * as os from 'os';
|
|
5
|
+
import * as readline from 'readline';
|
|
6
|
+
const CLAUDE_CONFIG_PATH = path.join(os.homedir(), '.claude.json');
|
|
7
|
+
const OPENCODE_CONFIG_PATH = path.join(os.homedir(), 'opencode.json');
|
|
8
|
+
// Colors for terminal output
|
|
9
|
+
const colors = {
|
|
10
|
+
reset: '\x1b[0m',
|
|
11
|
+
bold: '\x1b[1m',
|
|
12
|
+
green: '\x1b[32m',
|
|
13
|
+
blue: '\x1b[34m',
|
|
14
|
+
yellow: '\x1b[33m',
|
|
15
|
+
red: '\x1b[31m',
|
|
16
|
+
};
|
|
17
|
+
function log(message, color = colors.reset) {
|
|
18
|
+
console.log(`${color}${message}${colors.reset}`);
|
|
19
|
+
}
|
|
20
|
+
function promptUser(question) {
|
|
21
|
+
const rl = readline.createInterface({
|
|
22
|
+
input: process.stdin,
|
|
23
|
+
output: process.stdout,
|
|
24
|
+
});
|
|
25
|
+
return new Promise((resolve) => {
|
|
26
|
+
rl.question(question, (answer) => {
|
|
27
|
+
rl.close();
|
|
28
|
+
resolve(answer.trim());
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
async function setupClaude(authToken) {
|
|
33
|
+
log('\nš Setting up Claude Code configuration...', colors.blue);
|
|
34
|
+
const config = {
|
|
35
|
+
projora: {
|
|
36
|
+
command: 'npx',
|
|
37
|
+
args: ['-y', '@projora/mcp-server'],
|
|
38
|
+
env: {
|
|
39
|
+
PROJORA_AUTH_TOKEN: authToken,
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
let existingConfig = {};
|
|
44
|
+
// Read existing config if it exists
|
|
45
|
+
if (fs.existsSync(CLAUDE_CONFIG_PATH)) {
|
|
46
|
+
try {
|
|
47
|
+
const fileContent = fs.readFileSync(CLAUDE_CONFIG_PATH, 'utf-8');
|
|
48
|
+
existingConfig = JSON.parse(fileContent);
|
|
49
|
+
log(' ā Found existing Claude Code configuration', colors.green);
|
|
50
|
+
}
|
|
51
|
+
catch (error) {
|
|
52
|
+
log(' ā Warning: Could not parse existing config, will create new one', colors.yellow);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
// Merge the configs
|
|
56
|
+
const updatedConfig = {
|
|
57
|
+
...existingConfig,
|
|
58
|
+
...config,
|
|
59
|
+
};
|
|
60
|
+
// Write the updated config
|
|
61
|
+
try {
|
|
62
|
+
fs.writeFileSync(CLAUDE_CONFIG_PATH, JSON.stringify(updatedConfig, null, 2), 'utf-8');
|
|
63
|
+
log(` ā Successfully updated ${CLAUDE_CONFIG_PATH}`, colors.green);
|
|
64
|
+
return true;
|
|
65
|
+
}
|
|
66
|
+
catch (error) {
|
|
67
|
+
log(` ā Failed to write config: ${error}`, colors.red);
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
async function setupOpenCode(authToken) {
|
|
72
|
+
log('\nš Setting up OpenCode configuration...', colors.blue);
|
|
73
|
+
const mcpConfig = {
|
|
74
|
+
projora: {
|
|
75
|
+
type: 'local',
|
|
76
|
+
command: ['npx', '-y', '@projora/mcp-server'],
|
|
77
|
+
enabled: true,
|
|
78
|
+
environment: {
|
|
79
|
+
PROJORA_AUTH_TOKEN: authToken,
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
let existingConfig = {};
|
|
84
|
+
// Read existing config if it exists
|
|
85
|
+
if (fs.existsSync(OPENCODE_CONFIG_PATH)) {
|
|
86
|
+
try {
|
|
87
|
+
const fileContent = fs.readFileSync(OPENCODE_CONFIG_PATH, 'utf-8');
|
|
88
|
+
existingConfig = JSON.parse(fileContent);
|
|
89
|
+
log(' ā Found existing OpenCode configuration', colors.green);
|
|
90
|
+
}
|
|
91
|
+
catch (error) {
|
|
92
|
+
log(' ā Warning: Could not parse existing config, will create new one', colors.yellow);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
// Ensure mcp key exists
|
|
96
|
+
if (!existingConfig.mcp) {
|
|
97
|
+
existingConfig.mcp = {};
|
|
98
|
+
}
|
|
99
|
+
// Add/update Projora MCP config
|
|
100
|
+
existingConfig.mcp.projora = mcpConfig.projora;
|
|
101
|
+
// Write the updated config
|
|
102
|
+
try {
|
|
103
|
+
fs.writeFileSync(OPENCODE_CONFIG_PATH, JSON.stringify(existingConfig, null, 2), 'utf-8');
|
|
104
|
+
log(` ā Successfully updated ${OPENCODE_CONFIG_PATH}`, colors.green);
|
|
105
|
+
return true;
|
|
106
|
+
}
|
|
107
|
+
catch (error) {
|
|
108
|
+
log(` ā Failed to write config: ${error}`, colors.red);
|
|
109
|
+
return false;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
async function main() {
|
|
113
|
+
log('\nāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā', colors.bold);
|
|
114
|
+
log('ā Projora MCP Server Setup ā', colors.bold);
|
|
115
|
+
log('āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā', colors.bold);
|
|
116
|
+
log('\nThis wizard will configure Projora integration for your AI coding assistant.', colors.blue);
|
|
117
|
+
log('You can get your API token from: https://projora.app/settings/integrations\n');
|
|
118
|
+
// Prompt for auth token
|
|
119
|
+
const authToken = await promptUser('Enter your Projora API token: ');
|
|
120
|
+
if (!authToken) {
|
|
121
|
+
log('\nā Error: API token is required', colors.red);
|
|
122
|
+
process.exit(1);
|
|
123
|
+
}
|
|
124
|
+
// Ask which assistant to configure
|
|
125
|
+
log('\n' + colors.bold + 'Which AI coding assistant do you want to configure?' + colors.reset);
|
|
126
|
+
log(' 1. Claude Code');
|
|
127
|
+
log(' 2. OpenCode');
|
|
128
|
+
log(' 3. Both');
|
|
129
|
+
const choice = await promptUser('\nEnter your choice (1, 2, or 3): ');
|
|
130
|
+
let claudeSuccess = false;
|
|
131
|
+
let opencodeSuccess = false;
|
|
132
|
+
switch (choice) {
|
|
133
|
+
case '1':
|
|
134
|
+
claudeSuccess = await setupClaude(authToken);
|
|
135
|
+
break;
|
|
136
|
+
case '2':
|
|
137
|
+
opencodeSuccess = await setupOpenCode(authToken);
|
|
138
|
+
break;
|
|
139
|
+
case '3':
|
|
140
|
+
claudeSuccess = await setupClaude(authToken);
|
|
141
|
+
opencodeSuccess = await setupOpenCode(authToken);
|
|
142
|
+
break;
|
|
143
|
+
default:
|
|
144
|
+
log('\nā Invalid choice', colors.red);
|
|
145
|
+
process.exit(1);
|
|
146
|
+
}
|
|
147
|
+
// Summary
|
|
148
|
+
log('\n' + colors.bold + 'ā'.repeat(45) + colors.reset);
|
|
149
|
+
log(colors.bold + 'Setup Complete!' + colors.reset, colors.green);
|
|
150
|
+
log('ā'.repeat(45) + '\n', colors.bold);
|
|
151
|
+
if (claudeSuccess) {
|
|
152
|
+
log('ā Claude Code is configured', colors.green);
|
|
153
|
+
log(' Restart Claude Code to start using Projora tools\n');
|
|
154
|
+
}
|
|
155
|
+
if (opencodeSuccess) {
|
|
156
|
+
log('ā OpenCode is configured', colors.green);
|
|
157
|
+
log(' Restart OpenCode to start using Projora tools\n');
|
|
158
|
+
}
|
|
159
|
+
log('Available commands:', colors.blue);
|
|
160
|
+
log(' ⢠start_task - Start working on a task');
|
|
161
|
+
log(' ⢠complete_task - Mark task as done');
|
|
162
|
+
log(' ⢠my_tasks - List your tasks');
|
|
163
|
+
log(' ⢠add_comment - Add a comment to a task');
|
|
164
|
+
log(' ⢠log_time - Log time worked');
|
|
165
|
+
log(' ⢠search_tasks - Search tasks\n');
|
|
166
|
+
log('Documentation: https://docs.projora.app/integrations/mcp\n');
|
|
167
|
+
}
|
|
168
|
+
main().catch((error) => {
|
|
169
|
+
log(`\nā Setup failed: ${error.message}`, colors.red);
|
|
170
|
+
process.exit(1);
|
|
171
|
+
});
|
package/package.json
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@projora/mcp-server",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "MCP server for Projora task management - integrate with Claude Code and OpenCode to manage tasks, update statuses, and track work",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
|
-
"projora-mcp": "./build/index.js"
|
|
7
|
+
"projora-mcp": "./build/index.js",
|
|
8
|
+
"projora-mcp-setup": "./build/setup.js"
|
|
8
9
|
},
|
|
9
10
|
"main": "./build/index.js",
|
|
10
11
|
"scripts": {
|
|
11
|
-
"build": "tsc && chmod 755 build/index.js",
|
|
12
|
+
"build": "tsc && chmod 755 build/index.js build/setup.js",
|
|
12
13
|
"dev": "tsc --watch",
|
|
13
14
|
"start": "node build/index.js",
|
|
15
|
+
"setup": "node build/setup.js",
|
|
14
16
|
"prepublishOnly": "npm run build"
|
|
15
17
|
},
|
|
16
18
|
"files": [
|