{"id":11277,"library":"mcp-server","title":"MCP Server","description":"The `mcp-server` package provides a basic implementation of a JSON-RPC 2.0 server adhering to the Model-Client-Protocol (MCP). Released as version 0.0.9, this package was last published over five years ago and is no longer actively maintained. Its core functionality includes a JSON-RPC 2.0 compliant server with CORS enabled and a built-in echo tool. While it historically provided a simple entry point for the MCP, the broader Model-Client-Protocol ecosystem has evolved significantly with numerous actively developed frameworks and servers offering expanded features, transports, and modern development practices. This specific package should be considered for historical reference or very simple, isolated use cases, and not for new development requiring stability, security updates, or advanced MCP features.","status":"abandoned","version":"0.0.9","language":"javascript","source_language":"en","source_url":"https://github.com/sandy-mount/mcp-server","tags":["javascript","mcp"],"install":[{"cmd":"npm install mcp-server","lang":"bash","label":"npm"},{"cmd":"yarn add mcp-server","lang":"bash","label":"yarn"},{"cmd":"pnpm add mcp-server","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"This package is CommonJS-only. Programmatic usage requires `require()` syntax. Attempting to use ESM `import` will result in an error. The `createServer` function is the primary export for instantiating the server.","wrong":"import { createServer } from 'mcp-server';","symbol":"createServer","correct":"const { createServer } = require('mcp-server');"},{"note":"Like `createServer`, `createMethod` is a CommonJS export. It's used internally or for advanced customization of JSON-RPC methods.","wrong":"import { createMethod } from 'mcp-server';","symbol":"createMethod","correct":"const { createMethod } = require('mcp-server');"}],"quickstart":{"code":"const { createServer } = require('mcp-server');\n\nconst server = createServer();\n\n// Start the server on the default port (4333) or specified port\n// The original package's `createServer` expects to be run directly\n// or via its CLI; programmatic starting requires more context from\n// the original source, but a typical usage would involve a listen call.\n// The package's `index.js` sets up CLI arguments for the port.\n// For programmatic use, one would typically extend or wrap its components.\n// This example shows how to run it as a CLI tool as per the README:\n\nconsole.log('To run the MCP server, use the CLI:');\nconsole.log('  npx mcp-server');\nconsole.log('This will start the server on port 4333 (default).');\nconsole.log('\\n// For programmatic control, further investigation into the 0.0.9 source is needed.');\nconsole.log('// A simple programmatic start for a typical HTTP server might look like this (conceptual):');\nconsole.log('// server.listen(4333, () => console.log(\\'MCP server listening on port 4333\\'));');\n// A more direct interpretation of the original source is that `createServer` returns a function that sets up the HTTP server itself, rather than an Express-like app.\n// Given its abandonment, directly using the CLI is the most documented path.\n","lang":"javascript","description":"Demonstrates how to run the `mcp-server` using its command-line interface via `npx`."},"warnings":[{"fix":"For new projects or existing projects requiring a stable, secure, and modern MCP server, consider actively maintained alternatives like `mcp-framework` or `@modelcontextprotocol/server-everything`.","message":"This package is version 0.0.9 and was last published over five years ago. It is considered abandoned. Expect no further updates, bug fixes, or security patches. Using it in production is highly discouraged.","severity":"breaking","affected_versions":">=0.0.1"},{"fix":"Review the source code if using this package to understand and tighten CORS policies if necessary. For any production environment, migrate to a supported MCP server solution.","message":"The package explicitly enables CORS, which might be a security concern if not properly understood or restricted. An abandoned package with default CORS settings could introduce vulnerabilities.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"If programmatic use is required in an ESM project, you might need to use `createRequire` from the `module` module in Node.js, or configure your bundler (e.g., Webpack, Rollup) to handle CJS modules. However, migration to a modern MCP framework is strongly recommended.","message":"The documentation is minimal, and the API is purely CommonJS (CJS). Modern JavaScript projects primarily use ES Modules (ESM), which will require specific transpilation or bundler configurations if you attempt to integrate this CJS-only package into an ESM project.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Evaluate your specific MCP requirements. If you need advanced features, broader compatibility, or robust error handling, this package will be insufficient. Explore `mcp-framework`, `@modelcontextprotocol/sdk`, or other specialized MCP servers for more capable solutions.","message":"The `mcp-server` package implements a basic JSON-RPC 2.0 server with echo functionality. The Model-Client-Protocol (MCP) has advanced significantly, and this package likely lacks many features present in contemporary MCP implementations (e.g., richer tool definitions, diverse transports beyond basic HTTP, authentication mechanisms).","severity":"gotcha","affected_versions":">=0.0.1"}],"env_vars":null,"last_verified":"2026-04-19T00:00:00.000Z","next_check":"2026-07-18T00:00:00.000Z","problems":[{"fix":"Ensure no other applications are using port 4333. You can either stop the conflicting process or specify a different port when starting the `mcp-server` CLI (e.g., `npx mcp-server --port 8080`).","cause":"The default port 4333, or a specified port, is already being used by another process on your system.","error":"Error: listen EADDRINUSE: address already in use :::4333"},{"fix":"Ensure your project is configured as CommonJS if you are using `require()`, or use dynamic `import()` if you are in an ESM context and need to load a CJS module. For this specific package, stick to `const { createServer } = require('mcp-server');`.","cause":"You are attempting to import an ES Module (`import ... from '...'`) within a CommonJS context, or you are trying to `require()` this CJS-only package from an ESM context in a way that Node.js doesn't natively support.","error":"Error [ERR_REQUIRE_ESM]: require() of ES Module ... Not supported by `require()` of a CommonJS module."},{"fix":"Ensure you are using the correct CommonJS named import syntax: `const { createServer } = require('mcp-server');`. Do not use `const createServer = require('mcp-server');` as it will try to assign the entire `module.exports` object to `createServer`.","cause":"You might be trying to destructure `createServer` from a default export, or the module might not be correctly resolving the named export.","error":"TypeError: createServer is not a function"}],"ecosystem":"npm"}