MCP X-Platform

MCP X-Platform

Analyzes codebases for cross-platform compatibility issues, detecting platform-specific APIs, file path problems, line ending inconsistencies, and shell command incompatibilities across Windows, macOS, and Linux.

Category
Visit Server

README

MCP X-Platform

A Cross-Platform Compatibility Analyzer MCP server that systematically identifies platform-specific code patterns, dependencies, and potential portability issues

License: MIT TypeScript MCP

Overview

MCP X-Platform is a Model Context Protocol (MCP) server designed to analyze codebases for cross-platform compatibility issues. It detects platform-specific APIs, file path problems, line ending inconsistencies, shell command incompatibilities, and dependency issues across Windows, macOS, and Linux.

Key Features

  • 🔍 Platform API Detection - Identify Windows, macOS, Linux, and POSIX-specific APIs
  • 📁 File Path Analysis - Detect separator issues, reserved names, and case sensitivity problems
  • 📝 Line Ending Check - Find CRLF vs LF inconsistencies
  • 🖥️ Shell Command Analysis - Identify platform-specific shell commands and scripts
  • 📦 Dependency Compatibility - Analyze dependencies for platform-specific packages
  • 📊 Comprehensive Reports - Generate detailed cross-platform compatibility reports
  • 🔗 MCP Integration - Seamless integration with other MCP tools
  • Test-Driven - Built using TDD methodology

Installation

# Install dependencies
npm install

# Build the project
npm run build

# Run tests
npm test

Quick Start

As an MCP Server

Add to your MCP client configuration (e.g., Claude Desktop):

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

Core Tools

Tool Purpose
detect_platform_apis Detect platform-specific API calls
analyze_file_paths Analyze file paths for compatibility
analyze_line_endings Check line ending consistency
analyze_shell_commands Analyze shell command compatibility
generate_compatibility_report Generate comprehensive reports

Usage Examples

Detect Platform APIs

{
  "tool": "detect_platform_apis",
  "arguments": {
    "path": "./src",
    "platforms": ["windows", "macos", "linux"]
  }
}

Analyze File Paths

{
  "tool": "analyze_file_paths",
  "arguments": {
    "path": "./src",
    "checkCaseSensitivity": true,
    "checkSeparators": true
  }
}

Best Practices

File Paths

// ✅ GOOD
import * as path from "path";
const filePath = path.join("src", "utils", "helper.js");

// ❌ BAD
const filePath = "src\\utils\\helper.js";

Line Endings

# .gitattributes
* text=auto eol=lf
*.sh text eol=lf
*.{cmd,bat} text eol=crlf

Shell Commands

// ✅ GOOD - Cross-platform
import { rimraf } from "rimraf";
await rimraf("./temp");

// ❌ BAD - Platform-specific
exec("rm -rf ./temp");

Development

# Build
npm run build

# Test
npm test

# Watch mode
npm run build:watch

License

MIT License - see LICENSE file for details


Built for cross-platform compatibility with ❤️

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured