From b357a5c049450e9c2ba26f3cbd649b675681c471 Mon Sep 17 00:00:00 2001 From: Kesku Date: Sun, 9 Nov 2025 01:45:01 +0000 Subject: [PATCH] Add Claude Code plugin support - Add .claude-plugin/marketplace.json - Update README with installation guide - Add workflow to validate plugin config - Include .claude-plugin directory in npm package files - version bump --- .claude-plugin/marketplace.json | 49 +++++++++++++++++++++++++++ .github/workflows/validate-plugin.yml | 46 +++++++++++++++++++++++++ README.md | 19 +++++++++++ package-lock.json | 4 +-- package.json | 5 +-- server.json | 4 +-- 6 files changed, 121 insertions(+), 6 deletions(-) create mode 100644 .claude-plugin/marketplace.json create mode 100644 .github/workflows/validate-plugin.yml diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json new file mode 100644 index 0000000..96e98de --- /dev/null +++ b/.claude-plugin/marketplace.json @@ -0,0 +1,49 @@ +{ + "name": "perplexity-mcp-server", + "owner": { + "name": "Perplexity AI", + "email": "api@perplexity.ai" + }, + "metadata": { + "description": "Official Perplexity AI plugin providing real-time web search, reasoning, and research capabilities", + "version": "0.4.0" + }, + "plugins": [ + { + "name": "perplexity", + "source": "./", + "description": "Real-time web search, reasoning, and research through Perplexity's API", + "version": "0.4.0", + "author": { + "name": "Perplexity AI", + "email": "api@perplexity.ai" + }, + "homepage": "https://docs.perplexity.ai/guides/mcp-server", + "repository": "https://github.com/perplexityai/modelcontextprotocol", + "license": "MIT", + "keywords": [ + "mcp", + "search", + "web-search", + "perplexity", + "research", + "reasoning", + "ai" + ], + "category": "productivity", + "strict": false, + "mcpServers": { + "perplexity": { + "type": "stdio", + "command": "npx", + "args": ["-y", "@perplexity-ai/mcp-server"], + "env": { + "PERPLEXITY_API_KEY": "${PERPLEXITY_API_KEY}", + "PERPLEXITY_TIMEOUT_MS": "${PERPLEXITY_TIMEOUT_MS:-600000}" + } + } + } + } + ] +} + diff --git a/.github/workflows/validate-plugin.yml b/.github/workflows/validate-plugin.yml new file mode 100644 index 0000000..b9e1e64 --- /dev/null +++ b/.github/workflows/validate-plugin.yml @@ -0,0 +1,46 @@ +name: Validate Plugin Configuration + +on: + pull_request: + paths: + - '.claude-plugin/**' + - 'package.json' + push: + branches: [main] + paths: + - '.claude-plugin/**' + - 'package.json' + +jobs: + validate: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Install Claude CLI + run: npm install -g @anthropic-ai/claude-code + + - name: Validate Plugin Configuration + run: claude plugin validate . + + - name: Check Plugin Files Exist + run: | + if [ ! -f ".claude-plugin/marketplace.json" ]; then + echo "Error: .claude-plugin/marketplace.json not found" + exit 1 + fi + echo "✓ Marketplace file exists" + + - name: Validate JSON Syntax + run: | + echo "Validating marketplace.json syntax..." + cat .claude-plugin/marketplace.json | jq empty + echo "✓ JSON syntax is valid" + diff --git a/README.md b/README.md index e05f42a..7721b83 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,25 @@ Advanced reasoning and problem-solving using the `sonar-reasoning-pro` model. Pe ### Claude Code +#### Option 1: Install via Plugin (Recommended) + +The easiest way to get started with Perplexity in Claude Code: + +```bash +# Add the Perplexity marketplace +/plugin marketplace add perplexityai/modelcontextprotocol + +# Install the plugin +/plugin install perplexity +``` + +Then set your API key: +```bash +export PERPLEXITY_API_KEY="your_key_here" +``` + +#### Option 2: Manual Configuration + Run in your terminal: ```bash diff --git a/package-lock.json b/package-lock.json index 49d7913..c0686e0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@perplexity-ai/mcp-server", - "version": "0.3.1", + "version": "0.4.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@perplexity-ai/mcp-server", - "version": "0.3.1", + "version": "0.4.0", "license": "MIT", "dependencies": { "@modelcontextprotocol/sdk": "^1.21.1", diff --git a/package.json b/package.json index 33b771d..0fe9045 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@perplexity-ai/mcp-server", - "version": "0.3.1", + "version": "0.4.0", "mcpName": "io.github.perplexityai/mcp-server", "description": "Real-time web search, reasoning, and research through Perplexity's API", "keywords": [ @@ -29,7 +29,8 @@ }, "files": [ "dist", - "README.md" + "README.md", + ".claude-plugin" ], "scripts": { "build": "tsc && shx chmod +x dist/*.js", diff --git a/server.json b/server.json index 88ff67b..1dd85f2 100644 --- a/server.json +++ b/server.json @@ -3,12 +3,12 @@ "name": "io.github.perplexityai/mcp-server", "title": "Perplexity API Platform", "description": "Real-time web search, reasoning, and research through Perplexity's API", - "version": "0.3.1", + "version": "0.4.0", "packages": [ { "registryType": "npm", "identifier": "@perplexity-ai/mcp-server", - "version": "0.3.1", + "version": "0.4.0", "transport": { "type": "stdio" }