Pistachio MCP Server

Pistachio MCP Server

A remote MCP server built with Node.js and TypeScript that enables tool calls and prompt templates via streamable HTTP transport. It includes example implementations for a calculator and localized greetings, featuring built-in CORS support for web-based clients.

Category
Visit Server

README

Pistachio MCP Server

A remote MCP (Model Context Protocol) server built with Node.js and TypeScript for mobile app development. This server provides tools and prompts for remote project management, testing, and asset search.

Prerequisites

Before setting up this repository, ensure you have the following installed:

  • Node.js (v20 or higher)
  • Yarn (v4.10.3 or compatible version)
  • Git

Setup Instructions

1. Clone the Repository

git clone <repository-url>
cd pistachio-mcp

2. Install Yarn (if not already installed)

This project uses Yarn 4.10.3 as the package manager. If you don't have Yarn installed or need to upgrade:

# Install Yarn globally (if needed)
npm install -g yarn

# Or use Corepack (recommended for Node.js 16.10+)
corepack enable
corepack prepare yarn@4.10.3 --activate

3. Install Dependencies

Install all project dependencies using Yarn:

yarn install

This will install all dependencies listed in package.json, including:

  • @modelcontextprotocol/sdk - MCP SDK
  • firebase - Firebase SDK for Firestore and Auth
  • @google-cloud/storage - Google Cloud Storage client
  • zod - Schema validation
  • TypeScript and development dependencies

4. Configure Environment Variables

Create a .env file in the root directory (if needed for custom configuration):

# Optional: Set custom port (default: 3001)
PORT=3001

# Optional: Set number of worker threads (default: 2)
NUM_WORKERS=2

# Optional: Set Node environment
NODE_ENV=development

# Optional: Firebase emulator configuration (for development)
FIREBASE_AUTH_EMULATOR_HOST=localhost:9099
FIRESTORE_EMULATOR_HOST=localhost:8080

# Optional: Google Cloud Storage bucket for weekly expiring assets
GCS_BUCKET_WEEKLY_EXPIRING=dev-pistachio-assets-weekly-expiring

Note: The project uses hardcoded Firebase configuration in src/utils/ServerStorageUtils.ts. For production, you may want to move this to environment variables.

5. Configure Google Cloud Storage (Optional)

If you plan to use Google Cloud Storage features (image uploads), you'll need to set up authentication:

  1. Create a service account in Google Cloud Console
  2. Download the service account key as a JSON file
  3. Set the environment variable:
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/your/service-account-key.json"

Alternatively, if running on Google Cloud Platform, authentication is handled automatically.

6. Build the Project

Compile TypeScript to JavaScript:

yarn build

This will generate the dist/ directory with compiled JavaScript files.

7. Verify Installation

Run the tests to verify everything is set up correctly:

yarn test:run

Running the Server

Development Mode

Run the server in development mode with hot reload:

yarn dev

The server will start on port 3001 by default (or the port specified by the PORT environment variable).

Production Mode

Build and run the compiled server:

yarn build
node dist/index.js

Direct Execution (Development)

Run TypeScript directly without building:

yarn start

Server Configuration

Default Settings

  • Port: 3001 (configurable via PORT environment variable)
  • Workers: 2 (configurable via NUM_WORKERS environment variable)
  • Host: 0.0.0.0 (accessible from remote clients)

MCP Endpoint

The server exposes an MCP endpoint at /message that accepts:

  • GET: Establish SSE stream for receiving messages
  • POST: Send MCP requests
  • OPTIONS: CORS preflight requests

Example endpoint: http://localhost:3001/message

Available Tools

The server provides the following MCP tools:

  • search_image - Search for images
  • search_icon - Search for icons
  • create_remote_project - Create a remote project
  • remote_kdoctor - Run kdoctor diagnostics
  • remote_clean_project - Clean a remote project
  • remote_test_android - Run Android tests remotely

Available Prompts

The server provides the following MCP prompts:

  • create_pistachio_project - Generate instructions for creating a Pistachio project
  • start_sync - Generate instructions for starting sync

Development

Running Tests

# Run tests in watch mode
yarn test

# Run tests once
yarn test:run

Linting

# Check for linting errors
yarn lint

# Fix linting errors automatically
yarn lint:fix

TypeScript Compilation Errors

If you encounter TypeScript errors:

# Clean and rebuild
rm -rf dist
yarn build

License

MIT

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
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
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
Qdrant Server

Qdrant Server

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

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
E2B

E2B

Using MCP to run code via e2b.

Official
Featured