Skip to Content
HomeBuild toolsCreate a MCP Server

Creating an MCP Server with Arcade

The arcade_mcp_server package provides powerful ways to run servers with your Arcade . This guide walks you through the complete process of creating a custom MCP with Arcade.

Outcomes

Build and run an Server with that you define.

You will Learn

  • How to run Servers with Arcade using the arcade_mcp_server package
  • How to use arcade new from the arcade-mcp CLI to create your server with all necessary files and dependencies.
  • How to run your local Server with the Arcade CLI and register it with the so that your can find and use your .

Prerequisites

Install the Arcade CLI

In your terminal, run the following command to install the arcade-mcp package:

Terminal
uv pip install arcade-mcp

This package includes the CLI and the arcade-mcp-server library.

Create Your Server

In your terminal, run the following command to scaffold a new Server called my_server:

Terminal
arcade new my_server cd my_server

If you aren’t already logged into your Arcade , you will be prompted to do so by running arcade login in your terminal.

This generates a complete with:

  • server.py Main server file with MCPApp and example
  • pyproject.toml Dependencies and configuration
  • .env.example Example .env file containing a secret required by one of the generated in server.py

server.py includes proper structure with command-line argument handling. It creates an MCPApp, defines with @app.tool, and runs with app.run():

Python
#!/usr/bin/env python3 """my_server MCP server""" import sys from typing import Annotated import httpx from arcade_mcp_server import Context, MCPApp from arcade_mcp_server.auth import Reddit # Create an MCPApp instance app = MCPApp(name="my_server", version="1.0.0", log_level="DEBUG") # Add a tool @app.tool def greet(name: Annotated[str, "The name of the person to greet"]) -> str: """Greet a person by name.""" return f"Hello, {name}!" # ... more tools ... # Run with specific transport if __name__ == "__main__": # Get transport from command line argument, default to "http" transport = sys.argv[1] if len(sys.argv) > 1 else "http" # Run the server # - "http" (default): HTTPS streaming for Cursor, VS Code, etc. # - "stdio": Standard I/O for Claude Desktop, CLI tools, etc. app.run(transport=transport, host="127.0.0.1", port=8000)

Run your MCP Server

Run your Server using one of the with the following commands in your terminal:

Terminal
uv run server.py http

For HTTP transport, view your server’s API docs at http://127.0.0.1:8000/docs .

You should see output like this in your terminal:

Terminal
INFO | Starting server v1.0.0 (my_server) INFO | Added tool: greet INFO | Starting MCP server on http://127.0.0.1:8000

Configure your MCP Client(s)

Now you can connect your server to apps that support MCP Clients, like AI assistants and IDEs. :

Terminal
arcade configure claude --from-local

That’s it! Your server is running and connected to your AI assistant.

Key takeaways

  • Minimal Setup Create MCPApp, define with @app.tool, and run with app.run()
  • Direct Execution Run your server file directly with uv run or python
  • Transport Flexibility Works with both stdio (for Claude Desktop) and HTTP
  • Type Annotations Use Annotated to provide descriptions for parameters and return values
  • Command Line Arguments Pass transport type as command line argument

Next steps

Last updated on