Versions: * arcade-mcp\==1.0.0rc1 * arcade-mcp-server\==1.0.0rc1 * arcade-core\==2.5.0rc1 * arcade-tdk\==2.6.0rc1 * arcade-serve\==2.2.0rc1 ### Summary Adds first-class MCP support across Arcade, introduces a new MCP server and CLI, unifies the project under the arcade-mcp name, overhauls templates/scaffolding, and improves developer tooling, secrets management, and examples. ### Highlights - **MCP Server & Core** - New MCP server with stdio and HTTP/SSE transports, session management, resumability, and lifecycle handling. - FastAPI-like `MCPApp` for building servers with lazy init; integrated worker+MCP HTTP app option. - Middleware system (logging and error handling), robust exception hierarchy, and Pydantic-based settings. - Async-safe managers for tools, resources, and prompts backed by registries and locks. - Developer-facing, transport-agnostic runtime context interfaces (logs, tools, prompts, resources, sampling, UI, notifications). - Conversion from Arcade ToolDefinition to MCP tool schema; OpenAI JSON tool schema converter. - Parser supports `@app.tool`/`@app.tool(...)` decorators. - **CLI** - New `mcp` command to run MCP servers with stdio or HTTP/SSE. - New `secret` command to set/list/unset tool secrets (supports .env input, preserves original casing for lookups). - `new` command refactored; option to create a full toolkit package with scaffolding. - `chat` command removed. - `serve.py` imports updated to `arcade_serve.fastapi.telemetry`; version retrieval now uses `arcade-mcp`. - `show.py` refactor to use new local catalog utilities. - `display_tool_details` improved: adds “Default” column and handles nested properties. - **Configuration & Discovery** - New `configure.py` to set up Claude Desktop, Cursor, and VS Code to connect to local or Arcade Cloud MCP servers. - Discovery utilities to find/install toolkits, build `ToolCatalog`s, analyze files for tools, load kits from directories (pyproject parsing), and build minimal toolkits. - Better handling of provider API key resolution and evaluation suite loading. - **Templates & Scaffolding** - Reorganized template structure (minimal vs full); moved `.pre-commit-config.yaml`, `.ruff.toml`, license, Makefile, README, tests, and tools layout to correct paths. - Minimal template adds `.env.example` for runtime secret injection. - Template pyproject updated for MCP servers; includes sample server with greeting and secret-reveal tools. - Authorization flow in templates simplified. - **Repo-wide Renaming & Examples** - Migrates references from `arcade-ai` to `arcade-mcp` across READMEs, scripts, and package metadata. - Examples updated (LangChain/LangGraph/AI SDK/TypeScript) and package name changed to `arcade-mcp-sdk`. - **Evals & Core Utilities** - Evals now use OpenAI tooling format (`OpenAIToolList`, `to_openai`); `tool_eval` takes `provider_api_key`. - Core utilities: fixed `does_function_return_value` by dedenting before parse; version bump to `2.5.0rc1` and dependency cleanup. - **Tooling & CI** - `setup-uv-env` action splits toolkit vs contrib dependency installation. - Pre-commit: excludes `libs/arcade-mcp-server/mkdocs.yml` and `libs/tests/` from YAML and Ruff hooks; Ruff per-file ignores (e.g., C901 in `libs/**/*.py`, TRY400 in server docs paths). - Makefile updates for uv env setup, quality checks, tests, builds, and new `shell` target. - Added Makefile to MCP server library to streamline dev workflow. - **Cleanup** - Removed `claude.json` config. - Simplified stdio entrypoint; removed unused imports (`arcade_gmail`, `arcade_search`). ### Breaking Changes - **CLI**: `chat` command removed; use `mcp`, `secret`, and updated `new`. - **Naming**: All users should update references from `arcade-ai` to `arcade-mcp`. - **Templates**: File paths moved; downstream scripts referencing old template locations may need updates. ### Getting Started - Run an MCP server: - `arcade mcp --stdio --toolkits your_toolkit` - `arcade mcp --http --toolkits your_toolkit` - Manage secrets: - `arcade secret set your_toolkit KEY=value` - `arcade secret list your_toolkit` - `arcade secret unset your_toolkit KEY` - Configure clients: - `arcade configure` to set up Claude Desktop, Cursor, and VS Code for local/Arcade Cloud MCP. --------- Co-authored-by: Sam Partee <sam@arcade-ai.com> Co-authored-by: Shub <125150494+shubcodes@users.noreply.github.com>
7 KiB
MCP Inspector
The MCP Inspector is a powerful debugging and testing tool for MCP servers. It provides a web-based interface to interact with your Arcade MCP server, test tools, and monitor protocol messages.
Installation
Install the MCP Inspector globally:
npm install -g @modelcontextprotocol/inspector
Or use npx to run without installing:
npx @modelcontextprotocol/inspector
Basic Usage
Connecting to HTTP Servers
For MCP servers running over HTTP:
# Start your MCP server
python -m arcade_mcp_server --host 0.0.0.0 --port 8000
# In another terminal, start the inspector
mcp-inspector http://localhost:8000/mcp
Connecting to stdio Servers
For stdio-based servers:
# Start the inspector with your server command
mcp-inspector "python -m arcade_mcp_server stdio"
# With additional arguments
mcp-inspector "python -m arcade_mcp_server stdio --tool-package github"
Inspector Features
Tool Explorer
The Tool Explorer shows all available tools with:
- Tool names and descriptions
- Parameter schemas
- Return type information
- Example invocations
Interactive Testing
Test tools directly from the interface:
- Select a tool from the explorer
- Fill in parameter values
- Click "Execute" to run the tool
- View results and execution time
Protocol Monitor
Monitor all MCP protocol messages:
- Request/response pairs
- Message timing
- Protocol errors
- Raw JSON data
Resource Browser
If your server provides resources:
- Browse available resources
- View resource contents
- Test resource operations
Prompt Templates
Test prompt templates if supported:
- View available prompts
- Fill template parameters
- Preview rendered prompts
Advanced Usage
Custom Environment
Pass environment variables to your server:
# Using env command
env ARCADE_API_KEY=your-key mcp-inspector "python -m arcade_mcp_server stdio"
# Using inspector's env option
mcp-inspector --env ARCADE_API_KEY=your-key "python -m arcade_mcp_server stdio"
Working Directory
Set the working directory for your server:
mcp-inspector --cwd /path/to/project "python -m arcade_mcp_server stdio"
Debug Mode
Enable verbose logging:
# Debug the MCP server
mcp-inspector "python -m arcade_mcp_server stdio --debug"
# Debug the inspector itself
mcp-inspector --debug "python -m arcade_mcp_server stdio"
Testing Workflows
Tool Development
-
Start your server with hot reload:
python -m arcade_mcp_server --reload --debug -
Connect the inspector:
mcp-inspector http://localhost:8000/mcp -
Develop and test:
- Modify your tool code
- Server auto-reloads
- Test immediately in inspector
Performance Testing
Use the inspector to measure tool performance:
- Enable timing in the Protocol Monitor
- Execute tools multiple times
- Analyze response times
- Identify bottlenecks
Error Debugging
Debug tool errors effectively:
- Enable debug mode on your server
- Execute the failing tool
- Check Protocol Monitor for error details
- View server logs in terminal
Integration Testing
Test Suites
Create test suites using the inspector:
// test-tools.js
const tests = [
{
tool: "greet",
params: { name: "World" },
expected: "Hello, World!"
},
{
tool: "calculate",
params: { expression: "2 + 2" },
expected: 4
}
];
// Run tests via inspector API
Automated Testing
Combine with testing frameworks:
# test_mcp_tools.py
import subprocess
import json
import pytest
def test_tool_via_inspector():
# Start server
server = subprocess.Popen(
["python", "-m", "arcade_mcp_server"],
stdout=subprocess.PIPE
)
# Use inspector's API to test tools
# ...
Best Practices
Development Setup
-
Use Split Terminal:
- Terminal 1: MCP server with reload
- Terminal 2: Inspector
- Terminal 3: Code editor
-
Enable All Debugging:
python -m arcade_mcp_server --reload --debug --env-file .env.dev -
Save Test Cases:
- Export successful tool calls
- Build regression test suite
- Document edge cases
Production Testing
-
Test Against Production Config:
mcp-inspector "python -m arcade_mcp_server stdio --env-file .env.prod" -
Verify Security:
- Test with limited permissions
- Verify API key handling
- Check error messages don't leak secrets
-
Load Testing:
- Execute tools rapidly
- Monitor memory usage
- Check for resource leaks
Troubleshooting
Connection Issues
"Failed to connect"
- Verify server is running
- Check correct URL/command
- Ensure ports aren't blocked
- Try with
--debugflag
"Protocol error"
- Ensure server implements MCP correctly
- Check for version compatibility
- Review server logs
- Verify transport type
Tool Issues
"Tool not found"
- Verify tool is decorated with
@tool - Check tool discovery in server
- Ensure no import errors
- Restart server and inspector
"Parameter validation failed"
- Check parameter types match schema
- Verify required parameters
- Test with simpler values
- Review tool documentation
Examples
Quick Test Session
# 1. Start a simple MCP server
cat > test_tools.py << 'EOF'
from arcade_mcp_server import tool
from typing import Annotated
@tool
def echo(message: Annotated[str, "Message to echo"]) -> str:
"""Echo the message back."""
return message
@tool
def add(
a: Annotated[int, "First number"],
b: Annotated[int, "Second number"]
) -> Annotated[int, "Sum"]:
"""Add two numbers."""
return a + b
EOF
# 2. Start inspector
mcp-inspector "python -m arcade_mcp_server stdio"
# 3. Test tools in the web interface
HTTP Server Testing
# 1. Create an MCPApp server
cat > app.py << 'EOF'
from arcade_mcp_server import MCPApp
from typing import Annotated
app = MCPApp(name="test-server", version="1.0.0")
@app.tool
def get_time() -> Annotated[str, "Current time"]:
"""Get the current time."""
from datetime import datetime
return datetime.now().isoformat()
if __name__ == "__main__":
app.run(port=9000, reload=True)
EOF
# 2. Run the server
python app.py
# 3. Connect inspector
mcp-inspector http://localhost:9000/mcp
Debugging Session
# 1. Enable all debugging
export DEBUG=*
export MCP_DEBUG=true
# 2. Start server with verbose logging
python -m arcade_mcp_server stdio --debug 2>server.log
# 3. Start inspector with debugging
mcp-inspector --debug "tail -f server.log" &
mcp-inspector --debug "python -m arcade_mcp_server stdio --debug"
Tips and Tricks
- Bookmark Tool URLs: Save frequently tested tools
- Export Test Data: Save successful requests for documentation
- Use Browser DevTools: Inspect network requests
- Create Tool Shortcuts: Bookmark specific tool tests
- Monitor Resources: Keep an eye on server resources during testing