### QuickStart: Build and Run an MCP Server Source: https://context7_llms This step-by-step guide covers creating and running a custom MCP Server using the Arcade MCP framework. It includes prerequisites, installation, server setup, and tool authorization. ```python from arcade.mcp import MCPManager from arcade.integrations.openai import OpenAITool # Assuming you have defined custom tools or are using built-in ones # For example, using OpenAI's tool calling capabilities # Initialize the MCP Manager mcp_manager = MCPManager() # Register tools (e.g., an OpenAI tool wrapper) # mcp_manager.register_tool(OpenAITool(model='gpt-4')) # Start the MCP Server (this is a conceptual representation) # The actual server start command might be different (e.g., via CLI) # mcp_manager.start_server(port=8000) print("MCP Server setup complete. Run 'arcade mcp start' to launch.") ``` -------------------------------- ### Build MCP Server QuickStart Source: https://context7_llms The "Build MCP Server QuickStart" documentation provides a step-by-step guide for users to create and run a custom MCP Server using the Arcade MCP framework. It covers prerequisites, installation instructions, server setup, and how to connect and authorize tools, enabling. ```APIDOC ## Build MCP Server QuickStart ### Description Step-by-step guide to create and run a custom MCP Server using the Arcade MCP framework, including setup and tool authorization. ### Method N/A (Documentation Overview) ### Endpoint N/A (Documentation Overview) ### Parameters N/A ### Request Example N/A ### Response N/A ``` -------------------------------- ### Build an MCP Server with Arcade Source: https://context7_llms This guide provides instructions for creating, testing, deploying, and publishing a custom MCP Server using the Arcade framework. It covers necessary tool installations, project scaffolding, and environment configuration setup. ```python from arcade.server import Server # Define your server logic class MyServer(Server): def __init__(self): super().__init__() def handle_request(self, request): # Process incoming requests return "Response to request" # Instantiate and run the server server = MyServer() server.run() ``` -------------------------------- ### Integrate Arcade Tools into OpenAI Agents Source: https://context7_llms This guide explains how to integrate Arcade tools into OpenAI Agents applications. It covers prerequisites, environment setup, configuration, creating and managing tools, setting up agents, and handling authentication. Code examples for tool creation and agent configuration are expected. ```python from arcade import Agent from your_tools import MyTool agent = Agent( tools=[MyTool()], # ... other configurations ) ``` -------------------------------- ### Install Dependencies for LangChain and Arcade Source: https://docs.arcade.dev/en/get-started/agent-frameworks/langchain/use-arcade-with-langchain Installs the necessary packages for integrating Arcade tools with LangChain, including the Arcade SDK, LangChain core, and OpenAI integration. This command assumes you are using the bun runtime. ```bash bun install @arcadeai/arcadejs langchain @langchain/openai @langchain/core @langchain/langgraph ``` -------------------------------- ### Create and Run First Arcade Server Source: https://docs.arcade.dev/en/references/cli-cheat-sheet Creates a new Arcade server project, navigates into the project directory, and starts an HTTP MCP server. This is a common workflow for getting started with a new server. ```bash arcade new my_server cd my_server arcade mcp http ``` -------------------------------- ### Install Arcade Python Client Source: https://docs.arcade.dev/en/references/auth-providers/salesforce Installs the necessary Python client library for interacting with the Arcade platform. This is a prerequisite for using the Python examples. ```bash pip install arcadepy ``` -------------------------------- ### Example MCP Server Entrypoint File Source: https://docs.arcade.dev/en/guides/deployment-hosting/arcade-deploy A Python script demonstrating the structure of an MCP server entrypoint file. It initializes an MCPApp, defines a tool using the @app.tool decorator, and includes a standard 'if __name__ == "__main__":' block to run the application. ```python from arcade_mcp_server import MCPApp from typing import Annotated app = MCPApp() @app.tool def echo(phrase: Annotated[str, "The phrase to echo"]) -> str: """Echo a phrase""" return phrase if __name__ == "__main__": app.run() ``` -------------------------------- ### Custom Authorization Flow for CrewAI with ArcadeToolManager Source: https://context7_llms This guide details creating a custom authorization flow for the ArcadeToolManager within a CrewAI agent team. It covers prerequisites, setup, and code examples for tailored authorization. ```python from crewai import Agent, Task, Crew from arcade.crewai.tool_manager import ArcadeToolManager # Define your custom tool manager with authorization logic class CustomAuthToolManager(ArcadeToolManager): def authorize_tool(self, tool_name: str, tool_input: dict) -> bool: # Implement your custom authorization logic here print(f"Authorizing tool: {tool_name} with input: {tool_input}") # For example, check user permissions or specific conditions if tool_name == 'sensitive_data_tool' and not self.user_has_permission(): return False return True def user_has_permission(self) -> bool: # Placeholder for permission checking logic return True # Initialize the custom tool manager tool_manager = CustomAuthToolManager() # Initialize agents and tasks using the tool manager # ... (rest of your CrewAI setup) # Example of how a tool call might be intercepted: # agent = Agent(..., tools=[...], tool_manager=tool_manager) # task = Task(..., agent=agent) # crew = Crew(..., tasks=[task]) # crew.kickoff() ``` -------------------------------- ### Initialize Project and Install Dependencies (Bash) Source: https://docs.arcade.dev/en/get-started/agent-frameworks/setup-arcade-with-your-llm-python Sets up a new project directory, initializes a virtual environment using uv, and installs necessary Python packages including arcadepy, openai, and python-dotenv. This prepares the environment for integrating Arcade with an LLM. ```bash mkdir arcade-llm-example cd arcade-llm-example uv init uv venv source .venv/bin/activate uv add arcadepy openai python-dotenv ``` -------------------------------- ### Creating an MCP Server with Arcade API Source: https://context7_llms Provides a comprehensive guide for users to create, test, deploy, and publish a custom MCP Server using the Arcade framework. It details the installation of necessary tools, the scaffolding of a server project, and the setup of environment configurations. ```APIDOC ## GET /guides/create-tools/tool-basics/build-mcp-server.md ### Description Provides a comprehensive guide for users to create, test, deploy, and publish a custom MCP Server using the Arcade framework. It details the installation of necessary tools, the scaffolding of a server project, and the setup of environment configurations. ### Method GET ### Endpoint /guides/create-tools/tool-basics/build-mcp-server.md ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **content** (string) - Documentation content for creating an MCP Server with Arcade. #### Response Example { "content": "Documentation content..." } ``` -------------------------------- ### Get GitHub User Installation Source: https://docs.arcade.dev/en/resources/integrations/development/github-api Retrieve a user's GitHub App installation information. ```python from tools.github_api import GithubApi response = GithubApi.GetGithubUserInstallation(username="octocat") print(response) ``` -------------------------------- ### Using Zendesk Auth in App Code Source: https://docs.arcade.dev/en/references/auth-providers/zendesk Code examples demonstrating how to obtain a user token for Zendesk APIs using Arcade's `client.auth.start()` method in Python and JavaScript. ```APIDOC ## Using Zendesk Auth in App Code ### Description Use the Zendesk auth provider created in Arcade to get a user token for Zendesk APIs. This process involves starting the authorization and waiting for completion. ### Python Example ```python from arcadepy import Arcade client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable # Start the authorization process auth_response = client.auth.start( user_id="{arcade_user_id}", provider="zendesk", scopes=["read_account"], ) if auth_response.status != "completed": print("Please complete the authorization challenge in your browser:") print(auth_response.url) # Wait for the authorization to complete auth_response = client.auth.wait_for_completion(auth_response) token = auth_response.context.token # Do something interesting with the token... ``` ### JavaScript Example ```javascript import { Arcade } from "@arcadeai/arcadejs"; const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable const userId = "{arcade_user_id}"; // Start the authorization process let authResponse = await client.auth.start(userId, { provider: "zendesk", scopes: ["read_account"], }); if (authResponse.status !== "completed") { console.log("Please complete the authorization challenge in your browser:"); console.log(authResponse.url); } // Wait for the authorization to complete authResponse = await client.auth.waitForCompletion(authResponse); const token = authResponse.context.token; // Do something interesting with the token... ``` ``` -------------------------------- ### Example MCP server with organized tools Source: https://docs.arcade.dev/en/guides/create-tools/tool-basics/organize-mcp-tools A complete example of an MCP server file (`server.py`) demonstrating modular tool organization. It includes importing tools from local mock modules and explicitly adding them to the `MCPApp` instance. This serves as a practical implementation of the concepts discussed. ```python #!/usr/bin/env python3 import sys from typing import Annotated from arcade_mcp_server import MCPApp # Import tools from our mock 'tools' directory # In a real project, these could come from actual separate files from tools.math_tools import add, multiply from tools.text_tools import capitalize_string, word_count # In a real project, you could import from Arcade PyPI packages - # e.g. `pip install arcade-gmail` # import arcade_gmail # Create the MCP application app = MCPApp( name="organized_server", version="1.0.0", instructions="Example server demonstrating modular tool organization", ) # Method 1: Add imported tools explicitly app.add_tool(add) app.add_tool(multiply) app.add_tool(capitalize_string) app.add_tool(word_count) # app.add_tools_from_module(arcade_gmail) ``` -------------------------------- ### Integrate Arcade with JavaScript Agent Frameworks Source: https://docs.arcade.dev/en/get-started/agent-frameworks Guides for integrating Arcade with JavaScript-based agent frameworks such as LangChain, Mastra, and Vercel AI. These examples cover the setup process for using Arcade tools within your JavaScript AI applications. ```javascript // Example for LangChain (JavaScript) // (Actual code would be in a separate file linked from the guide) // import { ArcadeTools } from "langchain_community/tools/arcade"; // Assuming you have an Arcade client initialized // const arcadeClient = ...; // const tools = new ArcadeTools({ client: arcadeClient }); console.log('Setting up Arcade with LangChain (JavaScript)...'); ``` ```javascript // Example for Vercel AI // (Actual code would be in a separate file linked from the guide) // import { createClient } from '@vercel/ai'; // import { ArcadeTools } from '@vercel/arcade-tools'; // Assuming you have an Arcade client initialized // const arcadeClient = new ArcadeTools(...); console.log('Setting up Arcade with Vercel AI...'); ``` -------------------------------- ### Twilio SMS and WhatsApp Integration Source: https://context7_llms This documentation page provides users with a comprehensive guide to using Twilio for sending SMS and WhatsApp messages through an MCP Server, including setup prerequisites and configuration details. It outlines the necessary credentials required for integration and offers practical usage examples. ```APIDOC ## Twilio Integration ### Description Enables sending SMS and WhatsApp messages via Twilio through an MCP Server. ### Method POST ### Endpoint `/api/twilio/send` (example, actual endpoints may vary) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **to** (string) - Required - The recipient's phone number (e.g., '+1234567890'). - **message** (string) - Required - The content of the message. - **messagingServiceSid** (string) - Optional - The Messaging Service SID from Twilio. - **whatsapp** (boolean) - Optional - Set to true to send via WhatsApp. ### Request Example ```json { "to": "+1234567890", "message": "Hello from Arcade!", "whatsapp": true } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of the message sending operation. - **messageId** (string) - The unique identifier for the sent message. #### Response Example ```json { "status": "sent", "messageId": "SMxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" } ``` ``` -------------------------------- ### Basic Usage: JavaScript Example with Gmail Tools Source: https://docs.arcade.dev/en/get-started/agent-frameworks/openai-agents/overview Illustrates initializing the Arcade client, fetching Gmail tools, preparing them for OpenAI Agents, creating an Agent, and running it to query emails. Requires an Arcade API key and user ID for authorization. ```javascript import Arcade from "@arcadeai/arcadejs"; import { executeOrAuthorizeZodTool, toZod } from "@arcadeai/arcadejs/lib"; import { Agent, run, tool } from "@openai/agents"; // 1) Initialize Arcade client const client = new Arcade(); // 2) Fetch Gmail MCP Server from Arcade and prepare tools for OpenAI Agents const googleToolkit = await client.tools.list({ toolkit: "gmail", limit: 30 }); const tools = toZod({ tools: googleToolkit.items, client, userId: "", // Replace this with your application's user ID (e.g. email address, UUID, etc.) executeFactory: executeOrAuthorizeZodTool, }).map(tool); // 3) Create a new agent with the Gmail MCP Server const googleAgent = new Agent({ name: "Gmail agent", instructions: "You are a helpful assistant that can assist with Google API calls.", model: "gpt-4o-mini", tools, }); // 4) Run the agent const result = await run(googleAgent, "What are my latest emails?"); // 5) Print the result console.log(result.finalOutput); ``` -------------------------------- ### Basic Usage: Python Example with Gmail Tools Source: https://docs.arcade.dev/en/get-started/agent-frameworks/openai-agents/overview Demonstrates how to initialize the Arcade client, fetch Gmail tools, create an OpenAI Agent with these tools, and run the agent to process email-related queries. Requires an Arcade API key and user authorization for Gmail. ```python from agents import Agent, Runner from arcadepy import AsyncArcade from agents_arcade import get_arcade_tools from agents_arcade.errors import AuthorizationError async def main(): # Initialize the Arcade client client = AsyncArcade() # Get tools from the "gmail" MCP Server tools = await get_arcade_tools(client, toolkits=["gmail"]) # Create an agent with Gmail tools google_agent = Agent( name="Gmail agent", instructions="You are a helpful assistant that can assist with Gmail API calls.", model="gpt-4o-mini", tools=tools, ) try: # Run the agent with a unique user_id for authorization result = await Runner.run( starting_agent=google_agent, input="What are my latest emails?", context={"user_id": "{arcade_user_id}"}, ) print("Final output:\n\n", result.final_output) except AuthorizationError as e: print("Please Login to Google:", e) if __name__ == "__main__": import asyncio asyncio.run(main()) ``` -------------------------------- ### Arcade OpenAI Agents API Source: https://context7_llms This documentation page provides a comprehensive guide for integrating Arcade with the OpenAI Agents library, enabling users to enhance their AI agents with various tools like Gmail, LinkedIn, and GitHub. It covers installation, key features, basic usage examples, and handling. ```APIDOC ## Arcade OpenAI Agents Integration ### Description Integrates Arcade with OpenAI Agents to enhance AI agents with tools like Gmail, LinkedIn, and GitHub. ### Method N/A (Documentation Overview) ### Endpoint N/A (Documentation Overview) ### Parameters N/A ### Request Example N/A ### Response N/A ``` -------------------------------- ### Build a Tool Source: https://context7_llms This documentation page provides a comprehensive guide on building custom tools using Arcade's MCP Server framework, enabling users to enhance AI agents with new functionalities. It serves as a starting point for those looking to create their first tool or expand existing capabilities. Users will learn. ```APIDOC ## Build a Tool ### Description Comprehensive guide on building custom tools using Arcade's MCP Server framework to enhance AI agents. ### Method N/A (Documentation Overview) ### Endpoint N/A (Documentation Overview) ### Parameters N/A ### Request Example N/A ### Response N/A ``` -------------------------------- ### Get GitHub App Installation Info Source: https://docs.arcade.dev/en/mcp-servers/development/github-api Fetch detailed information about a specific GitHub App installation using its installation ID. ```APIDOC ## GET /app/installations/{installation_id} ### Description Fetch information of a GitHub App installation by ID. ### Method GET ### Endpoint /app/installations/{installation_id} ### Parameters #### Path Parameters - **installation_id** (integer) - Required - The unique identifier of the GitHub App installation to fetch information for. ### Response #### Success Response (200) - **id** (integer) - The ID of the installation. - **account** (object) - Information about the account that owns the installation. - **repository_selection** (string) - Indicates if the app has access to all repositories or a selected list. - **access_tokens_url** (string) - URL to get access tokens for this installation. - **repositories_url** (string) - URL to list repositories accessible by this installation. - **html_url** (string) - URL to the installation settings page on GitHub. #### Response Example ```json { "id": 1, "account": { "login": "octocat", "id": 1, "type": "User" }, "repository_selection": "all", "access_tokens_url": "https://api.github.com/app/installations/1/access_tokens", "repositories_url": "https://api.github.com/installation/repositories", "html_url": "https://github.com/settings/installations/1" } ``` ``` -------------------------------- ### GET /orgs/{organization_name}/installation Source: https://docs.arcade.dev/en/resources/integrations/development/github-api Retrieve GitHub organization's installation information. This endpoint provides details about the GitHub App installation for a given organization. ```APIDOC ## GET /orgs/{organization_name}/installation ### Description Retrieve GitHub organization's installation information. This endpoint provides details about the GitHub App installation for a given organization. ### Method GET ### Endpoint /orgs/{organization_name}/installation ### Parameters #### Path Parameters - **organization_name** (string) - Required - The GitHub organization name. It is not case-sensitive. ### Request Example ```json { "organization_name": "your-org" } ``` ### Response #### Success Response (200) - **installation_id** (integer) - The unique identifier for the GitHub App installation. - **account** (object) - Information about the organization. - **repositories** (array) - A list of repositories the App is installed on. #### Response Example ```json { "installation_id": 98765, "account": { "login": "your-org", "id": 11111, "node_id": "MDQ6Ocmc2345", "avatar_url": "https://avatars.githubusercontent.com/u/11111?v=4", "url": "https://api.github.com/orgs/your-org", "html_url": "https://github.com/orgs/your-org", "type": "Organization" }, "repositories": [ { "id": 55555, "name": "repo1", "full_name": "your-org/repo1", "private": false } ] } ``` ``` -------------------------------- ### GET /github/app-installation Source: https://docs.arcade.dev/en/resources/integrations/development/github-api Fetches GitHub App installation information for a given repository. ```APIDOC ## GET /github/app-installation ### Description Fetches GitHub App installation info for a repository. ### Method GET ### Endpoint /github/app-installation ### Parameters #### Query Parameters - **repository_name** (string) - Required - The name of the repository. It is not case sensitive and identifies the specific repository for which to retrieve GitHub App installation information. - **repository_owner** (string) - Required - The account owner's name for the repository, not case sensitive. ### Request Example ```json { "repository_name": "my-repo", "repository_owner": "my-org" } ``` ### Response #### Success Response (200) - **installation_id** (integer) - The unique identifier for the GitHub App installation. - **permissions** (object) - The permissions granted to the GitHub App for the repository. #### Response Example ```json { "installation_id": 67890, "permissions": { "contents": "read", "metadata": "read" } } ``` ``` -------------------------------- ### PosthogApi.CreateFileSystemEnvironment Source: https://docs.arcade.dev/en/resources/integrations/development/posthog-api Creates a new file system environment within a specified project. Requires 'execute' mode and optionally a request body. ```APIDOC ## POST /api/projects/{project_id}/filesystems ### Description Create a new file system environment in a project. ### Method POST ### Endpoint /api/projects/{project_id}/filesystems ### Parameters #### Path Parameters - **project_id** (string) - Optional - The ID of the project to access for environment creation. Retrieve it from /api/projects/. Required when mode is 'execute', ignored when mode is 'get_request_schema'. #### Query Parameters - **mode** (Enum) - Required - Operation mode: 'get_request_schema' returns the OpenAPI spec for the request body, 'execute' performs the actual operation. #### Request Body - **request_body** (string) - Optional - Stringified JSON representing the request body. Required when mode is 'execute', ignored when mode is 'get_request_schema'. ### Request Example ```json { "mode": "execute", "project_id": "your_project_id", "request_body": "{\"name\": \"new_filesystem\", \"description\": \"A new filesystem\"}" } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message of file system creation. - **file_system_id** (string) - The ID of the newly created file system. #### Response Example ```json { "message": "File system created successfully.", "file_system_id": "fs_uuid_new" } ``` ``` -------------------------------- ### Create Agent with System Prompt, Model, Tools, and Checkpointer Source: https://docs.arcade.dev/en/get-started/agent-frameworks/langchain/use-arcade-with-langchain Initializes an agent using the `createAgent` function. It requires a system prompt, a model, a list of tools, and a checkpointer. The agent will automatically use provided helper functions for tool calls and authorization. ```typescript const agent = createAgent({ systemPrompt: systemPrompt, model: agentModel, tools: tools, checkpointer: new MemorySaver(), }); ``` -------------------------------- ### Deploy MCP Server with Arcade Deploy Source: https://context7_llms This guide outlines the process of deploying an MCP server to the cloud using Arcade Deploy. It covers prerequisites and deployment steps, enabling remote access and multi-user support. ```bash # Example deployment command (conceptual) arca deploy mcp-server --target cloud --config deploy.yaml ``` -------------------------------- ### Get User GitHub App Installation Source: https://docs.arcade.dev/en/mcp-servers/development/github-api Retrieves a user's GitHub App installation information. Requires the user's handle. ```APIDOC ## GET /users/{github_user_handle}/installation ### Description Retrieve a user's GitHub App installation information. ### Method GET ### Endpoint /users/{github_user_handle}/installation ### Parameters #### Path Parameters - **github_user_handle** (string) - Required - The handle (username) of the GitHub user account to retrieve installation details for. ### Request Example ```json { "github_user_handle": "octocat" } ``` ### Response #### Success Response (200) - **installations** (array) - A list of installation objects for the user. - **installation** (object) - Contains details about a specific app installation. #### Response Example ```json { "installations": [ { "id": 12345, "account": { "login": "octocat" } } ] } ``` ``` -------------------------------- ### Build Custom Tools with Arcade MCP Server Source: https://context7_llms This guide provides a comprehensive overview of building custom tools using Arcade's MCP Server framework. It serves as a starting point for creating new functionalities for AI agents. ```python from arcade.mcp import MCPBase class MyCustomTool(MCPBase): def __init__(self): super().__init__(name='my_tool') def run(self, **kwargs): # Tool logic here return "Tool executed successfully" # To register and use the tool: # mcp_server = MCPManager() # mcp_server.register_tool(MyCustomTool()) ``` -------------------------------- ### GET /repos/{owner}/{repo}/installation Source: https://docs.arcade.dev/en/mcp-servers/development/github-api Fetches GitHub App installation info for a repository. This endpoint provides details about how a GitHub App is installed on a specific repository. ```APIDOC ## Get GitHub App Repository Installation ### Description Fetches GitHub App installation info for a repository. ### Method GET ### Endpoint `/repos/{owner}/{repo}/installation` ### Parameters #### Path Parameters - **repository_name** (string) - Required - The name of the repository. - **repository_owner** (string) - Required - The account owner's name for the repository. ### Request Example ```json { "repository_name": "my-repo", "repository_owner": "my-org" } ``` ### Response #### Success Response (200) - **installation_id** (integer) - The unique identifier for the GitHub App installation. - **account** (object) - Information about the account the app is installed on. - **login** (string) - The login name of the account. - **id** (integer) - The ID of the account. - **type** (string) - The type of account (e.g., User, Organization). - **repository_selection** (string) - Indicates whether all repositories or a selected list are available. - **events** (array) - A list of webhook events the app is subscribed to. #### Response Example ```json { "installation_id": 789, "account": { "login": "my-org", "id": 101, "type": "Organization" }, "repository_selection": "all", "events": [ "push", "pull_request" ] } ``` ``` -------------------------------- ### Start Authentication with GHES Provider (Python/JavaScript) Source: https://docs.arcade.dev/en/references/auth-providers/github Initiates the authentication flow using a custom GHES provider ID. This example demonstrates how to specify the custom provider when starting the authentication process in both Python and JavaScript. ```python client = Arcade() auth_response = client.auth.start( user_id=user_id, provider="my-company-github-enterprise", # Your custom provider ID ) ``` ```javascript const client = new Arcade(); let authResponse = await client.auth.start( userId, "my-company-github-enterprise" // Your custom provider ID ); ``` -------------------------------- ### PosthogApi.CreateProjectFileSystem Source: https://docs.arcade.dev/en/resources/integrations/development/posthog-api Creates a new file system for a specified project. Requires project ID and request body details. ```APIDOC ## POST /api/projects/{project_id}/filesystems ### Description Create a file system for a specified project. ### Method POST ### Endpoint /api/projects/{project_id}/filesystems ### Parameters #### Path Parameters - **project_id** (string) - Required - The ID of the project for which you want to create a file system. Retrieve this ID by calling `/api/projects/`. #### Query Parameters - **mode** (Enum) - Required - Operation mode: 'get_request_schema' returns the OpenAPI spec for the request body, 'execute' performs the actual operation - **request_body** (string) - Optional - Stringified JSON representing the request body. Required when mode is 'execute', ignored when mode is 'get_request_schema' ### Request Example ```json { "mode": "execute", "project_id": "your_project_id", "request_body": "{\"name\": \"new_filesystem\", \"type\": \"s3\"}" } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message of the file system creation. - **file_system_id** (string) - The ID of the newly created file system. #### Response Example ```json { "message": "File system created successfully.", "file_system_id": "f1e2d3c4-b5a6-7890-1234-567890fedcba" } ``` ``` -------------------------------- ### Install Arcade CLI using pip Source: https://docs.arcade.dev/en/get-started/setup/api-keys Installs the Arcade CLI tool using the 'pip' package manager. This command adds the 'arcade-mcp' functionality to your Python environment. ```bash pip install arcade-mcp ``` -------------------------------- ### Arcade Examples Showcase Source: https://context7_llms A collection of example applications utilizing Arcade's tools and MCP servers for various workflows. ```APIDOC ## Arcade Examples Showcase ### Description This documentation page showcases a collection of example applications that utilize Arcade's tools and MCP servers, providing users with practical implementations and templates for various workflows and agent functionalities. Users can explore detailed descriptions and links to GitHub repositories for each app. ### Method GET ### Endpoint /llmstxt/arcade_dev_llms_txt/examples ### Parameters None ### Response #### Success Response (200) - **examples** (array) - A list of example applications. - **name** (string) - Name of the example application. - **description** (string) - Description of the example. - **github_url** (string) - URL to the GitHub repository for the example. ### Response Example ```json { "examples": [ { "name": "Email Summarizer Agent", "description": "An agent that summarizes incoming emails using NLP tools.", "github_url": "https://github.com/arcade/examples/email-summarizer" }, { "name": "Calendar Event Manager", "description": "An application to manage calendar events using the Outlook Calendar API.", "github_url": "https://github.com/arcade/examples/calendar-manager" } ] } ``` ``` -------------------------------- ### Configure Arcade Engine with engine.yaml Source: https://context7_llms This guide details advanced configuration options for self-hosting the Arcade Engine using the `engine.yaml` file. It covers installation and customization of engine settings for enterprise customers. ```yaml # Example engine.yaml configuration server: port: 8080 database: type: postgresql host: localhost port: 5432 username: admin password: "secure_password" logging: level: INFO ``` -------------------------------- ### Install Arcade CLI using uv Source: https://docs.arcade.dev/en/get-started/setup/api-keys Installs the Arcade CLI tool using the 'uv' package manager. This command makes the 'arcade-mcp' command available system-wide. ```bash uv tool install arcade-mcp ``` -------------------------------- ### Create an MCP Server entrypoint file using @app.tool decorator Source: https://docs.arcade.dev/en/guides/create-tools/migrate-toolkits Example of a Python entrypoint file for an MCP server. It initializes an `MCPApp` and registers tools using the `@app.tool` decorator. The server can be run with different transports like stdio. ```python #!/usr/bin/env python3 """My MCP Server""" import sys from arcade_mcp_server import MCPApp app = MCPApp(name="my_server", version="1.0.0") @app.tool def echo_hello() -> str: """Tool that just says hello""" return "Hello" @app.tool def echo_goodbye() -> str: """Tool that just says goodbye""" return "Goodbye" if __name__ == "__main__": transport = sys.argv[1] if len(sys.argv) > 1 else "stdio" app.run(transport=transport) ``` -------------------------------- ### Get GitHub Gist - Python and JavaScript Source: https://docs.arcade.dev/en/mcp-servers/development/github-api Retrieves details of a specific GitHub gist using its unique ID. The Python example is provided in 'get_github_gist_example_call_tool.py', and the JavaScript example is in 'get_github_gist_example_call_tool.js'. ```Python from github_api import GithubApi # Example usage: github_api = GithubApi() gist_id_to_retrieve = 'your_gist_id' gist_details = github_api.get_github_gist(gist_identifier=gist_id_to_retrieve) print(gist_details) ``` ```JavaScript const githubApi = require('./github_api'); // Example usage: const gistIdToRetrieve = 'your_gist_id'; githubApi.getGithubGist({ gistIdentifier: gistIdToRetrieve }).then(gistDetails => { console.log(gistDetails); }); ``` -------------------------------- ### Install Dependencies with uv Source: https://docs.arcade.dev/en/get-started/agent-frameworks/openai-agents/use-arcade-with-openai-agents Installs the necessary Python packages, 'openai-agents' and 'arcadepy', using the 'uv' package manager. This command should be run within an activated virtual environment. ```bash uv pip install openai-agents arcadepy ``` -------------------------------- ### Run Arcade MCP Server Source: https://docs.arcade.dev/en/guides/security/secure-your-mcp-server This command starts the Arcade MCP server using `uvicorn`. Ensure that the `server.py` file contains the application setup. The server will then be accessible at the specified host and port, requiring valid Bearer tokens for requests. ```bash uv run server.py ``` -------------------------------- ### Create Posthog Environment Dataset (Python, JavaScript) Source: https://docs.arcade.dev/en/resources/integrations/development/posthog-api Demonstrates how to create a dataset environment in a specified Posthog project. This function requires project ID and request body details, and utilizes POSTHOG_SERVER_URL and POSTHOG_PERSONAL_API_KEY secrets. ```Python from posthog import Posthog posthog = Posthog( # Replace with your actual Posthog project ID and API key project_id="YOUR_PROJECT_ID", api_key="YOUR_API_KEY", ) # Example of creating an environment dataset response = posthog.create_environment_dataset( project_id_for_environment="YOUR_PROJECT_ID", request_body='{"name": "My New Dataset", "description": "This is a test dataset"}' ) print(response) ``` ```JavaScript const { Posthog } = require('posthog-node'); const posthog = new Posthog( // Replace with your actual Posthog project ID and API key 'YOUR_PROJECT_ID', 'YOUR_API_KEY' ); // Example of creating an environment dataset posthog.createEnvironmentDataset({ projectIdForEnvironment: 'YOUR_PROJECT_ID', requestBody: JSON.stringify({ name: 'My New Dataset', description: 'This is a test dataset' }) }).then(response => { console.log(response); }).catch(error => { console.error(error); }); ``` -------------------------------- ### GET /orgs/{org}/installations Source: https://docs.arcade.dev/en/mcp-servers/development/github-api Retrieve GitHub App installations for an organization. ```APIDOC ## GET /orgs/{org}/installations ### Description Retrieve GitHub App installations for an organization. ### Method GET ### Endpoint `/orgs/{org}/installations` ### Parameters #### Path Parameters - **org** (string) - Required - The organization's name. #### Query Parameters - **since** (integer) - Optional - The ID of the last installation seen. - **per_page** (integer) - Optional - The number of results per page. Maximum is 100. #### Request Body None ### Request Example None ### Response #### Success Response (200) - **total_count** (integer) - The total number of installations. - **installations** (array of objects) - A list of installations. - **id** (integer) - The installation ID. - **account** (object) - The account associated with the installation. - **login** (string) - The login name of the account. - **id** (integer) - The ID of the account. - **type** (string) - The type of the account (e.g., 'Organization'). - **repository_selection** (string) - Indicates if all repositories or a subset are selected. - **access_tokens_url** (string) - URL to access tokens for this installation. - **repositories_url** (string) - URL to list repositories for this installation. - **html_url** (string) - The HTML URL for the installation. - **app_id** (integer) - The ID of the GitHub App. - **app_slug** (string) - The slug of the GitHub App. - **target_id** (integer) - The ID of the target (organization or user). - **target_type** (string) - The type of the target ('Organization' or 'User'). - **created_at** (string) - The creation date of the installation. - **updated_at** (string) - The last update date of the installation. - **permissions** (object) - The permissions granted to the installation. #### Response Example ```json { "total_count": 1, "installations": [ { "id": 12345, "account": { "login": "myorg", "id": 67890, "type": "Organization" }, "repository_selection": "all", "access_tokens_url": "https://api.github.com/app/installations/12345/access_tokens", "repositories_url": "https://api.github.com/app/installations/12345/repositories", "html_url": "https://github.com/settings/installations/12345", "app_id": 11111, "app_slug": "my-app", "target_id": 67890, "target_type": "Organization", "created_at": "2023-01-01T10:00:00Z", "updated_at": "2023-10-27T10:00:00Z", "permissions": { "metadata": "read", "contents": "read" } } ] } ``` ``` -------------------------------- ### Complete Example: Gmail Integration in Python Source: https://docs.arcade.dev/en/get-started/agent-frameworks/openai-agents/use-arcade-tools A full Python example demonstrating the integration of Arcade AI tools, specifically for Gmail, with OpenAI Agents. It initializes the Arcade client, fetches tools, creates an agent, and runs a query, including error handling for authorization. ```python from agents import Agent, Runner from arcadepy import AsyncArcade from agents_arcade import get_arcade_tools from agents_arcade.errors import AuthorizationError async def main(): client = AsyncArcade() tools = await get_arcade_tools(client, toolkits=["gmail"]) google_agent = Agent( name="Google agent", instructions="You are a helpful assistant that can assist with Google API calls.", model="gpt-4o-mini", tools=tools, ) try: result = await Runner.run( starting_agent=google_agent, input="What are my latest emails?", context={"user_id": "{arcade_user_id}"}, ) print("Final output:\n\n", result.final_output) except AuthorizationError as e: print("Please Login to Google:", e) if __name__ == "__main__": import asyncio asyncio.run(main()) ``` -------------------------------- ### Get PagerDuty Escalation Policy Metrics (Python & JavaScript) Source: https://docs.arcade.dev/en/resources/integrations/development/pagerduty-api Get aggregated incident metrics by escalation policy. This function requires a 'mode' parameter and optionally accepts a stringified JSON 'request_body'. Examples are provided for Python and JavaScript. ```Python from examples.integrations.resources.integrations.pagerduty_api.get_escalation_policy_metrics_example_call_tool import main if __name__ == "__main__": main() ``` ```JavaScript import { main } from "/examples/integrations/resources/integrations/pagerduty_api/get_escalation_policy_metrics_example_call_tool.js"; main(); ``` -------------------------------- ### GET /github/organization_app_installations Source: https://docs.arcade.dev/en/mcp-servers/development/github-api Retrieve GitHub App installations for a specific organization. Supports pagination. ```APIDOC ## GET /github/organization_app_installations ### Description Retrieve GitHub App installations for an organization. ### Method GET ### Endpoint /github/organization_app_installations ### Parameters #### Query Parameters - **organization_name** (string) - Required - The name of the GitHub organization. It is not case sensitive. - **page_number_to_fetch** (integer) - Optional - Page number of the results to fetch. Used for pagination in retrieving GitHub App installations. - **results_per_page** (integer) - Optional - The number of GitHub App installations to return per page, with a maximum of 100. ### Request Example ```json { "organization_name": "your-org-name", "page_number_to_fetch": 1, "results_per_page": 50 } ``` ### Response #### Success Response (200) - **installations** (array) - A list of GitHub App installation objects. - **id** (integer) - The unique ID of the installation. - **account** (object) - Information about the account that owns the installation. - **login** (string) - The login name of the account. - **type** (string) - The type of account (e.g., 'Organization'). #### Response Example ```json { "installations": [ { "id": 123, "account": { "login": "your-org-name", "type": "Organization" } }, { "id": 456, "account": { "login": "another-org", "type": "Organization" } } ] } ``` ``` -------------------------------- ### Run the Agent using Bun Source: https://docs.arcade.dev/en/get-started/agent-frameworks/langchain/use-arcade-with-langchain Executes the main TypeScript file using the Bun runtime. This command initiates the agent, allowing it to process prompts and handle tool calls or authorization requests. ```bash bun run main.ts ``` -------------------------------- ### GET /orgs/{org}/installation Source: https://docs.arcade.dev/en/mcp-servers/development/github-api Retrieve GitHub organization's installation information. ```APIDOC ## GET /orgs/{org}/installation ### Description Retrieve GitHub organization's installation information. ### Method GET ### Endpoint `/orgs/{org}/installation` ### Parameters #### Path Parameters - **org** (string) - Required - The organization's name. #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **system_url** (string) - The URL of the GitHub Enterprise installation. - **html_url** (string) - The HTML URL of the GitHub Enterprise installation. - **slug** (string) - The slug of the GitHub Enterprise installation. - **created_at** (string) - The creation date of the installation. - **updated_at** (string) - The last update date of the installation. - **permissions** (object) - The permissions granted to the installation. #### Response Example ```json { "system_url": "https://github.example.com", "html_url": "https://github.example.com/organizations/myorg", "slug": "myorg", "created_at": "2023-01-01T10:00:00Z", "updated_at": "2023-10-27T10:00:00Z", "permissions": { "metadata": "read", "contents": "read", "issues": "write" } } ``` ``` -------------------------------- ### Get File System Shortcuts (Python, JavaScript) Source: https://docs.arcade.dev/en/mcp-servers/development/posthog-api Provides examples for retrieving a list of file system shortcuts for a given project. Supports pagination using initial result index and results per page. Requires POSTHOG_SERVER_URL and POSTHOG_PERSONAL_API_KEY secrets. ```python from posthog import Posthog posthog = Posthog(apiKey="YOUR_API_KEY") # Example of calling the tool directly to get file system shortcuts response = posthog.get_file_shortcuts(project_id="your_project_id", initial_result_index=0, results_per_page=10) print(response) ``` ```javascript const { Posthog } = require('posthog-node'); const posthog = new Posthog('YOUR_API_KEY'); // Example of calling the tool directly to get file system shortcuts posthog.getFileSystemShortcuts({ projectId: 'your_project_id', initialResultIndex: 0, resultsPerPage: 10 }).then(response => { console.log(response); }).catch(error => { console.error(error); }); ``` -------------------------------- ### Integrating Arcade Tools into CrewAI Source: https://context7_llms Guide on integrating Arcade tools into CrewAI applications, covering prerequisites, setup, and configuration. ```APIDOC ## Integrating Arcade Tools into CrewAI ### Description This documentation page provides a comprehensive guide on integrating Arcade tools into CrewAI applications, detailing the necessary prerequisites, setup, and configuration steps. Users will learn how to manage tool authorization and effectively utilize these tools within their CrewAI agent teams. ### Method POST ### Endpoint /llmstxt/arcade_dev_llms_txt/crewai/tools ### Parameters #### Request Body - **crew_config** (object) - Required - Configuration for the CrewAI setup. - **agents** (array) - Required - List of agents in the crew. - **tools** (array) - Required - List of Arcade tools to be used by the agents. - **tool_name** (string) - Required - Name of the Arcade tool. - **tool_config** (object) - Optional - Configuration for the tool. ### Request Example ```json { "crew_config": { "agents": [ { "role": "Researcher", "goal": "Find information about a topic." } ], "tools": [ { "tool_name": "WebSearchTool", "tool_config": { "api_key": "YOUR_SEARCH_API_KEY" } }, { "tool_name": "DocumentReaderTool", "tool_config": {} } ] } } ``` ### Response #### Success Response (200) - **status** (string) - Status of the CrewAI setup. - **crew_id** (string) - Unique identifier for the configured crew. ### Response Example ```json { "status": "CrewAI setup with Arcade tools completed successfully.", "crew_id": "crew-ai-789" } ``` ``` -------------------------------- ### Install and Initialize Arcade JavaScript Client Source: https://docs.arcade.dev/en/references/auth-providers/salesforce This JavaScript snippet shows how to install the Arcade JS client using npm and then import and instantiate the client. The client initialization requires the base URL of the Arcade Engine. It automatically attempts to find the ARCADE_API_KEY environment variable for authentication. ```javascript npm install @arcadeai/arcadejs ``` ```javascript import { Arcade } from "@arcadeai/arcadejs"; const client = new Arcade((baseURL = "http://localhost:9099")); // Automatically finds the `ARCADE_API_KEY` env variable ```