### Start Filesystem Server Source: https://context7.com/open-webui/openapi-servers/llms.txt Installs dependencies and starts the filesystem server using uvicorn. Ensure you are in the correct directory. ```bash cd servers/filesystem pip install -r requirements.txt uvicorn main:app --host 0.0.0.0 --port 8000 --reload ``` -------------------------------- ### Quickstart Filesystem Server Source: https://github.com/open-webui/openapi-servers/blob/main/servers/filesystem/README.md Commands to clone the repository, install dependencies, and launch the FastAPI server. ```bash git clone https://github.com/open-webui/openapi-servers cd openapi-servers/servers/filesystem pip install -r requirements.txt uvicorn main:app --host 0.0.0.0 --reload ``` -------------------------------- ### Start Slack Server and Post Message Source: https://context7.com/open-webui/openapi-servers/llms.txt Installs dependencies, sets environment variables for Slack integration, and starts the uvicorn server. Includes an example of posting a message to a Slack channel. ```bash cd servers/slack pip install -r requirements.txt export SLACK_BOT_TOKEN="xoxb-..." export SLACK_TEAM_ID="T01234567" export SERVER_API_KEY="your-optional-api-key" # Optional security uvicorn main:app --host 0.0.0.0 --port 8007 --reload ``` ```bash curl -X POST http://localhost:8007/slack_post_message \ -H "Content-Type: application/json" \ -d '{"channel_id": "C01234567", "text": "Hello from the API!"}' ``` -------------------------------- ### Start Memory Tool Server Source: https://github.com/open-webui/openapi-servers/blob/main/servers/memory/README.md Commands to clone the repository, install dependencies, and launch the server. ```bash git clone https://github.com/open-webui/openapi-servers cd openapi-servers/servers/memory pip install -r requirements.txt uvicorn main:app --host 0.0.0.0 --reload ``` -------------------------------- ### Start Git Server Source: https://context7.com/open-webui/openapi-servers/llms.txt Installs dependencies and starts the Git management server using uvicorn. Ensure you are in the correct directory. ```bash cd servers/git pip install -r requirements.txt uvicorn main:app --host 0.0.0.0 --port 8001 --reload ``` -------------------------------- ### Quickstart the Flashcard Server Source: https://github.com/open-webui/openapi-servers/blob/main/servers/flashcards/README.md Commands to clone the repository, install dependencies, and launch the FastAPI server. ```bash # Clone the repo git clone https://github.com/open-webui/openapi-severs cd openapi-servers/servers/flashcards # Install dependencies pip install -r requirements.txt # Run the server uvicorn main:app --host 0.0.0.0 --reload ``` -------------------------------- ### Quickstart the Google PSE Server Source: https://github.com/open-webui/openapi-servers/blob/main/servers/google-pse/README.md Commands to clone the repository, install dependencies, configure environment variables, and launch the server. ```bash git clone https://github.com/open-webui/openapi-servers cd openapi-servers/servers/google-pse # Install dependencies pip install -r requirements.txt # Set up environment variables export GOOGLE_API_KEY="your_google_api_key_here" export GOOGLE_PSE_CX="your_search_engine_id_here" # Run the server uvicorn main:app --host 0.0.0.0 --reload ``` -------------------------------- ### Quickstart Slack Tool Server Source: https://github.com/open-webui/openapi-servers/blob/main/servers/slack/README.md Commands to clone the repository, install dependencies, configure environment variables, and launch the FastAPI server. ```bash git clone https://github.com/open-webui/openapi-servers cd openapi-servers/servers/slack # Install dependencies pip install -r requirements.txt # Set up environment variables export SLACK_BOT_TOKEN="xoxb-your-bot-token" # Required: Your Slack bot token export SLACK_TEAM_ID="your-team-id" # Required: Your Slack team ID export SLACK_CHANNEL_IDS="C1,C2" # Optional: Comma-separated channel IDs to restrict access to export SERVER_API_KEY="your-secret-key" # Optional: If set, requires 'X-API-Key' header for requests # Run the server uvicorn main:app --host 0.0.0.0 --reload ``` -------------------------------- ### Start Google PSE Server Source: https://context7.com/open-webui/openapi-servers/llms.txt Installs dependencies, sets Google API keys, and starts the uvicorn server for the Google Programmable Search Engine API. ```bash cd servers/google-pse pip install -r requirements.txt export GOOGLE_API_KEY="your-google-api-key" export GOOGLE_PSE_CX="your-search-engine-id" uvicorn main:app --host 0.0.0.0 --port 8008 --reload ``` -------------------------------- ### Start User Info Proxy Server Source: https://context7.com/open-webui/openapi-servers/llms.txt Installs dependencies and starts the uvicorn server for the User Info Proxy, which requires the base URL of the authentication server. ```bash cd servers/get-user-info pip install -r requirements.txt export OPEN_WEBUI_BASE_URL="http://your-auth-server:8080" uvicorn main:app --host 0.0.0.0 --port 8009 --reload ``` -------------------------------- ### Quickstart Bitcoin Price Predictor Server Source: https://github.com/open-webui/openapi-servers/blob/main/servers/bitcoin-price-predictor/README.md Commands to clone the repository, install dependencies, and launch the FastAPI server. ```bash git clone https://github.com/open-webui/openapi-servers cd openapi-servers/servers/bitcoin-price-predictor # Download btcusd_1-min_data.csv and place it here pip install -r requirements.txt uvicorn main:app --host 0.0.0.0 --reload ``` -------------------------------- ### Install and Run Time Tool Server Source: https://github.com/open-webui/openapi-servers/blob/main/servers/time/README.md Clone the repository, navigate to the time server directory, install dependencies, and run the server using uvicorn. ```bash git clone https://github.com/open-webui/openapi-servers cd openapi-servers/servers/time pip install -r requirements.txt uvicorn main:app --host 0.0.0.0 --reload ``` -------------------------------- ### Start MCP Proxy Server Source: https://context7.com/open-webui/openapi-servers/llms.txt Installs dependencies and starts the MCP Proxy server, which dynamically converts MCP servers into OpenAPI-compatible APIs. Requires specifying the host, port, and the MCP server command. ```bash cd servers/mcp-proxy pip install -r requirements.txt python main.py --host 0.0.0.0 --port 8010 -- uvx mcp-server-time --local-timezone=America/New_York ``` -------------------------------- ### Launch Git Tool Server Source: https://github.com/open-webui/openapi-servers/blob/main/servers/git/README.md Commands to clone the repository, install required dependencies, and start the FastAPI server. ```bash git clone https://github.com/open-webui/openapi-servers cd openapi-servers/servers/git pip install -r requirements.txt uvicorn main:app --host 0.0.0.0 --reload ``` -------------------------------- ### Install Dependencies and Run Server Source: https://github.com/open-webui/openapi-servers/blob/main/servers/weather/README.md Clone the repository, navigate to the weather server directory, install dependencies using pip, and run the server with uvicorn. Ensure you are in the correct directory after cloning. ```bash git clone https://github.com/open-webui/openapi-servers cd openapi-servers/servers/weather # Install dependencies pip install -r requirements.txt # Run the server uvicorn main:app --host 0.0.0.0 --reload ``` -------------------------------- ### Install Dependencies and Run Filesystem Server Source: https://github.com/open-webui/openapi-servers/blob/main/README.md Installs dependencies for the filesystem server and runs it using uvicorn. Ensure you are in the 'servers/filesystem' directory before running. ```bash git clone https://github.com/open-webui/openapi-servers cd openapi-servers # Example: Installing dependencies for a specific server 'filesystem' cd servers/filesystem pip install -r requirements.txt uvicorn main:app --host 0.0.0.0 --reload ``` -------------------------------- ### Install Dependencies Source: https://github.com/open-webui/openapi-servers/blob/main/servers/mcp-proxy/README.md Installs the necessary Python dependencies from the requirements.txt file. ```bash pip install -r requirements.txt ``` -------------------------------- ### GET / Source: https://github.com/open-webui/openapi-servers/blob/main/servers/flashcards/README.md Home page with instructions. ```APIDOC ## GET / ### Description Provides instructions on how to use the API. ### Method GET ### Endpoint / ### Parameters None ### Request Example None ### Response #### Success Response (200) - HTML content with instructions #### Response Example (HTML content) ``` -------------------------------- ### Run with Docker Compose Source: https://github.com/open-webui/openapi-servers/blob/main/servers/google-pse/README.md Commands to set environment variables and start the service using Docker Compose. ```bash # Set environment variables in your shell or .env file export GOOGLE_API_KEY="your_api_key" export GOOGLE_PSE_CX="your_search_engine_id" # Start the service docker-compose up --build ``` -------------------------------- ### Run Filesystem Server with Docker Compose Source: https://github.com/open-webui/openapi-servers/blob/main/README.md Starts the filesystem server using Docker Compose. Navigate to the 'servers/filesystem' directory first. ```bash cd servers/filesystem docker compose up ``` -------------------------------- ### Manage Time Utilities Server Source: https://context7.com/open-webui/openapi-servers/llms.txt Commands to start the time server and perform various time-related operations like conversion, formatting, and elapsed time calculation. ```bash # Start the time server cd servers/time pip install -r requirements.txt uvicorn main:app --host 0.0.0.0 --port 8006 --reload # Get current UTC time curl http://localhost:8006/get_current_utc_time # Response: {"utc": "2024-01-15T14:30:00+00:00"} # Get current local time curl http://localhost:8006/get_current_local_time # Response: {"local_time": "2024-01-15T09:30:00"} # Format time for a specific timezone curl -X POST http://localhost:8006/format_time \ -H "Content-Type: application/json" \ -d '{"format": "%Y-%m-%d %H:%M:%S", "timezone": "America/New_York"}' # Response: {"formatted_time": "2024-01-15 09:30:00"} # Convert between timezones curl -X POST http://localhost:8006/convert_time \ -H "Content-Type: application/json" \ -d '{ "timestamp": "2024-01-15T14:00:00Z", "from_tz": "UTC", "to_tz": "Asia/Tokyo" }' # Response: {"converted_time": "2024-01-15T23:00:00+09:00"} # Calculate elapsed time between timestamps curl -X POST http://localhost:8006/elapsed_time \ -H "Content-Type: application/json" \ -d '{ "start": "2024-01-01T00:00:00Z", "end": "2024-01-15T12:30:00Z", "units": "hours" }' # Response: {"elapsed": 348.5, "unit": "hours"} # Parse flexible timestamp formats curl -X POST http://localhost:8006/parse_timestamp \ -H "Content-Type: application/json" \ -d '{"timestamp": "Jan 15, 2024 2:30 PM", "timezone": "America/Los_Angeles"}' # Response: {"utc": "2024-01-15T22:30:00+00:00"} # List all valid timezones curl http://localhost:8006/list_time_zones ``` -------------------------------- ### Manage RAG Retriever Server Source: https://context7.com/open-webui/openapi-servers/llms.txt Commands to start the RAG server and perform document retrieval queries against a FAISS vector store. ```bash # Start the RAG retriever server cd servers/external-rag pip install -r requirements.txt uvicorn main:app --host 0.0.0.0 --port 8005 --reload # Retrieve relevant documents for queries curl -X POST http://localhost:8005/retrieve \ -H "Content-Type: application/json" \ -d '{ "queries": ["How do I configure authentication?", "What are the rate limits?"], "k": 3 }' # Response: # { # "responses": [ # { # "query": "How do I configure authentication?", # "results": [ # "Authentication can be configured via environment variables...", # "For OAuth setup, you'll need to register your application...", # "API keys can be generated in the dashboard..." # ] # }, # { # "query": "What are the rate limits?", # "results": [ # "Rate limits are set at 100 requests per minute...", # ... # ] # } # ] # } ``` -------------------------------- ### Run OpenAPI Proxy Server Source: https://github.com/open-webui/openapi-servers/blob/main/servers/mcp-proxy/README.md Starts the Python server to expose MCP tool servers as an OpenAPI-compatible API. Specify host, port, and the MCP server to use. ```bash python main.py --host 0.0.0.0 --port 8000 -- uvx mcp-server-time --local-timezone=America/New_York ``` -------------------------------- ### Google PSE API Search Examples Source: https://context7.com/open-webui/openapi-servers/llms.txt Demonstrates various ways to query the Google Programmable Search Engine API, including basic search, filtered searches by number of results, date, language, site, file type, and excluding terms. ```bash curl "http://localhost:8008/search?q=OpenAPI+specification" ``` ```bash curl "http://localhost:8008/search?q=FastAPI+tutorial&num=5&dateRestrict=m1&lr=lang_en" ``` ```bash curl "http://localhost:8008/search?q=authentication&siteSearch=github.com&siteSearchFilter=i" ``` ```bash curl "http://localhost:8008/search?q=machine+learning&fileType=pdf" ``` ```bash curl "http://localhost:8008/search?q=python+web+framework&excludeTerms=django" ``` -------------------------------- ### Perform API Searches via cURL Source: https://github.com/open-webui/openapi-servers/blob/main/servers/google-pse/README.md Examples of using cURL to perform basic, advanced, and site-specific searches against the running API. ```bash # Basic search curl "http://localhost:8000/search?q=OpenAI+GPT" # Advanced search with filters curl "http://localhost:8000/search?q=machine+learning&num=5&lr=lang_en&dateRestrict=m1" # Site-specific search curl "http://localhost:8000/search?q=python+tutorial&siteSearch=github.com&siteSearchFilter=i" ``` -------------------------------- ### Run Multiple Servers with Docker Compose Source: https://context7.com/open-webui/openapi-servers/llms.txt Navigates to the project directory and starts all defined services using Docker Compose. This is suitable for running multiple OpenAPI servers simultaneously. ```bash cd /path/to/openapi-servers docker compose up ``` -------------------------------- ### GET /search Source: https://github.com/open-webui/openapi-servers/blob/main/servers/google-pse/README.md Performs a web search using the Google Programmable Search Engine. ```APIDOC ## GET /search ### Description Perform a web search with comprehensive parameters. ### Method GET ### Endpoint /search ### Parameters #### Query Parameters - **q** (string) - Required - Search query string - **num** (integer) - Optional - Number of results (1-10, default: 10) - **start** (integer) - Optional - Starting index for results (default: 1) - **safe** (string) - Optional - Safe search level ('active' or 'off') - **lr** (string) - Optional - Language restriction (e.g., 'lang_en') - **cr** (string) - Optional - Country restriction (e.g., 'countryUS') - **dateRestrict** (string) - Optional - Date restriction ('d1', 'w1', 'm1', 'y1') - **exactTerms** (string) - Optional - Phrase that must appear in all results - **excludeTerms** (string) - Optional - Terms to exclude from results - **fileType** (string) - Optional - File type filter ('pdf', 'doc', etc.) - **siteSearch** (string) - Optional - Specific site to search - **siteSearchFilter** (string) - Optional - Include ('i') or exclude ('e') site ``` -------------------------------- ### Interact with MCP Proxy Source: https://context7.com/open-webui/openapi-servers/llms.txt Example of interacting with an MCP server proxied by the MCP Proxy. This assumes the MCP server exposes a 'get_current_time' tool. The proxy serves documentation at /docs. ```bash curl -X POST http://localhost:8010/get_current_time \ -H "Content-Type: application/json" \ -d '{"timezone": "UTC"}' ``` -------------------------------- ### Get Metadata with Filesystem API Source: https://context7.com/open-webui/openapi-servers/llms.txt Retrieves metadata for a specified file or directory, including type, size, and modification time. The path must be within the allowed directories. ```bash curl -X POST http://localhost:8000/get_metadata \ -H "Content-Type: application/json" \ -d '{"path": "/allowed/path/myfile.txt"}' ``` -------------------------------- ### Extract Tokens with Curl Source: https://github.com/open-webui/openapi-servers/blob/main/servers/get-oauth-tokens/README.md Example using `curl` to send a request with cookies to the `/tokens` endpoint. The cookies `oauth_id_token` and `oauth_access_token` should be set by the client's SSO configuration. ```bash curl --cookie "oauth_id_token=xxx; oauth_access_token=yyy" http://localhost:8000/tokens ``` -------------------------------- ### GET /search Source: https://context7.com/open-webui/openapi-servers/llms.txt Performs a web search using Google's Custom Search JSON API. ```APIDOC ## GET /search ### Description Performs a web search based on the provided query and optional filters. ### Method GET ### Endpoint /search ### Parameters #### Query Parameters - **q** (string) - Required - The search query. - **num** (integer) - Optional - Number of results to return. - **dateRestrict** (string) - Optional - Restrict results by date. - **lr** (string) - Optional - Language restriction. - **siteSearch** (string) - Optional - Restrict search to a specific site. - **siteSearchFilter** (string) - Optional - Filter type for site search. - **fileType** (string) - Optional - Restrict to specific file types. - **excludeTerms** (string) - Optional - Terms to exclude from results. ### Response #### Success Response (200) - **searchInformation** (object) - Metadata about the search. - **items** (array) - List of search results. #### Response Example { "searchInformation": {"totalResults": "12500000", "searchTime": 0.45}, "items": [ {"title": "OpenAPI Specification", "link": "https://...", "snippet": "..."} ] } ``` -------------------------------- ### GET /tokens Source: https://github.com/open-webui/openapi-servers/blob/main/servers/get-oauth-tokens/README.md Reads cookies and returns the extracted OAuth ID token and OAuth Access token. ```APIDOC ## GET /tokens ### Description Reads cookies and returns the extracted OAuth ID token and OAuth Access token. ### Method GET ### Endpoint /tokens ### Parameters #### Query Parameters None #### Request Body None ### Response #### Success Response (200) - **oauth_id_token** (string or null) - The extracted OAuth ID token. - **oauth_access_token** (string or null) - The extracted OAuth Access token. #### Response Example ```json { "oauth_id_token": "string or null", "oauth_access_token": "string or null" } ``` ``` -------------------------------- ### GET /health Source: https://github.com/open-webui/openapi-servers/blob/main/servers/google-pse/README.md Health check endpoint to verify service status. ```APIDOC ## GET /health ### Description Health check endpoint to verify service status. ### Method GET ### Endpoint /health ``` -------------------------------- ### GET /get_session_user_info Source: https://context7.com/open-webui/openapi-servers/llms.txt Retrieves session user information from the authentication server. ```APIDOC ## GET /get_session_user_info ### Description Fetches user details for the current session using a Bearer token. ### Method GET ### Endpoint /get_session_user_info ### Response #### Success Response (200) - **id** (string) - User UUID. - **role** (string) - User role. - **name** (string) - User display name. - **email** (string) - User email address. #### Response Example { "id": "user-uuid-here", "role": "admin", "name": "John Doe", "email": "john@example.com" } ``` -------------------------------- ### Get Weather Forecast via cURL Source: https://context7.com/open-webui/openapi-servers/llms.txt Retrieve weather data for a specific location using latitude and longitude coordinates. ```bash curl "http://localhost:8003/forecast?latitude=40.7128&longitude=-74.0060" ``` -------------------------------- ### Get Recursive Directory Tree with Filesystem API Source: https://context7.com/open-webui/openapi-servers/llms.txt Retrieves a recursive tree structure of a directory. The path must be within the allowed directories. ```bash curl -X POST http://localhost:8000/directory_tree \ -H "Content-Type: application/json" \ -d '{"path": "/allowed/path"}' ``` -------------------------------- ### Get Session User Information Source: https://context7.com/open-webui/openapi-servers/llms.txt Fetches the current session user's information using a Bearer token. Ensure the User Info Proxy server is running and configured correctly. ```bash curl http://localhost:8009/get_session_user_info \ -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." ``` -------------------------------- ### Build and Run Filesystem Server with Docker Source: https://context7.com/open-webui/openapi-servers/llms.txt Builds a Docker image for the filesystem server and runs it, mapping a local directory to the container's data volume. Ensure the host path exists and is accessible. ```bash docker build -t filesystem-server . docker run -p 8000:8000 -v /allowed/path:/data filesystem-server ``` -------------------------------- ### Slack Server API Endpoints Source: https://context7.com/open-webui/openapi-servers/llms.txt Demonstrates various API calls to the Slack server for managing channels, messages, reactions, and user information. Requires setting up the Slack server first. ```bash curl -X POST http://localhost:8007/slack_list_channels \ -H "Content-Type: application/json" \ -H "X-API-Key: your-optional-api-key" \ -d '{"limit": 50}' ``` ```bash curl -X POST http://localhost:8007/slack_reply_to_thread \ -H "Content-Type: application/json" \ -d '{ "channel_id": "C01234567", "thread_ts": "1234567890.123456", "text": "This is a threaded reply" }' ``` ```bash curl -X POST http://localhost:8007/slack_add_reaction \ -H "Content-Type: application/json" \ -d '{ "channel_id": "C01234567", "timestamp": "1234567890.123456", "reaction": "thumbsup" }' ``` ```bash curl -X POST http://localhost:8007/slack_get_channel_history \ -H "Content-Type: application/json" \ -d '{"channel_id": "C01234567", "limit": 20}' ``` ```bash curl -X POST http://localhost:8007/slack_get_thread_replies \ -H "Content-Type: application/json" \ -d '{"channel_id": "C01234567", "thread_ts": "1234567890.123456"}' ``` ```bash curl -X POST http://localhost:8007/slack_get_users \ -H "Content-Type: application/json" \ -d '{"limit": 100}' ``` ```bash curl -X POST http://localhost:8007/slack_get_user_profile \ -H "Content-Type: application/json" \ -d '{"user_id": "U01234567"}' ``` -------------------------------- ### GET /get_session_user_info Source: https://github.com/open-webui/openapi-servers/blob/main/servers/get-user-info/README.md Retrieves authenticated user details by forwarding an existing Bearer token to the internal authentication server. ```APIDOC ## GET /get_session_user_info ### Description Forward your existing Bearer token and get authenticated user details. ### Method GET ### Endpoint /get_session_user_info ### Headers - **Authorization** (string) - Required - Bearer YOUR_TOKEN ### Response #### Success Response (200) - **id** (string) - The unique identifier of the user. - **email** (string) - The email address of the user. - **name** (string) - The full name of the user. ### Response Example ```json { "id": "user-id", "email": "user@example.com", "name": "Jane Doe" } ``` ``` -------------------------------- ### Configure Auth Backend URL Source: https://github.com/open-webui/openapi-servers/blob/main/servers/get-user-info/README.md Set the base URL for the internal authentication server using an environment variable. ```bash export OPEN_WEBUI_BASE_URL=http://your-open-webui.com ``` -------------------------------- ### List Allowed Directories with Filesystem API Source: https://context7.com/open-webui/openapi-servers/llms.txt Lists all directories that are permitted for access by the filesystem server. ```bash curl http://localhost:8000/list_allowed_directories ``` -------------------------------- ### Get Repository Status with Git API Source: https://context7.com/open-webui/openapi-servers/llms.txt Retrieves the current status of a Git repository, including branch information and uncommitted changes. ```bash curl -X POST http://localhost:8001/status \ -H "Content-Type: application/json" \ -d '{"repo_path": "/path/to/repo"}' ``` -------------------------------- ### Run FastAPI Service Source: https://github.com/open-webui/openapi-servers/blob/main/servers/get-oauth-tokens/README.md Use `uvicorn` to run the FastAPI application. Ensure the host is set to `0.0.0.0` for external access and `--reload` is used for development. ```bash uvicorn main:app --host 0.0.0.0 --reload ``` -------------------------------- ### Manage SQL Chat Server Source: https://context7.com/open-webui/openapi-servers/llms.txt Commands to initialize and interact with the SQL Chat server for natural language database queries. ```bash # Start the SQL chat server cd servers/sql pip install -r requirements.txt export DATABASE_URL="postgresql://user:password@localhost/mydb" export OPENAI_API_KEY="sk-..." uvicorn main:app --host 0.0.0.0 --port 8004 --reload # Get database schema overview curl http://localhost:8004/schema # Response: Table descriptions, columns, and relationships # Chat with your database using natural language curl -X POST http://localhost:8004/chat_sql \ -H "Content-Type: application/json" \ -d '{"query": "Show me the top 10 customers by total order value"}' # Response: # { # "sql": "SELECT customer_name, SUM(order_total) as total FROM orders GROUP BY customer_name ORDER BY total DESC LIMIT 10", # "answer": "The top 10 customers by order value are: 1. Acme Corp ($125,000)...", # "raw_result": [["Acme Corp", 125000], ...] # } # More natural language queries curl -X POST http://localhost:8004/chat_sql \ -H "Content-Type: application/json" \ -d '{"query": "How many orders were placed last month?"}' curl -X POST http://localhost:8004/chat_sql \ -H "Content-Type: application/json" \ -d '{"query": "What products have low inventory (less than 10 units)?"}' ``` -------------------------------- ### Delete Path with Filesystem API (Confirmation) Source: https://context7.com/open-webui/openapi-servers/llms.txt Initiates the deletion of a file or directory. Requires a confirmation token for the first step. ```bash curl -X POST http://localhost:8000/delete_path \ -H "Content-Type: application/json" \ -d '{"path": "/allowed/path/oldfile.txt"}' ``` -------------------------------- ### Run Python-based MCP proxy server Source: https://github.com/open-webui/openapi-servers/blob/main/README.md Use the provided proxy server to bridge an MCP server to an OpenAPI-compatible API. ```bash cd servers/mcp-proxy pip install -r requirements.txt python main.py --host 0.0.0.0 --port 8000 -- uvx mcp-server-time --local-timezone=America/New_York ``` -------------------------------- ### List Directory Contents with Filesystem API Source: https://context7.com/open-webui/openapi-servers/llms.txt Lists the contents of a specified directory, including file names and types. The path must be within the allowed directories. ```bash curl -X POST http://localhost:8000/list_directory \ -H "Content-Type: application/json" \ -d '{"path": "/allowed/path/mydir"}' ``` -------------------------------- ### POST /display Source: https://github.com/open-webui/openapi-servers/blob/main/servers/flashcards/README.md Displays interactive flashcards in the browser. ```APIDOC ## POST /display ### Description Send a POST request to this endpoint with a JSON payload containing flashcard data. The server will return an interactive HTML page for displaying the flashcards. ### Method POST ### Endpoint /display ### Parameters None ### Request Body - **title** (string) - Required - The title of the flashcard set. - **description** (string) - Required - A brief description of the flashcards. - **cards** (array) - Required - An array of card objects. - **front** (string) - Required - The content of the front of the card. - **back** (string) - Required - The content of the back of the card. ### Request Example ```json { "title": "My Flashcards", "description": "Practice questions", "cards": [ { "front": "What is 2 + 2?", "back": "4" }, { "front": "Capital of France?", "back": "Paris" } ] } ``` ### Response #### Success Response (200) - **HTML** (string) - An interactive HTML page displaying the flashcards. #### Response Example (HTML content) ``` -------------------------------- ### Write File with Filesystem API Source: https://context7.com/open-webui/openapi-servers/llms.txt Writes content to a specified file. If the file exists, it will be overwritten. The path must be within the allowed directories. ```bash curl -X POST http://localhost:8000/write_file \ -H "Content-Type: application/json" \ -d '{"path": "/allowed/path/newfile.txt", "content": "Hello World"}' ``` -------------------------------- ### Read File with Filesystem API Source: https://context7.com/open-webui/openapi-servers/llms.txt Reads the content of a specified file. The path must be within the allowed directories configured for the server. ```bash curl -X POST http://localhost:8000/read_file \ -H "Content-Type: application/json" \ -d '{"path": "/allowed/path/myfile.txt"}' ``` -------------------------------- ### Git Repository Operations via API Source: https://context7.com/open-webui/openapi-servers/llms.txt Perform standard Git operations like staging, committing, branching, and logging using the local repository server. ```bash curl -X POST http://localhost:8001/diff \ -H "Content-Type: application/json" \ -d '{"repo_path": "/path/to/repo", "target": "feature-branch"}' ``` ```bash curl -X POST http://localhost:8001/add \ -H "Content-Type: application/json" \ -d '{"repo_path": "/path/to/repo", "files": ["src/main.py", "README.md"]}' ``` ```bash curl -X POST http://localhost:8001/commit \ -H "Content-Type: application/json" \ -d '{"repo_path": "/path/to/repo", "message": "Add new feature"}' ``` ```bash curl -X POST http://localhost:8001/reset \ -H "Content-Type: application/json" \ -d '{"repo_path": "/path/to/repo"}' ``` ```bash curl -X POST http://localhost:8001/log \ -H "Content-Type: application/json" \ -d '{"repo_path": "/path/to/repo", "max_count": 5}' ``` ```bash curl -X POST http://localhost:8001/create_branch \ -H "Content-Type: application/json" \ -d '{"repo_path": "/path/to/repo", "branch_name": "feature/new-api", "base_branch": "main"}' ``` ```bash curl -X POST http://localhost:8001/checkout \ -H "Content-Type: application/json" \ -d '{"repo_path": "/path/to/repo", "branch_name": "feature/new-api"}' ``` ```bash curl -X POST http://localhost:8001/show \ -H "Content-Type: application/json" \ -d '{"repo_path": "/path/to/repo", "revision": "HEAD~1"}' ``` ```bash curl -X POST http://localhost:8001/init \ -H "Content-Type: application/json" \ -d '{"repo_path": "/path/to/new-repo"}' ``` -------------------------------- ### Expose MCP tools as OpenAPI APIs Source: https://github.com/open-webui/openapi-servers/blob/main/README.md Use mcpo to expose an MCP server as an OpenAPI-compatible API. ```bash uvx mcpo --port 8000 -- uvx mcp-server-time --local-timezone=America/New_York ``` -------------------------------- ### View Unstaged Changes with Git API Source: https://context7.com/open-webui/openapi-servers/llms.txt Shows the differences between the working directory and the staging area (index) for a Git repository. ```bash curl -X POST http://localhost:8001/diff_unstaged \ -H "Content-Type: application/json" \ -d '{"repo_path": "/path/to/repo"}' ``` -------------------------------- ### POST /summarize/text Source: https://github.com/open-webui/openapi-servers/blob/main/servers/summarizer-tool/README.md Summarizes a given block of text using the configured LLM via Ollama. ```APIDOC ## POST /summarize/text ### Description Summarizes the given block of text. ### Method POST ### Endpoint /summarize/text ### Request Body - **text** (string) - Required - The blob of text to be summarized. It is recommended to keep the text within the context window of the LLM. ### Request Example ```json { "text": "Your blob of text here. It can be unlimited, but is recommended to be within the context window of the LLM you are asking for a summary from." } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of the operation. - **summary** (string) - The summarized text. #### Response Example ```json { "status": "success", "summary": "A summary of your text." } ``` ``` -------------------------------- ### POST /status Source: https://context7.com/open-webui/openapi-servers/llms.txt Retrieves the status of a Git repository. ```APIDOC ## POST /status ### Description Checks the status of a Git repository at the given path. ### Method POST ### Endpoint /status ### Request Body - **repo_path** (string) - Required - The path to the Git repository. ### Response #### Success Response (200) - **result** (string) - The status output of the repository. ``` -------------------------------- ### POST /write_file Source: https://context7.com/open-webui/openapi-servers/llms.txt Writes content to a specified file path. ```APIDOC ## POST /write_file ### Description Writes the provided content to the specified file path. ### Method POST ### Endpoint /write_file ### Request Body - **path** (string) - Required - The destination file path. - **content** (string) - Required - The content to write to the file. ### Response #### Success Response (200) - **message** (string) - Confirmation message. ``` -------------------------------- ### Search Files by Pattern with Filesystem API Source: https://context7.com/open-webui/openapi-servers/llms.txt Searches for files within a directory based on a name pattern. Exclusions can be specified using `excludePatterns`. ```bash curl -X POST http://localhost:8000/search_files \ -H "Content-Type: application/json" \ -d '{"path": "/allowed/path", "pattern": ".py", "excludePatterns": ["__pycache__"]}' ``` -------------------------------- ### Knowledge Graph Memory Server Management Source: https://context7.com/open-webui/openapi-servers/llms.txt Manage persistent memory entities, relations, and observations. Requires the memory server to be running on port 8002. ```bash cd servers/memory pip install -r requirements.txt uvicorn main:app --host 0.0.0.0 --port 8002 --reload ``` ```bash curl -X POST http://localhost:8002/create_entities \ -H "Content-Type: application/json" \ -d '{ "entities": [ {"name": "john", "entityType": "person", "observations": ["works at Acme Corp", "likes Python"]}, {"name": "acme_corp", "entityType": "company", "observations": ["founded in 2010", "tech company"]} ] }' ``` ```bash curl -X POST http://localhost:8002/create_relations \ -H "Content-Type: application/json" \ -d '{ "relations": [ {"from": "john", "to": "acme_corp", "relationType": "works_at"} ] }' ``` ```bash curl -X POST http://localhost:8002/add_observations \ -H "Content-Type: application/json" \ -d '{ "observations": [ {"entityName": "john", "contents": ["promoted to senior engineer", "started remote work"]} ] }' ``` ```bash curl http://localhost:8002/read_graph ``` ```bash curl -X POST http://localhost:8002/search_nodes \ -H "Content-Type: application/json" \ -d '{"query": "Python"}' ``` ```bash curl -X POST http://localhost:8002/open_nodes \ -H "Content-Type: application/json" \ -d '{"names": ["john", "acme_corp"]}' ``` ```bash curl -X POST http://localhost:8002/delete_observations \ -H "Content-Type: application/json" \ -d '{ "deletions": [ {"entityName": "john", "observations": ["likes Python"]} ] }' ``` ```bash curl -X POST http://localhost:8002/delete_entities \ -H "Content-Type: application/json" \ -d '{"entityNames": ["john"]}' ``` ```bash curl -X POST http://localhost:8002/delete_relations \ -H "Content-Type: application/json" \ -d '{ "relations": [ {"from": "john", "to": "acme_corp", "relationType": "works_at"} ] }' ``` -------------------------------- ### POST /slack_list_channels Source: https://context7.com/open-webui/openapi-servers/llms.txt Retrieves a list of Slack channels from the workspace. ```APIDOC ## POST /slack_list_channels ### Description Retrieves a list of channels from the Slack workspace. ### Method POST ### Endpoint /slack_list_channels ### Parameters #### Request Body - **limit** (integer) - Optional - The maximum number of channels to return. ### Request Example { "limit": 50 } ### Response #### Success Response (200) - **content** (object) - The response object containing channel data. #### Response Example { "content": {"ok": true, "channels": [{"id": "C01234", "name": "general"}]} } ``` -------------------------------- ### View Staged Changes with Git API Source: https://context7.com/open-webui/openapi-servers/llms.txt Shows the differences between the staging area (index) and the last commit for a Git repository. ```bash curl -X POST http://localhost:8001/diff_staged \ -H "Content-Type: application/json" \ -d '{"repo_path": "/path/to/repo"}' ``` -------------------------------- ### Retrieve User Info via cURL Source: https://github.com/open-webui/openapi-servers/blob/main/servers/get-user-info/README.md Request user details by passing a Bearer token in the Authorization header. ```bash curl -H "Authorization: Bearer " http://localhost:8000/get_user_info ``` -------------------------------- ### Confirm Deletion with Filesystem API Source: https://context7.com/open-webui/openapi-servers/llms.txt Confirms the deletion of a file or directory using the token obtained from the initial delete request. ```bash curl -X POST http://localhost:8000/delete_path \ -H "Content-Type: application/json" \ -d '{"path": "/allowed/path/oldfile.txt", "confirmation_token": "abc12"}' ``` -------------------------------- ### POST /summarize/chat Source: https://github.com/open-webui/openapi-servers/blob/main/servers/summarizer-tool/README.md Endpoint for summarizing an exported Open WebUI chat JSON blob. This endpoint is not yet implemented. ```APIDOC ## POST /summarize/chat ### Description Not yet implemented. Summarizes an exported Open WebUI chat JSON blob. ### Method POST ### Endpoint /summarize/chat ``` -------------------------------- ### POST /read_file Source: https://context7.com/open-webui/openapi-servers/llms.txt Reads the contents of a file from an allowed directory. ```APIDOC ## POST /read_file ### Description Reads the contents of a specified file. ### Method POST ### Endpoint /read_file ### Request Body - **path** (string) - Required - The path to the file to read. ### Response #### Success Response (200) - **content** (string) - The contents of the file. ``` -------------------------------- ### Move/Rename Path with Filesystem API Source: https://context7.com/open-webui/openapi-servers/llms.txt Moves or renames a file or directory from a source path to a destination path. Both paths must be within the allowed directories. ```bash curl -X POST http://localhost:8000/move_path \ -H "Content-Type: application/json" \ -d '{"source_path": "/allowed/path/old.txt", "destination_path": "/allowed/path/new.txt"}' ``` -------------------------------- ### Edit File with Filesystem API Source: https://context7.com/open-webui/openapi-servers/llms.txt Edits a file by performing find and replace operations. The `dryRun` option allows previewing changes without modifying the file. ```bash curl -X POST http://localhost:8000/edit_file \ -H "Content-Type: application/json" \ -d '{ "path": "/allowed/path/config.json", "edits": [ {"oldText": "\"debug\": false", "newText": "\"debug\": true"} ], "dryRun": true }' ``` -------------------------------- ### Time Utilities API Source: https://context7.com/open-webui/openapi-servers/llms.txt The Time API provides secure UTC/local time retrieval, formatting, timezone conversion, elapsed time calculation, and timestamp parsing. ```APIDOC ## Time Utilities API ### Description The Time API provides secure UTC/local time retrieval, formatting, timezone conversion, elapsed time calculation, and timestamp parsing. ### Method GET ### Endpoint /get_current_utc_time ### Description Get current UTC time. ### Response #### Success Response (200) - **utc** (string) - The current time in UTC format. ### Method GET ### Endpoint /get_current_local_time ### Description Get current local time. ### Response #### Success Response (200) - **local_time** (string) - The current local time. ### Method POST ### Endpoint /format_time ### Description Format time for a specific timezone. #### Request Body - **format** (string) - Required - The desired time format string (e.g., "%Y-%m-%d %H:%M:%S"). - **timezone** (string) - Required - The target timezone (e.g., "America/New_York"). ### Response #### Success Response (200) - **formatted_time** (string) - The time formatted according to the specified format and timezone. ### Method POST ### Endpoint /convert_time ### Description Convert between timezones. #### Request Body - **timestamp** (string) - Required - The timestamp to convert (e.g., "2024-01-15T14:00:00Z"). - **from_tz** (string) - Required - The source timezone (e.g., "UTC"). - **to_tz** (string) - Required - The target timezone (e.g., "Asia/Tokyo"). ### Response #### Success Response (200) - **converted_time** (string) - The converted timestamp in the target timezone. ### Method POST ### Endpoint /elapsed_time ### Description Calculate elapsed time between timestamps. #### Request Body - **start** (string) - Required - The start timestamp. - **end** (string) - Required - The end timestamp. - **units** (string) - Required - The desired units for the elapsed time (e.g., "hours", "minutes"). ### Response #### Success Response (200) - **elapsed** (number) - The calculated elapsed time. - **unit** (string) - The unit of the elapsed time. ### Method POST ### Endpoint /parse_timestamp ### Description Parse flexible timestamp formats. #### Request Body - **timestamp** (string) - Required - The timestamp string to parse (e.g., "Jan 15, 2024 2:30 PM"). - **timezone** (string) - Optional - The timezone to assume if not specified in the timestamp. ### Response #### Success Response (200) - **utc** (string) - The parsed timestamp in UTC format. ### Method GET ### Endpoint /list_time_zones ### Description List all valid timezones supported by the API. ``` -------------------------------- ### Display Flashcards via POST Request Source: https://github.com/open-webui/openapi-servers/blob/main/servers/flashcards/README.md JSON payload structure required for the /display endpoint to render interactive cards. ```json { "title": "My Flashcards", "description": "Practice questions", "cards": [ { "front": "What is 2 + 2?", "back": "4" }, { "front": "Capital of France?", "back": "Paris" } ] } ```