arcade-mcp/libs/arcade-mcp-server/docs/examples/README.md
Eric Gustin 9e4d36b8e3
Local MCP Fixes and Address General Feedback (#586)
# Release Candidate 2
## This PR:
- [x] No more confusing 307 redirect logs when using `/mcp` instead of
`/mcp/` (requested by @shubcodes)
- [x] Fix bug in `arcade configure` for Python < 3.12 (reported by
@evantahler
- [x] Fix bug where tools with unsatisfied secret requirements could
still be executed (reported by @evantahler, @shubcodes)
- [x] Auth providers can now be imported via `from
arcade_mcp_server.auth import Reddit` (requested by @shubcodes)
- [x] Add complete E2E oauth flow for tool calls with informational
errors about how to log into arcade and where to go to authorize
(requested by @evantahler, @shubcodes)
- [x] Add OAuth tool in `arcade new`'s generated server (requested by
@shubcodes)
- [x] Standardize on defaulting to running servers on port 8000
- [x] Improve credentials.yaml reading logic
- [x] CLI user friendliness (requested by @Spartee)
- [x] Remove `arcade serve` CLI command
- [x] Fix race condition in `arcade logout`
- [x] Update docs for desired developer onboarding flow

## Next PRs:
- Get `arcade deploy` working for MCP servers. (Command is hidden for
now)
- Rename all occurrences of `toolkit` to `server`/`tools` and rename all
occurrences of `worker` to `server`
2025-09-29 16:00:47 -07:00

2.1 KiB
Raw Blame History

Arcade MCP Examples

This directory contains examples demonstrating how to build MCP servers with your Arcade tools.

Getting Started

The easiest way to get started is with the arcade new command:

# Install the Arcade CLI
uv pip install arcade-mcp

# Create a new server with example tools
arcade new my_server
cd my_server

# Run the server
arcade mcp

Examples Overview

Basic Examples

  1. 00_hello_world.py Minimal tool example

    • Single @tool function showing the basics
    • Run: arcade mcp (or arcade mcp stdio)
  2. 01_tools.py Creating tools and discovery

    • Simple parameters, lists, and TypedDict
    • How the server discovers tools automatically
    • Run: arcade mcp
  3. 02_building_apps.py Building apps with MCPApp

    • Create an MCPApp, register tools with @app.tool
    • Run HTTP: python 02_building_apps.py
    • Run stdio: python 02_building_apps.py stdio
  4. 03_context.py Using Context

    • Access secrets, logging, and user context
    • Run: arcade mcp
  5. 04_tool_secrets.py Working with secrets

    • Use requires_secrets and access masked values
    • Run: arcade mcp
  6. 05_logging.py Logging with MCP

    • Demonstrates debug/info/warning/error levels and structured logs
    • Run: python 05_logging.py

Running Examples

Most examples can be run with the arcade mcp command:

# Auto-discover tools in current directory
arcade mcp

# With specific transport
arcade mcp stdio  # For Claude Desktop
arcade mcp        # HTTP by default

# With debugging
arcade mcp --debug

# With hot reload (HTTP only)
arcade mcp --reload

Alternative: Direct Python Execution

For MCPApp examples, you can run the script directly:

python 02_building_apps.py

Or use the server module directly:

python -m arcade_mcp_server

Note: We recommend using arcade mcp for a better development experience.