JavaScript MCP Server
by yannbam
Integrations
Allows execution of JavaScript code in one-time script execution mode with comprehensive error handling and formatted stack traces.
Supports module importing from Node.js, allowing access to Node.js built-in modules and functionality.
Provides dynamic importing and usage of npm packages within JavaScript execution environments.
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
Copy
Usage
Copy
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
Copy
Architecture
The JavaScript MCP server follows a layered architecture:
- MCP Protocol Layer: Handles client communication
- JavaScript Execution Layer: Executes code in isolated environments
- Resource Management Layer: Manages packages and TypeScript
- Session Management Layer: Maintains REPL sessions with state persistence
License
MIT
This server cannot be installed
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.