npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

librechat-code-interpreter-mcp-server

v1.3.2

Published

A Model Context Protocol (MCP) server that wraps the [LibreChat Code Interpreter API](https://code.librechat.ai/docs), exposing code-execution and file-management endpoints as MCP tools. Easily integrate sandboxed code execution into any MCP-compatible cl

Readme

LibreChat Code Interpreter MCP Server

A Model Context Protocol (MCP) server that wraps the LibreChat Code Interpreter API, exposing code-execution and file-management endpoints as MCP tools. Easily integrate sandboxed code execution into any MCP-compatible client.


Features

  • executeCode — Run arbitrary code (Python, JavaScript, TS, Go, C, C++, Java, PHP, Rust, Fortran, R, D, F90) in a secure sandbox
  • downloadFile — Retrieve binary or text files generated during execution
  • uploadFiles — Send files (binary or text) to a session for inclusion in code runs
  • getFilesInfo — List metadata for files in a session (names, sizes, timestamps)
  • deleteFile — Remove a file from a session

All operations require an API key from LibreChat Code Interpreter and adhere to MCP’s tools/list and tools/call schemas


Prerequisites

  • Node.js ≥ 16
  • npm or yarn
  • A valid LibreChat API key (set in LIBRECHAT_API_KEY)

Installation

# Clone this repo
git clone <your-repo-url>
cd <your-repo-folder>

# Install dependencies
yarn install   # or `npm install`

Configuration

Create a .env in the project root containing:

LIBRECHAT_API_KEY=sk-...your_api_key_here...

Running the Server

# If using ts-node:
npx ts-node src/librechat-mcp-server.ts

# Or compile then run:
tsc && node dist/librechat-mcp-server.js

By default, the server communicates over stdio (suitable for local MCP playgrounds, IPC, or Docker streams)


MCP Client Quick Start

Below is an example using the official MCP TypeScript SDK to call executeCode:

import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
import { ListToolsResultSchema, CallToolResultSchema } from "@modelcontextprotocol/sdk/types";

async function main() {
  const transport = new StdioClientTransport({ command: "node dist/librechat-mcp-server.js" });
  const client = new Client({ name: "example-client", version: "1.0.0" }, {});
  await client.connect(transport);

  // List available tools
  const tools = await client.request(
    { method: "tools/list" },
    ListToolsResultSchema
  );
  console.log("Available MCP tools:", tools.tools.map(t => t.name));

  // Execute Python code
  const codeResult = await client.request(
    {
      method: "tools/call",
      params: {
        name: "executeCode",
        arguments: {
          code: "print(\"Hello from LibreChat!\")",
          lang: "py",
          user_id: "user123",
          entity_id: "assistant_ABC123",
          files: [],
        },
      },
    },
    CallToolResultSchema
  );

  console.log("Execution result:", codeResult.content[0].json);
}

main().catch(console.error);

Tool Schemas

| Tool Name | Input Parameters | | ------------ | --------------------------------------------------------------------------- | | executeCode | code (string), lang (enum), args?, user_id?, entity_id?, files? | | downloadFile | session_id (string), fileId (string) | | uploadFiles | entity_id (string), files (array of { name, content, contentType }) | | getFilesInfo | session_id (string), detail? (simple or detailed) | | deleteFile | session_id (string), fileId (string) |

Combine these via MCP’s standard tools/list and tools/call messages to build powerful code-automation flows


Development

  • Lint: npm run lint
  • Type-check: npm run build
  • Format: npm run format

Feel free to open issues or pull requests!