iac-mcp

iac-mcp

Enables AI to dynamically discover and control native macOS applications (like Finder, Mail, Safari) through AppleScript/JXA automation without pre-built integrations.

Category
Visit Server

README

iac-mcp

Universal bridge between AI/LLMs and native applications

iac-mcp is an MCP (Model Context Protocol) server that uses Just-In-Time Discovery (JITD) to dynamically discover and orchestrate any installed application without pre-built integrations.

Platform Support

Current (Phase 1): macOS

  • AppleScript/JXA automation
  • SDEF (Scripting Definition) parsing
  • Scriptable apps (Finder, Mail, Safari, etc.)

Planned (Phase 5+): Multi-platform

  • Windows: VBA, COM, Windows Messaging
  • Linux: D-Bus, command-line tools
  • Cross-platform: Electron apps, web automation

The JITD architecture is designed to work with any platform's native automation capabilities.

Features

  • šŸ” Just-In-Time Discovery: Automatically discovers installed apps and their capabilities
  • šŸ› ļø Dynamic Tool Generation: Generates MCP tools from app automation interfaces
  • šŸ” Permission System: Safe execution with user-controlled permissions
  • šŸš€ Zero Configuration: Works with apps immediately, no pre-built integrations
  • šŸŒ Platform-Agnostic Design: Extensible to any platform with native automation

Status

Current Phase: Phase 0 - Technical Validation (macOS)

This project is in early development. The goal of Phase 0 is to prove the JITD concept works on macOS by:

  1. Parsing SDEF files (starting with Finder)
  2. Generating MCP tool definitions
  3. Executing commands via JXA
  4. Testing with Claude Desktop

Prerequisites

For macOS (Phase 1):

Installation

Quick Start

# Clone the repository
git clone https://github.com/jsavin/iac-mcp.git
cd iac-mcp

# Install dependencies (uses package-lock.json for exact versions)
npm ci

# Build the project
npm run build

# Verify installation
npm run verify

Node Version Management

This project requires Node.js 20+. We recommend Node.js 20.x LTS for stability, but any 20+ version (including 22.x LTS or 25.x Current) works fine.

Option 1: Using Homebrew (macOS)

# Install Node.js LTS
brew install node@20

# Or use the current release (25.x)
brew install node

Option 2: Using nvm (recommended for multiple versions)

# Install nvm if you don't have it
# See: https://github.com/nvm-sh/nvm

# Use the LTS version (reads .nvmrc automatically)
nvm use

# Or install if you don't have Node 20+
nvm install 20  # or 'nvm install --lts'

Option 3: Using Volta

# Volta automatically detects .node-version
# See: https://volta.sh/

# Just cd into the directory and Volta handles it
cd iac-mcp

Option 4: Manual installation

  • Download from https://nodejs.org/
  • Install either LTS (20.x, 22.x) or Current (25.x)
  • Verify: node --version should show v20+

Dependency Management

We use package-lock.json to ensure everyone gets identical dependencies:

  • For fresh install: npm ci (faster, stricter, uses lock file)
  • For development: npm install (updates lock file if needed)
  • Never delete package-lock.json - it's committed to git

This prevents "works on my machine" issues from dependency version drift.

Development

# Watch mode (rebuilds on file changes)
npm run dev

# Run tests
npm test

# Run tests in watch mode
npm run test:watch

# Lint code
npm run lint
npm run lint:fix

Testing with MCP Inspector

The MCP Inspector is a browser-based tool for testing MCP servers before integrating with Claude Desktop:

# Start the MCP Inspector
npx @modelcontextprotocol/inspector node dist/index.js

This will open a browser window where you can:

  • View available tools
  • Test tool execution
  • Inspect request/response payloads
  • Debug server behavior

Testing with Claude Desktop

Step 1: Configure Claude Desktop

  1. Locate your Claude Desktop configuration file:

    ~/Library/Application Support/Claude/claude_desktop_config.json
    
  2. Add the iac-mcp server configuration:

    {
      "mcpServers": {
        "iac-mcp": {
          "command": "node",
          "args": ["/absolute/path/to/iac-mcp/dist/index.js"],
          "env": {
            "NODE_ENV": "production"
          }
        }
      }
    }
    
  3. Important: Replace /absolute/path/to/iac-mcp with the actual absolute path to your iac-mcp directory.

Quick way to get the absolute path:

cd /path/to/iac-mcp
pwd
# Copy the output and append /dist/index.js

Example configuration:

{
  "mcpServers": {
    "iac-mcp": {
      "command": "node",
      "args": ["/Users/yourusername/dev/iac-mcp/dist/index.js"],
      "env": {
        "NODE_ENV": "production"
      }
    }
  }
}

Configuration Template: A ready-to-use template is available in claude_desktop_config.json at the repository root.

Step 2: Restart Claude Desktop

  1. Completely quit Claude Desktop (Cmd+Q)
  2. Relaunch Claude Desktop
  3. The iac-mcp server will start automatically

Step 3: Verify Connection

In a new Claude conversation, you can verify the server is working by asking Claude to list available tools or use the example tool:

Can you show me what tools are available from iac-mcp?

or

Use the example_tool to echo "Hello from Claude Desktop"

Step 4: Monitor Server Logs

Server logs are written to stderr and can be viewed in Claude Desktop's developer console (if available) or by running the server manually:

node dist/index.js
# Then interact with Claude Desktop
# Logs will appear in this terminal

Troubleshooting Claude Desktop Integration

Problem: Server not appearing in Claude Desktop

  1. Verify the config file path is correct
  2. Check that the absolute path to dist/index.js is correct
  3. Ensure the project is built: npm run build
  4. Check for syntax errors in the JSON config file
  5. Restart Claude Desktop completely

Problem: Tools not showing up

  1. Test with MCP Inspector first to verify the server works
  2. Check Claude Desktop logs/console for errors
  3. Verify Node.js version: node --version (must be 20+)

Problem: Tool execution fails

  1. Check server logs for error messages
  2. Verify the tool is being called with correct parameters
  3. Test the same tool call in MCP Inspector to isolate the issue

For comprehensive testing procedures, see docs/MANUAL-TESTING.md.

Project Structure

src/
ā”œā”€ā”€ index.ts              # MCP server entry point
ā”œā”€ā”€ jitd/                 # JITD engine
│   ā”œā”€ā”€ discovery/        # App discovery and SDEF parsing
│   ā”œā”€ā”€ tool-generator/   # MCP tool generation
│   └── cache/            # Capability caching
ā”œā”€ā”€ adapters/             # Platform adapters
│   └── macos/            # macOS JXA/AppleEvents
ā”œā”€ā”€ mcp/                  # MCP protocol implementation
│   ā”œā”€ā”€ server.ts         # MCP server setup
│   └── tools.ts          # Tool handlers
ā”œā”€ā”€ permissions/          # Permission system
└── types/                # TypeScript type definitions

planning/                 # Technical planning
tests/                    # Unit and integration tests
tools/                    # Development helper scripts

Documentation

Philosophy

Interoperability above all. Make everything work with everything else.

  • Local-first: Your apps, your data, your control
  • No vendor lock-in: Open standards (MCP), open source core
  • Universal: Works with any scriptable app, not just popular ones
  • Zero configuration: Discovers capabilities automatically

License

MIT - see LICENSE for details

Contributing

This project is in early development. Contributions welcome once Phase 0 is complete.

Open Source Roadmap

  • Phase 0 (Month 1): Technical validation - prove JITD works on macOS
  • Phase 1 (Months 2-5): Open source MCP bridge (macOS scriptable apps)

See planning/ROADMAP.md for details.


Status: Phase 0 (Technical Validation) - Proving JITD concept

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