Riza MCP server

Provides a secure bridge between LLMs and Riza's isolated code interpreter API, enabling writing, saving, editing, and executing code safely in a sandboxed environment with persistent tool management across conversations.
Back to servers
Setup instructions
Provider
Riza
Release date
Mar 12, 2025
Language
TypeScript
Package
Stats
2.0K downloads
11 stars

This MCP server implementation integrates Riza's isolated code interpreter with your LLM through the Model Context Protocol (MCP). It allows your AI assistant to execute code safely in an isolated environment and manage reusable tools.

Installation

Install the Riza MCP server using npm:

npm install @riza-io/riza-mcp

Before using the server, obtain a free Riza API key from your Riza Dashboard.

Configuration

Setting Up with Claude Desktop

Configure the Riza MCP server in Claude Desktop by adding the following to your Claude Desktop configuration:

{
  "mcpServers": {
    "riza-server": {
      "command": "npx",
      "args": [
        "@riza-io/riza-mcp"
      ],
      "env": {
        "RIZA_API_KEY": "your-api-key"
      }
    }
  }
}

Replace "your-api-key" with your actual Riza API key.

Available Tools

The Riza MCP server provides the following tools to your LLM:

Code Execution

  • execute_code: Run arbitrary code safely without saving it as a tool.

Tool Management

  • create_tool: Write code and save it as a reusable tool.
  • fetch_tool: Retrieve saved tools, including their source code.
  • execute_tool: Run a previously saved tool.
  • edit_tool: Modify an existing tool.
  • list_tools: View all available saved tools.

Usage Examples

Executing Code

Your LLM can execute arbitrary Python code (or other supported languages) in the Riza environment:

# Example of executing a simple Python script
result = execute_code("""
import pandas as pd
import matplotlib.pyplot as plt

# Create sample data
data = {'Category': ['A', 'B', 'C', 'D'],
        'Values': [10, 25, 15, 30]}

df = pd.DataFrame(data)

# Create bar chart
plt.figure(figsize=(8, 5))
plt.bar(df['Category'], df['Values'])
plt.title('Sample Bar Chart')
plt.xlabel('Category')
plt.ylabel('Value')
plt.show()
""")

Creating and Using Tools

Create a reusable tool:

create_tool(
    name="data_summarizer",
    description="Summarizes a CSV file with basic statistics",
    source="""
import pandas as pd

def run(file_path):
    df = pd.read_csv(file_path)
    summary = {
        'column_count': len(df.columns),
        'row_count': len(df),
        'columns': list(df.columns),
        'dtypes': df.dtypes.astype(str).to_dict(),
        'summary_stats': df.describe().to_dict()
    }
    return summary
"""
)

Execute a saved tool:

# Using a previously created tool
result = execute_tool(
    name="data_summarizer", 
    args={"file_path": "sales_data.csv"}
)

List available tools:

# Get a list of all saved tools
tools = list_tools()

Fetch and modify a tool:

# Get the source code of an existing tool
tool = fetch_tool(name="data_summarizer")

# Edit the tool to add additional functionality
edit_tool(
    name="data_summarizer",
    description="Summarizes a CSV file with enhanced statistics",
    source=tool["source"] + """
    # Add additional functionality to examine string columns
    string_columns = df.select_dtypes(include=['object']).columns
    for col in string_columns:
        summary['unique_values_' + col] = df[col].nunique()
"""
)

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "riza-server" '{"command":"npx","args":["@riza-io/riza-mcp"],"env":{"RIZA_API_KEY":"your-api-key"}}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "riza-server": {
            "command": "npx",
            "args": [
                "@riza-io/riza-mcp"
            ],
            "env": {
                "RIZA_API_KEY": "your-api-key"
            }
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "riza-server": {
            "command": "npx",
            "args": [
                "@riza-io/riza-mcp"
            ],
            "env": {
                "RIZA_API_KEY": "your-api-key"
            }
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later