Update package metadata and add CLI shebang

Enhanced package.json with description, keywords, author, repository, and engine requirements. Added a shebang line to src/index.ts for CLI execution and set up prepublishOnly script to build before publishing.
This commit is contained in:
Barry Yip 2025-07-08 21:13:03 +08:00
parent c37e55d5f5
commit 60052cc4af
2 changed files with 32 additions and 5 deletions

View File

@ -1,6 +1,7 @@
{
"name": "mcp-discord",
"version": "1.2.0",
"version": "1.3.2",
"description": "Model Context Protocol (MCP) server for Discord integration, allowing Claude and other MCP clients to interact with Discord",
"main": "build/index.js",
"bin": {
"mcp-discord": "build/index.js"
@ -11,19 +12,44 @@
"build": "tsc",
"start": "node build/index.js",
"dev": "node --loader ts-node/esm src/index.ts",
"test-api": "node test-api.js"
"test-api": "node test-api.js",
"prepublishOnly": "npm run build"
},
"author": "",
"keywords": [
"mcp",
"model-context-protocol",
"discord",
"claude",
"ai",
"chatbot",
"automation"
],
"author": "Barry Yip <barry99625@gmail.com>",
"license": "MIT",
"description": "",
"repository": {
"type": "git",
"url": "git+https://github.com/barryyip0625/mcp-discord.git"
},
"bugs": {
"url": "https://github.com/barryyip0625/mcp-discord/issues"
},
"homepage": "https://github.com/barryyip0625/mcp-discord#readme",
"files": [
"build/",
"README.md",
"LICENSE"
],
"engines": {
"node": ">=18.0.0"
},
"devDependencies": {
"@modelcontextprotocol/sdk": "^1.11.0",
"@types/express": "^5.0.1",
"@types/node": "^20.17.50",
"ts-node": "^10.9.2",
"typescript": "^5.8.3"
},
"dependencies": {
"@modelcontextprotocol/sdk": "^1.11.0",
"discord.js": "^14.19.3",
"dotenv": "^16.5.0",
"express": "^5.1.0",

View File

@ -1,3 +1,4 @@
#!/usr/bin/env node
import { Client, GatewayIntentBits } from "discord.js";
import { config as dotenvConfig } from 'dotenv';
import { DiscordMCPServer } from './server.js';