Skip to main content
Glama

PureScript MCP Server

by avi892nash
.clinerules4.23 kB
# Cline Rules for PureScript MCP Server Project ## Project Overview - **Goal:** Develop a Node.js based MCP server to extend Cline's capabilities for PureScript projects. - **Initial Focus:** Boilerplate server, basic "echo" tool, Memory Bank setup. ## Key Technical Decisions & Patterns - **Server Technology:** Node.js script communicating via stdio using JSON-RPC 2.0 (evolved from initial HTTP assumption). - **Memory Bank:** Core set of Markdown files (`projectbrief.md`, `productContext.md`, `systemPatterns.md`, `techContext.md`, `activeContext.md`, `progress.md`) are mandatory and must be kept up-to-date. - **MCP Configuration:** `mcp-config.json` for executable tool provider registration. - **PureScript Interaction:** - Management of `purs ide server` as a child process. - Extensive AST querying capabilities via a suite of granular tools (e.g., `getModuleName`, `getFunctionNames`, etc.) using `web-tree-sitter`. - **PureScript Test Examples:** `purescript-test-examples` directory for testing server functionalities. ## Workflow Preferences - **Memory Bank First:** Always ensure Memory Bank files are created/updated before significant code changes or when context shifts. - **Iterative Development:** Build components step-by-step, starting with the simplest viable version. - **Clear Next Steps:** `activeContext.md` and `progress.md` should clearly outline pending tasks. - **Git Workflow:** - The primary branch for this project is `main`. - All new work should be committed to `main` and pushed to `origin/main`. - The remote repository is `ssh://git@ssh.bitbucket.juspay.net/~avinash.verma_juspay.in/purescript-tools-mcp.git`. ## Documentation Strategy - **`README.md`:** Provides comprehensive project information, installation, configuration, and usage instructions. This is the primary source of truth for users and developers. - **`INSTALL.md`:** This file has been removed. All installation instructions are in `README.md`. - **Memory Bank:** Core project context, decisions, and progress are tracked in the `memory-bank/` directory. ## Tool Usage Patterns - `write_to_file`: Used for creating new files (like Memory Bank docs, initial code files, documentation). - `execute_command`: Used for `npm init`, `npm install`, running the server, and Git operations. - `replace_in_file`: Preferred for modifying existing files once they are created. - **AST Query Tools:** Prefer the new specific AST query tools (e.g., `getModuleName`, `getImports`, `getFunctionNames`) over the deprecated `query_purescript_ast`. Note their differentiated input: module-level tools take `{filePath?: string, code?: string}` while snippet-level tools take `{code: string}`. - Recent fixes (March 2025) addressed issues in `getModuleName`, `getDataTypes`, `getTypeClasses`, and `getInstances`. `getTypeSignatures` was refactored and needs re-testing. ## Important Reminders for Cline - **Memory Reset:** My memory is reset between sessions. The Memory Bank (especially `activeContext.md` and `progress.md`) and `README.md` are CRUCIAL for re-orienting myself. - **File Paths:** All paths are relative to the project root (`/Users/avinash.verma/Juspay/what-is-purs`). - **User Confirmation:** Wait for user confirmation after each tool use. - **`mcp-config.json` Structure:** This file defines how I discover and use the server's tools. - **PureScript Tooling:** `purs ide` interaction and the new AST query tools are core features. - **Installation Prompts:** - For any user/developer (including a new AI instance or myself if setting up from scratch): The prompt must include the `git clone` command and direct them to `README.md`. - **Testing:** `run_tests.js` has been updated to use JSON-RPC 2.0 and includes comprehensive tests for the new AST query tools (Phase 1). ## Evolution of Project Decisions - Established `main` as the primary Git branch. - Consolidated installation instructions into `README.md` (formerly `INSTALL.md`). - Successfully configured and pushed to the Bitbucket remote. - Shifted from HTTP server to stdio-based JSON-RPC 2.0 MCP server. - Replaced generic `query_purescript_ast` tool with a suite of specific, granular AST query tools (Phase 1 implemented).

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