Arcade MCP (MCP Server SDK) - Python Overview
arcade mcp
provides a clean, minimal API for building servers programmatically. It handles collection, server configuration, and transport setup with a developer-friendly interface.
Basic Usage
Python
from arcade_mcp_server import MCPApp
app = MCPApp(name="my_server", version="1.0.0")
@app.tool
def greet(name: str) -> str:
return f"Hello, {name}!"
app.run(host="127.0.0.1", port=8000)
Class Reference
MCPApp
arcade_mcp_server.mcp_app.MCPApp
A FastAPI-like interface for building servers.
The app collects and configuration, then lazily creates the server and transport when run()
is called.
Example:
Python
from arcade_mcp_server import MCPApp
app = MCPApp(name="my_server", version="1.0.0")
@app.tool
def greet(name: str) -> str:
return f"Hello, {name}!"
# Runtime CRUD once you have a server bound to the app:
# app.server = mcp_server
# await app.tools.add(materialized_tool)
# await app.prompts.add(prompt, handler)
# await app.resources.add(resource)
app.run(host="127.0.0.1", port=8000)
Properties
prompts
Runtime prompts API: add/remove/list.
resources
Runtime resources API: add/remove/list.
tools
Runtime and build-time API: add/update/remove/list.
Methods
__init__
Python
__init__(
name='ArcadeMCP',
version='1.0.0dev',
title=None,
instructions=None,
log_level='INFO',
transport='http',
host='127.0.0.1',
port=8000,
reload=False,
**kwargs
)
Initialize the app.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name | str | Server name | 'ArcadeMCP' |
version | str | Server version | '1.0.0dev' |
title | str | None | Server title for display | None |
instructions | str | None | Server instructions | None |
log_level | str | Logging level (DEBUG, INFO, WARNING, ERROR) | 'INFO' |
transport | TransportType | Transport type (“http”) | 'http' |
host | str | Host for transport | '127.0.0.1' |
port | int | Port for transport | 8000 |
reload | bool | Enable auto-reload for development | False |
**kwargs | Any | Additional server configuration | {} |
add_tool
Python
add_tool(
func,
desc=None,
name=None,
requires_auth=None,
requires_secrets=None,
requires_metadata=None,
adapters=None
)
Add a for build-time materialization (pre-server).
tool
Python
tool(
func=None,
desc=None,
name=None,
requires_auth=None,
requires_secrets=None,
requires_metadata=None,
adapters=None
)
Decorator for adding with optional parameters.
Examples
Python
# --- server.py ---
# Programmatic server creation with a simple tool and HTTP transport
from arcade_mcp_server import MCPApp
app = MCPApp(name="example_server", version="1.0.0")
@app.tool
def echo(text: str) -> str:
return f"Echo: {text}"
if __name__ == "__main__":
# Start an HTTP server (good for local development/testing)
app.run(host="0.0.0.0", port=8000, reload=False, debug=True)
Terminal
# then run the server
python server.py
Last updated on