home / mcp / purescript mcp server

PureScript MCP Server

Provides PureScript tooling for MCP clients to analyze code, manage IDE-like servers, and navigate code structures.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "avi892nash-purescript-mcp-tools": {
      "command": "node",
      "args": [
        "/FULL/PATH/TO/purescript-mcp-server/index.js"
      ]
    }
  }
}

This MCP server provides PureScript development tooling to AI assistants, enabling code analysis, IDE-like features, and code navigation without setting up a full local IDE. You can run it locally and connect via standard MCP clients to perform tasks such as analyzing PureScript code, loading modules into an IDE server, and locating types and usages.

How to use

Connect with your MCP client to access PureScript tooling. Start the server locally, then configure your client to talk to it as a stdio MCP server. Once connected, you gain access to a set of commands that let you analyze code, start an IDE-like server for your project, and query type information and usages.

How to install

Prerequisites: ensure you have Node.js installed and a recent PureScript compiler if you plan to use IDE features.

Step 1. Clone and set up the server locally.

# Clone this repository
git clone <repository-url>
cd purescript-mcp-server

# Install dependencies
npm install

# Test that it works
node index.js
# Press Ctrl+C to stop

Additional sections

Configuration details and usage flow are provided to help you connect your MCP client and start using PureScript tooling effectively.

What you can do with this server includes analyzing PureScript code without heavy IDE setup, starting and managing PureScript IDE servers for advanced features, looking up types and code usages, generating dependency graphs, and parsing code structure such as modules and imports.

Basic usage flow involves checking the server status, performing simple analyses, and using IDE-related features when you need deeper integration with your project.

Requirements include Node.js, the PureScript compiler for IDE features, and your PureScript project with compiled output.

Available tools

Analyze PureScript code

Analyze PureScript source to identify structure and potential issues without a full IDE.

Start/Manage IDE server

Launch and control a PureScript IDE-like server to provide advanced editing features within the MCP ecosystem.

Look up types

Query type information for expressions and declarations to assist code understanding.

Find code usages

Locate where symbols are used across modules to aid refactoring and navigation.

Generate dependency graphs

Create graphs showing module and package dependencies to understand project structure.

Parse code structure

Parse modules, imports, and function definitions to map code organization.