Skip to content

Commit 983bb7e

Browse files
Merge pull request #376 from autonomys/fix/mcp-server-package
Fix auto-mcp-server package usage
2 parents 07e653c + 7590821 commit 983bb7e

File tree

4 files changed

+53
-13
lines changed

4 files changed

+53
-13
lines changed

packages/auto-mcp-servers/README.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,14 @@ More servers and tools will be coming soon!
2121
### With Claude Desktop
2222

2323
1. Install Claude Desktop
24-
2. Install the Auto Drive server globally:
25-
26-
```bash
27-
npm install -g @autonomys/auto-mcp-servers
28-
# or
29-
yarn global add @autonomys/auto-mcp-servers
30-
```
31-
32-
3. Edit your `claude_desktop_config.json` file:
24+
2. Edit your `claude_desktop_config.json` file:
3325

3426
```json
3527
{
3628
"mcpServers": {
3729
"auto-drive": {
3830
"command": "npx",
39-
"args": ["auto-drive-server"],
31+
"args": ["-y", "@autonomys/auto-mcp-servers", "auto-drive"],
4032
"env": { "AUTO_DRIVE_API_KEY": "your-api-key" }
4133
}
4234
}

packages/auto-mcp-servers/package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@autonomys/auto-mcp-servers",
33
"packageManager": "yarn@4.7.0",
4-
"version": "0.1.0",
4+
"version": "0.1.1-alpha.2",
55
"description": "Autonomys Network MCP servers",
66
"repository": {
77
"type": "git",
@@ -18,10 +18,12 @@
1818
"type": "module",
1919
"main": "dist/index.js",
2020
"bin": {
21-
"auto-drive-server": "./dist/bin/auto-drive.js"
21+
"auto-drive-server": "./dist/bin/auto-drive.js",
22+
"auto-mcp-servers": "./dist/bin/main.js"
2223
},
2324
"scripts": {
24-
"build": "tsc"
25+
"build": "tsc",
26+
"prepublishOnly": "npm run build && chmod +x ./dist/bin/*.js"
2527
},
2628
"keywords": [
2729
"mcp",
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#!/usr/bin/env node
2+
3+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'
4+
import { autoDriveServer } from '../auto-drive/index.js'
5+
6+
const showHelp = () => {
7+
console.log(`
8+
Usage: auto-mcp-servers [server-name]
9+
10+
Available servers:
11+
auto-drive Start the Auto Drive MCP server
12+
13+
Environment variables:
14+
For Auto Drive server:
15+
AUTO_DRIVE_API_KEY API key for Auto Drive (required)
16+
NETWORK 'mainnet' (default) or 'taurus'
17+
ENCRYPTION_PASSWORD Password for encryption (optional)
18+
`)
19+
process.exit(1)
20+
}
21+
22+
const main = async () => {
23+
const serverName = process.argv[2] || 'auto-drive'
24+
const transport = new StdioServerTransport()
25+
26+
switch (serverName) {
27+
case 'auto-drive':
28+
await autoDriveServer.connect(transport)
29+
break
30+
case 'help':
31+
case '--help':
32+
case '-h':
33+
showHelp()
34+
break
35+
default:
36+
console.error(`Unknown server: ${serverName}`)
37+
showHelp()
38+
break
39+
}
40+
}
41+
42+
main().catch((error) => {
43+
console.error(`Failed to start MCP server:`, error)
44+
process.exit(1)
45+
})

yarn.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ __metadata:
119119
zod: "npm:^3.24.2"
120120
bin:
121121
auto-drive-server: ./dist/bin/auto-drive.js
122+
auto-mcp-servers: ./dist/bin/main.js
122123
languageName: unknown
123124
linkType: soft
124125

0 commit comments

Comments
 (0)