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_serverpackage - How to use
arcade newfrom thearcade-mcpCLI 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
- For this guide, we’ll use uv as our package manager.
Install the Arcade CLI
In your terminal, run the following command to install the arcade-mcp package:
uv pip install arcade-mcpThis 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:
arcade new my_server
cd my_serverIf 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
.envfile containing a secret required by one of the generated inserver.py. Environments are loaded on server start, so if you update the.envfile, you will need to restart your server.
server.py includes proper structure with command-line argument handling. It creates an MCPApp, defines with @app.tool, and runs with app.run():
#!/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:
uv run server.pyYou should see output like this in your terminal:
INFO | Starting server v1.0.0 (my_server)
INFO | Added tool: greet
INFO | Starting MCP server on http://127.0.0.1:8000Configure your MCP Client(s)
Now you can connect your server to apps that support MCP Clients, like AI assistants and IDEs. :
Claude Desktop
arcade configure claude --from-localThat’s it! Your server is running and connected to your AI assistant.
Key takeaways
- Minimal Setup Create
MCPApp, define with@app.tool, and run withapp.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
- Understand the tool context
- Add authentication: Learn how to create tools with authentication
- Add secrets: Learn how to create tools with secrets
- Evaluate your : Explore how to evaluate tool performance
- Set up CI/CD: Automate testing and deployment with continuous integration