Arcade MCP Server Framework

1.19.3 · active · verified Wed Apr 15

Arcade MCP (Model Context Protocol) Server is a secure framework for building and running AI-powered tools and agents. It enables AI assistants and development tools to interact with your custom tools through a standardized protocol, supporting seamless integration across different AI platforms. The current version is 1.19.3, and it receives frequent updates and feature releases.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to create a basic MCP server with `MCPApp`, define tools using the `@app.tool` decorator, and handle secrets. The `arcade-mcp` CLI can be used to scaffold a complete project.

from typing import Annotated
from arcade_mcp_server import MCPApp, Context
import os

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

@app.tool
def greet(name: Annotated[str, "The name of the person to greet"]) -> str:
    """Greet a person by name."""
    return f"Hello, {name}!"

# Example tool requiring a secret, typically set in .env or as an environment variable
@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"""
    secret_value = context.get_secret("MY_SECRET_KEY")
    if secret_value:
        return f"Your secret ends with: {secret_value[-4:]}"
    return "Secret not found or not configured."

if __name__ == "__main__":
    # Ensure MY_SECRET_KEY is set in your environment for the whisper_secret tool to work
    # For local testing, you might use: export MY_SECRET_KEY="your_development_secret"
    # Or, for more robust handling, use a .env file and a library like python-dotenv
    # os.environ['MY_SECRET_KEY'] = os.environ.get('MY_SECRET_KEY', 'default_secret_for_dev')
    app.run()

view raw JSON →