VOOZH about

URL: https://deepwiki.com/ppl-ai/modelcontextprotocol/10.1-package-metadata-and-scripts

⇱ Package Metadata and Scripts | ppl-ai/modelcontextprotocol | DeepWiki


Loading...
Last indexed: 28 February 2026 (95c7a8)
Menu

Package Metadata and Scripts

This page documents the fields and scripts declared in the root package.json1-71 of the @perplexity-ai/mcp-server repository. It covers package identity, the published file set, the binary entry point, and the full set of npm scripts used for building, running, and testing the server.

For documentation on runtime dependencies and their roles, see Core Dependencies. For development tooling (TypeScript, vitest, tsx, shx), see Development Tooling. For build output and TypeScript configuration details, see Building and Testing and TypeScript Configuration.


Package Identity

package.json1-25

FieldValuePurpose
name@perplexity-ai/mcp-servernpm registry package name
mcpNameai.perplexity/mcp-serverReverse-domain identifier used by the MCP registry
version0.8.3Semantic version published to npm
descriptionReal-time web search, reasoning, and research through Perplexity's APIShort description shown on npm
licenseMIT
typemoduleAll .js files in the package are ES modules
maindist/index.jsDefault module entry when required programmatically
engines.node>=18Minimum supported Node.js version
publishConfig.accesspublicEnsures the scoped package is published publicly

The mcpName field is a non-standard extension to the npm manifest. It is read by the mcp-publisher tool during MCP Registry publication (see MCP Registry Publishing Workflow and MCP Registry Publication).

Sources: package.json1-25


Binary Entry Point

package.json27-29


The bin entry registers the command perplexity-mcp, which maps to the compiled stdio entry point dist/index.js. When the package is installed globally or invoked via npx, this binary is what runs. The target file is the compiled output of src/index.ts.

When clients invoke the server in stdio mode, they typically use npx @perplexity-ai/mcp-server or the explicit binary name perplexity-mcp. Both resolve to dist/index.js. See Local STDIO Deployment and STDIO Entry Point (src/index.ts) for details on what that file does.

Sources: package.json27-29


Published Files

package.json30-36

The files array controls what is included in the npm tarball:

dist/*.js — All compiled JS files
!dist/*.test.js — Exclude compiled test files
!dist/vitest.config.js — Exclude vitest config artifact
README.md — Package readme
.claude-plugin — Claude plugin manifest directory

Diagram: Published File Manifest


Sources: package.json30-36

Key points:

  • Test files (*.test.js) compiled by TypeScript are excluded so they do not inflate the published package.
  • The vitest.config.js artifact is similarly excluded.
  • The .claude-plugin directory (containing marketplace.json) is included so that Claude Desktop can discover the plugin manifest after installation. See Server Configuration Files and Claude Desktop and Plugin Marketplace for details on what is inside .claude-plugin.

npm Scripts

package.json37-50

All scripts are defined in the scripts object. They divide into four functional groups: build, run, development, and test.

Diagram: npm Script Dependency Flow


Sources: package.json37-50

Build Scripts

ScriptCommandNotes
buildtsc && shx chmod +x dist/*.jsCompiles TypeScript to dist/, then marks all .js files executable for use as binaries
preparenpm run buildRuns automatically on npm install in the repo; ensures dist/ is always populated
watchtsc --watchIncremental TypeScript compilation in watch mode

The shx chmod +x step is required so that the perplexity-mcp binary declared in bin is executable on POSIX systems after compilation. shx provides cross-platform compatibility for this step.

Run Scripts

These scripts invoke the compiled output in dist/ and require npm run build to have been run first.

ScriptCommandNotes
startnode dist/index.jsStarts the stdio server
start:httpnode dist/http.jsStarts the HTTP/Express server
start:http:publicBIND_ADDRESS=0.0.0.0 ALLOWED_ORIGINS=* node dist/http.jsConvenience variant that binds on all interfaces and allows all CORS origins

Development Scripts

These use tsx to run TypeScript source files directly, bypassing the build step. Useful during active development.

ScriptCommandNotes
devtsx src/index.tsRuns the stdio entry point without compiling
dev:httptsx src/http.tsRuns the HTTP server without compiling
dev:http:publicBIND_ADDRESS=0.0.0.0 ALLOWED_ORIGINS=* tsx src/http.tsHTTP server with open bind/CORS for local testing

Test Scripts

ScriptCommandNotes
testvitest runSingle-pass test run; used in CI
test:watchvitestInteractive watch mode
test:coveragevitest run --coverageRuns tests and emits a V8 coverage report

Script-to-Source File Mapping

Diagram: Script to Source File Mapping


Sources: package.json37-50 package.json26-29


The perplexity-ask Legacy Subdirectory

The repository contains a perplexity-ask/ subdirectory with its own perplexity-ask/package.json1-51 This is a legacy artifact from an earlier version of the project (version 0.2.0) when the server was a simpler, single-tool implementation. Key differences between the legacy package and the current root package:

FieldRoot package.jsonperplexity-ask/package.json
version0.8.30.2.0
Dependencies@modelcontextprotocol/sdk, express, cors, undici, zod@modelcontextprotocol/sdk, axios, dotenv
ScriptsFull build + test + dev + run setOnly build, prepare, watch
filesdist/*.js with exclusions + .claude-plugindist, README.md
mcpNameai.perplexity/mcp-serverNot present

The perplexity-ask/ subdirectory is not published as part of the current package; it is not referenced by any CI workflow or the root package.json. It serves as historical context only.

Sources: perplexity-ask/package.json1-51 package.json1-71