MCPInstall
skripthub-mcp-server logo

skripthub-mcp-server

by aShanki aShanki/skripthub-mcp-server

The SkriptHub MCP server provides a command-line interface for interacting with the SkriptHub API. It offers tools to query addons, syntax elements, supporting plugins, and tutorials, making it easy for developers to access and utilize Skript resources efficiently.

READMEmain

SkriptHub Server

This repository implements the SkriptHub MCP server. It provides a command-line server that communicates with the SkriptHub API and exposes several tools for querying addons, syntax elements, plugins, and tutorials.

Features

  • MCP Server: Implements MCP server using the @modelcontextprotocol/sdk/server.
  • Tool Handlers: Provides tools to get:
    • Skript Addons (get_addons)
    • Addon Syntax (get_addon_syntax)
    • Supporting Plugins (get_supporting_plugins)
    • Search Syntax (search_syntax)
    • Syntax Details (get_syntax)
    • Syntax Examples (get_syntax_examples)
    • Tutorials (get_tutorials)
  • API Interaction: Communicates with the SkriptHub API (base URL: https://skripthub.net/api/v1) using Axios.
  • Environment Variable: Requires the SKRIPTHUB_API_KEY to be set for authentication.

Repository Structure

  • src/: Contains the TypeScript source code (src/index.ts).
  • build/: The compiled JavaScript output.
  • test.js: A test script to verify API functionality.
  • package.json: Contains project metadata, dependencies, and scripts.
  • tsconfig.json: Configuration file for TypeScript.
  • .gitignore: Specifies files and folders to be ignored by Git (.gitignore).

Prerequisites

  • Node.js (v14+)
  • npm
  • A valid SkriptHub API token with the environment variable SKRIPTHUB_API_KEY set.

Installation

  1. Clone the repository.

  2. Run the following command to install dependencies:

    npm install
    

Build

To compile the TypeScript code, run:

npm run build

After building, the executable is located at build/index.js with execution privileges.

Running the Server

After building, start the server with:

npm start

The server will run and listen on stdio, using the Model Context Protocol.

Testing

The repository includes a simple test script to make API calls. Run the tests with:

npm run test

Environment Setup

Make sure to set the SKRIPTHUB_API_KEY environment variable before running or testing the server. For example:

export SKRIPTHUB_API_KEY=your_api_key_here

License

Refer to the project's license for more details.


For more detailed code, please refer to: