Skip to main content
Glama

Build MCP Server

A Model Context Protocol (MCP) server that provides build and development tools for AI assistants. This server enables AI agents to run build commands, tests, linting, and manage dependencies in development projects.

Features

  • Build Management: Run build commands with customizable parameters

  • Test Execution: Execute test suites and report results

  • Package Analysis: Read and analyze package.json files

  • Dependency Management: Install dependencies using npm, yarn, or pnpm

  • Code Linting: Run linting tools and report code quality issues

Related MCP server: npm-run-mcp-server

Installation

npx build-mcp-server

Local Development

git clone <your-repo-url>
cd build-mcp-server
npm install
npm run build

Configuration

Add this server to your MCP configuration file:

{
  "mcpServers": {
    "build-server": {
      "command": "npx",
      "args": [
        "-y",
        "build-mcp-server"
      ],
      "env": {}
    }
  }
}

Or for local development:

{
  "mcpServers": {
    "build-server": {
      "command": "node",
      "args": [
        "/path/to/build-mcp-server/dist/index.js"
      ],
      "env": {}
    }
  }
}

Available Tools

run_build

Execute build commands in a project directory.

Parameters:

  • command (string, optional): Build command to run (default: "npm run build")

  • directory (string, optional): Directory to run the build in (default: current directory)

Example:

Run build command "npm run build" in the current directory

run_test

Execute test suites in a project directory.

Parameters:

  • command (string, optional): Test command to run (default: "npm test")

  • directory (string, optional): Directory to run tests in (default: current directory)

Example:

Run tests using "yarn test" in the ./frontend directory

check_package_json

Analyze package.json files and extract key information.

Parameters:

  • directory (string, optional): Directory containing package.json (default: current directory)

Example:

Check package.json in the current directory

install_dependencies

Install project dependencies using various package managers.

Parameters:

  • manager (string, optional): Package manager to use - npm, yarn, or pnpm (default: "npm")

  • directory (string, optional): Directory to install dependencies in (default: current directory)

Example:

Install dependencies using yarn in the ./backend directory

lint_code

Run code linting and quality checks.

Parameters:

  • command (string, optional): Lint command to run (default: "npm run lint")

  • directory (string, optional): Directory to run linting in (default: current directory)

Example:

Run linting with "eslint ." command

Usage Examples

Once configured, you can use natural language to interact with the build server:

  • "Build the project"

  • "Run tests in the frontend directory"

  • "Install dependencies using yarn"

  • "Check what scripts are available in package.json"

  • "Lint the code and show me any issues"

Error Handling

The server provides detailed error messages and output for all operations. Build failures, test errors, and linting issues are clearly reported with full context.

Security

This server executes shell commands in the specified directories. Ensure you trust the environment and commands being executed. The server includes timeout protections to prevent long-running processes.

Development

To contribute or modify the server:

# Clone and install
git clone <repo-url>
cd build-mcp-server
npm install

# Development with auto-reload
npm run dev

# Build for production
npm run build

# Test the server
npm start

License

MIT

Available Tools

5 tools
check_package_jsonC

Read and analyze package.json file

Inputs: directory.

install_dependenciesC

Install project dependencies

Inputs: manager, directory.

lint_codeC

Run linting on the codebase

Inputs: command, directory.

run_buildC

Run build command in the current directory

Inputs: command, directory.

run_testC

Run tests in the current directory

Inputs: command, directory.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose targeting different aspects of the build process: checking configuration, installing dependencies, linting, building, and testing. There is no overlap in functionality, making tool selection straightforward for an agent.

    Naming Consistency5/5

    All tools follow a consistent verb_noun pattern with snake_case (e.g., check_package_json, install_dependencies). The naming is predictable and readable throughout the set.

    Tool Count5/5

    With 5 tools, this server is well-scoped for a build automation domain. Each tool earns its place by covering essential build-related tasks without being overly sparse or bloated.

    Completeness4/5

    The toolset covers core build workflow steps (check, install, lint, build, test), but lacks operations like cleanup, deployment, or version control integration, which are minor gaps that agents can work around for basic build tasks.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • -
      license
      Not graded
      quality
      Not graded
      maintenance
      Enables AI assistants to automatically analyze GitHub repositories and set up development environments by detecting tech stacks, installing dependencies, and verifying project builds. Provides safe tools for repository cloning, file system operations, package installation, and build verification through an allowlisted command system.
      -
    • A
      license
      B
      quality
      D
      maintenance
      Exposes your project's package.json scripts as MCP tools, allowing AI assistants to discover and execute npm/yarn/pnpm/bun scripts directly. Automatically detects your package manager and enables running scripts with optional arguments through natural language commands.
      5
      97 npm
      3
      MIT