code runner.com
code runner.com logo

Code Runner

Executes code snippets in over 30 programming languages by creating temporary files and running them with appropriate in...

Created byApr 22, 2025

Code Runner MCP Server

MCP Server for running code snippet and show the result.
It supports running multiple programming languages: JavaScript, PHP, Python, Perl, Perl 6, Ruby, Go, Lua, Groovy, PowerShell, BAT/CMD, BASH/SH, F# Script, C# Script, VBScript, TypeScript, CoffeeScript, Scala, Swift, Julia, Crystal, OCaml Script, R, AppleScript, Elixir, Clojure, Racket, Scheme, AutoHotkey, AutoIt, Kotlin Script, Dart, Haskell, Ni, Lisp, Kit, V, SCSS, Sass. Full list could be seen here in constants.ts.

Setup

npx for VS Code

Install the Code Runner MCP server in VS Code using below buttons:
Alternatively, you can add configuration in settings.json:

npx for Claude Desktop

Configuration in claude_desktop_config.json:

Docker

Use VS Code as example. Install the Code Runner MCP server in VS Code using below buttons:
Alternatively, you can add configuration in settings.json:

Installing via Smithery

_NOTE:_ This will run Code Runner MCP Server in a remote Container environment hosted by Smithery.
To install Code Runner MCP Server for Claude Desktop automatically via Smithery:

npx issue on Widnows

You could try below two workarounds:

use bunx

  1. Install Bun.
  1. In configuration, change npx with bunx.

use cmd

Below is VS Code configuration in settings.json:

Run with [Streamable HTTP Transport](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#streamable-http)

Usage

Before using Code Runner MCP Server, please make sure interpreter or compiler of the programming language you want to run is set in PATH environment variable.
Try below prompts in the application which has configured Code Runner MCP Server:
  • Run the JavaScript Code: console.log(5+6)
  • Where is temporary folder in my OS? Use run-code tool
  • How many CPUs do I have in my machine? Use run-code tool
 
 

Build your own MCP Server

Want to build your own MCP Server? Try Yeoman Generator for MCP Server to create your MCP Server project!

Code Runner MCP Server

MCP Server for running code snippet and show the result.
It supports running multiple programming languages: JavaScript, PHP, Python, Perl, Perl 6, Ruby, Go, Lua, Groovy, PowerShell, BAT/CMD, BASH/SH, F# Script, C# Script, VBScript, TypeScript, CoffeeScript, Scala, Swift, Julia, Crystal, OCaml Script, R, AppleScript, Elixir, Clojure, Racket, Scheme, AutoHotkey, AutoIt, Kotlin Script, Dart, Haskell, Ni, Lisp, Kit, V, SCSS, Sass. Full list could be seen here in constants.ts.

Setup

npx for VS Code

Install the Code Runner MCP server in VS Code using below buttons:
Alternatively, you can add configuration in settings.json:

npx for Claude Desktop

Configuration in claude_desktop_config.json:

Docker

Use VS Code as example. Install the Code Runner MCP server in VS Code using below buttons:
Alternatively, you can add configuration in settings.json:

Installing via Smithery

_NOTE:_ This will run Code Runner MCP Server in a remote Container environment hosted by Smithery.
To install Code Runner MCP Server for Claude Desktop automatically via Smithery:

npx issue on Widnows

You could try below two workarounds:

use bunx

  1. Install Bun.
  1. In configuration, change npx with bunx.

use cmd

Below is VS Code configuration in settings.json:

Run with [Streamable HTTP Transport](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#streamable-http)

Usage

Before using Code Runner MCP Server, please make sure interpreter or compiler of the programming language you want to run is set in PATH environment variable.
Try below prompts in the application which has configured Code Runner MCP Server:
  • Run the JavaScript Code: console.log(5+6)
  • Where is temporary folder in my OS? Use run-code tool
  • How many CPUs do I have in my machine? Use run-code tool
 
 

Build your own MCP Server

Want to build your own MCP Server? Try Yeoman Generator for MCP Server to create your MCP Server project!