Skip to main content
Glama

JavaScript MCP Server

by yannbam

JavaScript MCP Server

A JavaScript execution server for the Model Context Protocol (MCP), allowing AI models to run JavaScript code through MCP tool calls.

Features

  • JavaScript Execution: Run JavaScript code in one-time script execution mode
  • REPL Sessions: Maintain stateful REPL sessions across multiple interactions
  • TypeScript Support: Run TypeScript code with automatic transpilation
  • NPM Integration: Import and use npm packages dynamically
  • Module Importing: Import modules from Node.js and local files
  • Error Handling: Comprehensive error handling with formatted stack traces

Installation

# Clone the repository git clone https://github.com/yannbam/fresh-js-mcp.git cd fresh-js-mcp # Install dependencies npm install # Build the project npm run build

Usage

# Start the MCP server npm start

Available Tools

  • execute: Run JavaScript code once and return the result
  • createSession: Create a new REPL session
  • executeInSession: Execute code in an existing session
  • listSessions: List all active REPL sessions
  • deleteSession: Delete a REPL session

Development

# Run in development mode with hot reloading npm run dev # Lint the code npm run lint # Run tests npm test

Architecture

The JavaScript MCP server follows a layered architecture:

  1. MCP Protocol Layer: Handles client communication
  2. JavaScript Execution Layer: Executes code in isolated environments
  3. Resource Management Layer: Manages packages and TypeScript
  4. Session Management Layer: Maintains REPL sessions with state persistence

License

MIT

-
security - not tested
F
license - not found
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Allows AI models to run JavaScript/TypeScript code through Model Context Protocol tool calls, supporting both one-time script execution and stateful REPL sessions with npm package integration.

  1. Features
    1. Installation
      1. Usage
        1. Available Tools
      2. Development
        1. Architecture
          1. License

            Related MCP Servers

            • -
              security
              A
              license
              -
              quality
              A TypeScript implementation of a Model Context Protocol server that provides a frictionless framework for developers to build and deploy AI tools and prompts, focusing on developer experience with zero boilerplate and automatic tool registration.
              Last updated -
              6
              TypeScript
              MIT License
            • -
              security
              F
              license
              -
              quality
              A server that enables AI assistants to execute JavaScript code with persistent context through stateful REPL sessions, file operations, and package management features.
              Last updated -
              TypeScript
              • Linux
              • Apple
            • -
              security
              F
              license
              -
              quality
              A Model Context Protocol implementation for managing and serving AI prompts with a TypeScript-based architecture in a monorepo structure.
              Last updated -
              28,526,583
              2
              TypeScript
            • A
              security
              A
              license
              A
              quality
              A TypeScript-based Model Context Protocol toolkit that enables AI to interact with code files, manage translations, build projects, and search for files and code content.
              Last updated -
              33
              43
              5
              TypeScript
              MIT License

            View all related MCP servers

            MCP directory API

            We provide all the information about MCP servers via our MCP API.

            curl -X GET 'https://glama.ai/api/mcp/v1/servers/yannbam/fresh-js-mcp'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server