Spiral Writer

by jxnl

17 stars
Not rated
GitHub

About

Provides a FastMCP-powered interface for generating text, processing file content, and extracting article data from URLs with asynchronous operations and robust error handling for content generation workflows.

Details

Author
jxnl
Repository
jxnl/spiral-mcp
GitHub stars
17
Categories
Productivity, Developer Tools, Design, Workplace, File Management, AI, Knowledge Base, Infrastructure, Frontend

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Spiral Writer
    Command (node, npx, python, etc.) npx
    Arguments
    • Argument 1 -y
    • Argument 2 @highlight/mcp-server

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

1. Create and activate a virtual environment:

python3 -m venv venv
source venv/bin/activate  # On Windows, use venv\Scripts\activate

2. Install dependencies:

uv pip install -r requirements.txt

3. Create a .env file in the root directory and add your Spiral API key:

SPIRAL_API_KEY=your_api_key_here

You can get your API key from https://app.spiral.computer/api

Start the server:

python src/server.py

The server will run on port 3000 by default. You can change this by setting the PORT environment variable.

list_models

Lists all available Spiral models with their capabilities and metadata.

generate

Generates text using a specified Spiral model. Parameters: model (string), prompt (string)

generate_from_file

Generates text using a Spiral model with input from a file. Parameters: model (string), file_path (string)

generate_from_url

Generates text using a Spiral model with input from a URL. Parameters: model (string), url (string), extract_article (boolean, default: true)

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "spiral writer": {
            "env": {},
            "args": [
                "-y",
                "@highlight/mcp-server"
            ],
            "command": "npx"
        }
    }
}

Linux

{
    "env": [],
    "args": [
        "-y",
        "@highlight/mcp-server"
    ],
    "command": "npx"
}

Macos

{
    "env": [],
    "args": [
        "-y",
        "@highlight/mcp-server"
    ],
    "command": "npx"
}

Windows

{
    "env": [],
    "args": [
        "/c",
        "npx",
        "-y",
        "@highlight/mcp-server"
    ],
    "command": "cmd"
}

Spiral MCP Server

This is a Model Context Protocol (MCP) server implementation for the Spiral API using Python. It provides a standardized interface for interacting with Spiral's language models.

Installation

mcp install src/server.py --name "spiral-writing-tool" --with pydantic --with requests --with beautifulsoup4 --with httpx

Setup

1. Create and activate a virtual environment:

python3 -m venv venv
source venv/bin/activate  # On Windows, use venv\Scripts\activate

2. Install dependencies:

uv pip install -r requirements.txt

3. Create a .env file in the root directory and add your Spiral API key:

SPIRAL_API_KEY=your_api_key_here

You can get your API key from https://app.spiral.computer/api

Running the Server

Start the server:

python src/server.py

The server will run on port 3000 by default. You can change this by setting the PORT environment variable.

Testing the Tools

To test the MCP tools directly:

python src/test_tools.py

This will run tests for all available tools to verify their functionality.

MCP Tools

The server implements four powerful MCP tools:

list_models

Lists all available Spiral models with their capabilities and metadata.

Example response:

{
    "models": [
        {
            "id": "model-id",
            "name": "model-name",
            "description": "Model description",
            "input_format": "text",
            "output_format": "text",
            "capabilities": {
                "completion": true
            }
        }
    ]
}

generate

Generates text using a specified Spiral model.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.