API Documentation

Explore Our API

Choose your preferred documentation format to explore and interact with the Python Script Runner API

Interactive
Swagger
Try endpoints live
Clean & Fast
Redoc
Three-panel layout

Swagger UI

Interactive

Full-featured interactive API documentation with built-in testing capabilities. Execute API calls directly from your browser and see responses in real-time.

Redoc

Clean

Elegant, responsive documentation with a three-panel layout optimized for reading and understanding API structures. Perfect for comprehensive API exploration.

Model Context Protocol (MCP) Endpoints

ScriptDash exposes two native MCP (Streamable HTTP) endpoints that AI assistants like ChatGPT, Claude, and Copilot can connect to. Each endpoint serves a different purpose with appropriate authentication scopes.

/mcp
script:execute

Scripts MCP

Dynamically exposes one tool per script that has expose_to_mcp=True. Each tool is named after the script (auto-generated or custom via mcp_tool_name).

  • Execute scripts via AI assistants
  • Each script gets its own named tool with custom input schema
  • OAuth scope: script:execute
  • Tools auto-refresh when scripts are saved or deleted
/mcp/admin
script:read + script:write

Admin MCP

Provides full CRUD management tools for scripts, schedules, tags, secrets, and global credentials. Use this endpoint for infrastructure management via AI assistants.

  • list_scripts, search, fetch
  • create_script, update_script, delete_script
  • run_script, list_executions, get_execution
  • Schedule, tag, secret, and credential management tools
MCP Authentication: Both endpoints use OAuth 2.0 Bearer token authentication via Authorization: Bearer <token>. Obtain tokens from the API Tokens page. The /mcp endpoint only requires script:execute scope, while /mcp/admin requires script:read and script:write.
AI Assistant Instructions: Plain-text guide for AI assistants connecting to the MCP endpoints. Read ai.txt →
How to connect AI assistants to the MCP endpoints
Claude Desktop
{
  "mcpServers": {
    "scriptdash-scripts": {
      "url": "http://scriptdash.bhm.li/mcp"
    },
    "scriptdash-admin": {
      "url": "http://scriptdash.bhm.li/mcp/admin"
    }
  }
}
Programmatic (Python)
import httpx

# List tools on the admin endpoint
resp = httpx.get(
    "http://scriptdash.bhm.li/mcp/admin",
    headers={
        "Authorization": "Bearer YOUR_TOKEN",
        "Content-Type": "application/json",
    },
)
print(resp.json())
Tip: When connecting to /mcp, AI clients will only see tools for scripts with Expose to MCP Server enabled. Use the /mcp/admin endpoint to manage your scripts.

REST API MCP Translator

In addition to native MCP, the REST API provides MCP-compatible endpoints for script discovery, tool manifests, and invocation:

GET
/api/v1/mcp/discovery Discover public scripts
GET
/api/v1/mcp/scripts List MCP tool manifests
GET
/api/v1/mcp/scripts/{id}/manifest Get tool manifest
POST
/api/v1/mcp/scripts/{id}/invoke Execute script