Skip to Content
MCPJavaScript

Model Context Protocol (MCP) Setup for JavaScript

Step 1: Download MCP for JavaScript

First, you need to download the MCP for Python from the OpenAPI Tools website. Please visit: https://openapitools.com/dashboard/tools

Download the MCP Python package from this link.

npm i @modelcontextprotocol/sdk cors express @reacter/openapitools

Step 2: Configure mcpconfig.json

Create a configuration file called mcpconfig.json with the following content:

{ "server_name": "anthropic-mcp-server", "server_version": "0.1.0", "host": "0.0.0.0", "port": 8000, "tool_names": [], "mode": "stdio", "refresh_time_minutes": 1440, "api_key": "YOUR_API_KEY_HERE" }

Note: The mode is set to stdio which is required for Claude Desktop integration. If you want to use it as a server, you would change this to sse mode.

Step 3: Configure Claude Desktop

Modify Claude Desktop’s configuration file based on your operating system:

For macOS:

Edit the file at: ~/Library/Application Support/Claude/claude_desktop_config.json

For Windows:

Edit the file at: %APPDATA%\Claude\claude_desktop_config.json

Add the following configuration:

{ "mcpServers": { "otp": { "command": "node", "args": ["C:\\path\\to\\your\\project\\index.js"] } } }
🚫
Important
  1. Adjust the directory path to match where you’ve installed the MCP Python package.
  2. Ensure node is installed in your environment globally.
  3. Change the server name from otp to whatever you want to call it. This name will be used in the Claude Desktop interface to select the tool.

Step 4: Providing only few tools or api_key (Optional)

Instead of fetching tools locally you can use your api_key but there will be rate limits. You can also provide only few tools to be fetched from the server.


refresh_time_minutes will refresh tools for for every n minutes if you are using api_key.

{ "server_name": "anthropic-mcp-server", "server_version": "0.1.0", "host": "0.0.0.0", "port": 8000, "tool_names": ["generate-otp", { "name": "get-orders", "version": "prod" }], "mode": "stdio", "refresh_time_minutes": 1440, "api_key": "YOUR_API_KEY_HERE" }

Step 5: Running Your MCP Server

Once everything is configured, restart Claude Desktop. Your MCP server should be available for use within the Claude interface.

You can test if your integration is working by selecting your tool from the tool menu in Claude Desktop.

Claude Desktop Working

Last updated on