arcade-mcp/libs/arcade-mcp-server/docs/api/server/server.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

1.3 KiB

Server

Low-level Server

Low-level server for hosting Arcade tools over MCP.

::: arcade_mcp_server.server.MCPServer

Examples

# Basic server with tool catalog and stdio transport
import asyncio
from arcade_mcp_server.server import MCPServer
from arcade_core.catalog import ToolCatalog
from arcade_mcp_server.transports.stdio import StdioTransport

async def main():
    catalog = ToolCatalog()
    server = MCPServer(catalog=catalog, name="example", version="1.0.0")
    await server._start()
    try:
        # Run stdio transport loop
        transport = StdioTransport()
        await transport.run(server)
    finally:
        await server._stop()

if __name__ == "__main__":
    asyncio.run(main())
# Handling a single HTTP streamable connection
import asyncio
from arcade_mcp_server.server import MCPServer
from arcade_core.catalog import ToolCatalog
from arcade_mcp_server.transports.http_streamable import HTTPStreamableTransport

async def run_http():
    catalog = ToolCatalog()
    server = MCPServer(catalog=catalog)
    await server._start()
    try:
        transport = HTTPStreamableTransport(host="0.0.0.0", port=8000)
        await transport.run(server)
    finally:
        await server._stop()

asyncio.run(run_http())