parinfer
MCP server from VaclavSynacek/parinfer-mcp-server
claude mcp add --transport stdio vaclavsynacek-parinfer-mcp-server /absolute/path/to/parinfer-mcp/target/release/parinfer-mcp-server
How to use
Parinfer MCP Server uses the parinfer-rust library to automatically fix parentheses and brackets in Clojure code based on indentation. It provides a single tool named fix_parens that takes Clojure code with correct indentation and outputs corrected code with proper parentheses. This is useful when large language models produce code with mismatched or missing delimiters, allowing you to post-process the output to ensure syntactic correctness before execution or saving. To use it with an MCP client, configure the parinfer server in your MCP client configuration (for example, Claude Desktop) using the server binary built from this repository. When you invoke fix_parens, pass the Clojure code as the input parameter and receive the corrected code as the output.
Example workflow: install/build the server, start it, then send a request to the fix_parens tool with a code snippet. The server preserves the original indentation while inferring the correct closing parentheses/brackets and returns the corrected Clojure code. This makes it easier to rely on LLMs for code generation, while ensuring the resulting code is properly balanced and readable.
How to install
Prerequisites:
- Rust toolchain (rustc, cargo)
- Make (for the build targets shown)
- Install Rust if you don’t have it:
- macOS/Linux: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
- Windows: use rustup-init.exe from rustup.rs
- Clone the MCP server repository (or download the source): git clone <repository-url> cd parinfer-mcp-server
- Build the binary:
make build
The binary will be available at target/release/parinfer-mcp-server
- Confirm the build: ls -l target/release/parinfer-mcp-server
- (Optional) Run tests to verify: make test
- Configure your MCP client to point to the built binary, e.g.: "parinfer": { "command": "/absolute/path/to/parinfer-mcp/target/release/parinfer-mcp-server" }
Additional notes
Notes:
- The server provides a single tool named fix_parens which fixes mismatched or missing closing delimiters in Clojure code based on indentation.
- Ensure the server binary has executable permissions and is accessible from the MCP client configuration path you provide.
- When testing locally, you can verify functionality with MCP Inspector using: npx @modelcontextprotocol/inspector ./target/release/parinfer-mcp-server
- If you update the binary, rebuild with make build to obtain the latest executable.
- The server preserves all input indentation and infers the necessary closing parentheses/brackets; it does not modify indentation, only the delimiters.
- If you run into path issues in configuration, provide the absolute path to the parinfer-mcp-server binary in your MCP client config.
Related MCP Servers
goose
an open source, extensible AI agent that goes beyond code suggestions - install, execute, edit, and test with any LLM
cunzhi
告别AI提前终止烦恼,助力AI更加持久
probe
AI-friendly semantic code search engine for large codebases. Combines ripgrep speed with tree-sitter AST parsing. Powers AI coding assistants with precise, context-aware code understanding.
mcp-center
A centralized platform for managing and connecting MCP servers. MCP Center provides a high-performance proxy service that enables seamless communication between MCP clients and multiple MCP servers.
backlog -rust
MCP server for Backlog, project management service.
perplexity-web-api
🔍 Perplexity AI MCP without API key