Arcade Serve (Infrastructure for ArcadeAI MCP Servers)

3.2.3 · maintenance · verified Thu Apr 16

Arcade Serve provides foundational serving infrastructure for ArcadeAI tools and workers, enabling agents to interact with custom functionalities via the Model Context Protocol (MCP). While `arcade-serve` itself is a lower-level component, user-facing development and deployment of MCP servers are now primarily managed through the `arcade-mcp-server` Python package and the `arcade-mcp` command-line interface. The library is currently at version 3.2.3 and is part of an actively developed ecosystem with frequent updates to its primary user-facing components.

Common errors

Warnings

Install

Imports

Quickstart

The fastest way to get started with ArcadeAI servers is by using the `arcade-mcp` CLI tool to scaffold a new project, which sets up `arcade-mcp-server`. This example demonstrates a basic server with two tools, one requiring a secret, and shows how to run it in different modes.

# Install the Arcade CLI and create a new MCP server project
pip install arcade-mcp uv
uv tool install arcade-mcp
arcade new my_server

# Navigate to the project directory
cd my_server/src/my_server

# server.py (example file created by 'arcade new')
from typing import Annotated
from arcade_mcp_server import MCPApp

app = MCPApp(name="my-tools", version="1.0.0")

@app.tool
def greet(name: Annotated[str, "Name to greet"]) -> str:
    """Greet someone by name."""
    return f"Hello, {name}!"

@app.tool(requires_secrets=["MY_SECRET_KEY"])
def whisper_secret(context: Context) -> Annotated[str, "The last 4 characters of the secret"]:
    """Reveal the last 4 characters of a secret"""
    # Secrets are injected into the context at runtime
    try:
        secret = context.get_secret("MY_SECRET_KEY")
    except Exception as e:
        return str(e)
    return "The last 4 characters of the secret are: " + secret[-4:]

if __name__ == "__main__":
    # To run the server for development with hot reload
    app.run(reload=True)
    # For Claude Desktop, run with stdio transport
    # python -m arcade_mcp_server stdio
    # For HTTP clients, run with http transport
    # python -m arcade_mcp_server --host 0.0.0.0 --port 8080

view raw JSON →