biome-mcp-server

RyuzakiShinji/biome-mcp-server

3.2

If you are the rightful owner of biome-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

A Model Context Protocol (MCP) server that enables LLMs and AI agents to perform code linting and automatic formatting using Biome.

Tools
2
Resources
0
Prompts
0

Biome MCP Server

|

A Model Context Protocol (MCP) server that enables LLMs and AI agents to perform code linting and automatic formatting using Biome. This server exposes Biome's linting and formatting capabilities as MCP tools, allowing AI to programmatically check and format code.

Overview

This MCP server specializes in linting and formatting JavaScript/TypeScript code. Key features include:

  • Code Analysis: Detects lint errors and provides detailed diagnostic information
  • Auto-formatting: Automatically formats code according to Biome's rules
  • AI Integration: Easy access to these features through the MCP protocol

Features

  • Exposes Biome's lint and format functionality as MCP tools
  • Simple TypeScript implementation that's easy to extend
  • Configurable Biome settings support

Prerequisites

  • Node.js 22 or higher

Getting Started

1. Clone the Repository

git clone https://github.com/RyuzakiShinji/biome-mcp-server.git
cd biome-mcp-server

2. Install Dependencies

npm install

3. Configure Your MCP Client

Add the following configuration to your MCP client:

{
  "mcpServers": {
    "biome": {
      "command": "npx",
      "args": [
        "-y",
        "tsx",
        "/path/to/the/cloned/repo/biome-mcp-server/biome-mcp-server.ts"
      ],
      "env": {},
      "autoApprove": [],
      "disabled": false
    }
  }
}

Replace /path/to/the/cloned/repo/biome-mcp-server/biome-mcp-server.ts with the actual path to your cloned repository.

Available Tools

biome-lint

Analyzes JavaScript/TypeScript files and returns Biome lint diagnostics.

Parameters:

  • paths (string[]): Array of file paths to lint
  • configPath (optional string): Path to custom Biome configuration file (e.g., biome.json). Uses default settings if not specified

Output:

  • Returns diagnostic results (errors, warnings, suggestions) in text format

biome-format

Automatically formats JavaScript/TypeScript files according to Biome rules.

Parameters:

  • paths (string[]): Array of file paths to format
  • configPath (optional string): Path to custom Biome configuration file. Uses default settings if not specified

Output:

  • Returns formatted code in text format

Custom Biome Configuration

You can specify a custom Biome configuration file using the configPath parameter. This allows you to tailor linting and formatting rules for different projects, providing flexibility in code style enforcement.

References

License

MIT License