Skip to main content
Glama

PureScript MCP Server

by avi892nash
techContext.md1.79 kB
# Tech Context: PureScript MCP Server ## 1. Technologies Used - **Primary Language:** Node.js (JavaScript). - **Package Manager:** npm. - **Stdio Handling & Protocol:** Node.js `readline` module for line-by-line stdio. JSON-RPC 2.0 for message structure and standard MCP methods. - **AST Parsing:** `web-tree-sitter` with `tree-sitter-purescript.wasm`. - **PureScript IDE Interaction:** - Node.js `child_process` module (specifically `spawn`) to manage the `purs ide server` process. - Node.js `net` module for TCP communication with the `purs ide server`. - **Logging Aid:** `chalk` for colored console output. - **PureScript Toolchain:** `purs ide` (assumed to be available via `npx purs` or globally). - **Testing (for the server itself):** Manual testing via MCP tool invocation. Formal testing frameworks (Jest, Mocha) could be added later. ## 2. Development Setup - **Node.js:** Required to be installed on the development/execution machine. - **PureScript:** Required to be installed if tools directly interact with PureScript compilation or execution. The version should be compatible with the `purescript-test-examples`. - **IDE/Editor:** Any standard code editor (like VS Code) can be used. - **`package.json`:** Will define project dependencies, scripts for running the server, and other metadata. ## 3. Technical Constraints - The MCP server runs as a standalone Node.js script, interacting via stdio. - `purs ide server` is managed as a child process. - Communication with `purs ide` is over TCP, expecting newline-terminated JSON. - `tree-sitter-purescript.wasm` must be present in the project root for AST querying. - `npx` and `purs` (with `purs ide`) must be available in the environment where the MCP server runs, or in the specified `project_path` for `purs ide`.

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/avi892nash/purescript-mcp-tools'

If you have feedback or need assistance with the MCP directory API, please join our Discord server