FrootAI — AmpliFAI your AI Ecosystem Get Started

FAI MCP Integration Guide

45 MCP tools across 7 categories — the bridge between AI models and the FAI knowledge base.

L8·14 min read·High

What Is MCP?

The Model Context Protocol (MCP) is an open standard for connecting AI models to external tools and data sources. Think of it as "USB-C for AI" — a universal plug that lets any MCP-compatible client (GitHub Copilot, Claude Desktop, Cursor, Azure AI Foundry) call the same set of tools without custom integration code.

FrootAI's MCP server exposes 45 tools that give AI models direct access to the FROOT knowledge base, solution plays, architecture patterns, FAI Engine protocol wiring, scaffold generation, plugin marketplace, and evaluation pipelines. Instead of pasting knowledge into prompts manually, AI models call MCP tools to retrieve exactly the context they need.

How FrootAI Uses MCP

The FAI MCP server is the runtime bridge between AI models and the FrootAI ecosystem. When an agent needs architecture guidance, it calls get_architecture_pattern. When it needs to validate a config, it calls validate_config. The MCP server handles:

  • Knowledge retrieval — Search and fetch from 17 FROOT modules
  • Play discovery — Find matching solution plays by description
  • Config validation — Check openai.json and guardrails.json against best practices
  • Cost estimation — Calculate Azure costs for any play at dev or prod scale
  • Model comparison — Side-by-side model recommendations for specific use cases
  • Evaluation — Run quality scores against guardrail thresholds

45 Tools in 7 Categories

CategoryToolsCountPurpose
Static Knowledgeget_module, list_modules, lookup_term, search_knowledge, get_froot_overview, get_model_catalog6Read FROOT modules, glossary, model catalog
Live Architectureget_architecture_pattern, compare_models, get_azure_pricing, fetch_azure_docs4Architecture guidance, model comparison, pricing
Agent Chainagent_build, agent_review, agent_tune3Builder/Reviewer/Tuner workflow
Ecosystemlist_community_plays, semantic_search_plays, compare_plays, estimate_cost, generate_architecture_diagram, run_evaluation, validate_config7Play discovery, cost, eval, validation
Developerembedding_playground, fetch_external_mcp2Learning tools and external MCP discovery
FAI Enginewire_play, inspect_wiring, validate_manifest, get_play_detail, list_primitives, evaluate_quality6Protocol wiring, primitive inspection, quality gates
Scaffold & Createscaffold_play, create_primitive, smart_scaffold3Generate plays and primitives with FAI Protocol
Marketplacemarketplace_search, install_plugin, uninstall_plugin, compose_plugins, + 9 more13Plugin discovery, install, compose, validate

Installation

The FAI MCP server is available as an npm package, Python package, and Docker image:

Terminal — Install MCP Server
# Node.js (recommended)
npx frootai-mcp@latest

# Python
pip install frootai-mcp

# Docker
docker run -i ghcr.io/frootai/frootai-mcp

# Verify installation
npx frootai-mcp --version
npx frootai-mcp --list-tools

Client Configuration

Configure the FAI MCP server in your preferred AI client:

GitHub Copilot (VS Code)

.vscode/mcp.json
{
  "servers": {
    "frootai": {
      "command": "npx",
      "args": ["frootai-mcp@latest"],
      "env": {}
    }
  }
}

Claude Desktop

claude_desktop_config.json
{
  "mcpServers": {
    "frootai": {
      "command": "npx",
      "args": ["frootai-mcp@latest"]
    }
  }
}

Cursor

.cursor/mcp.json
{
  "mcpServers": {
    "frootai": {
      "command": "npx",
      "args": ["frootai-mcp@latest"]
    }
  }
}

Azure AI Foundry

In Azure AI Foundry, add the MCP server as a connected tool in your agent configuration. Use the Docker image for cloud-hosted deployments:

Foundry Agent Config
# Add as tool connection in AI Foundry portal
# Image: ghcr.io/frootai/frootai-mcp:latest
# Transport: stdio

Per-Play MCP Configuration

Each solution play can customize the MCP server by passing a play ID as an environment variable. This scopes the server's responses to the specific play's context — knowledge modules, WAF pillars, and infrastructure:

.vscode/mcp.json — Play-Scoped
{
  "servers": {
    "frootai": {
      "command": "npx",
      "args": ["frootai-mcp@latest"],
      "env": {
        "FAI_PLAY": "01-enterprise-rag",
        "FAI_WAF": "security,reliability,cost-optimization",
        "FAI_KNOWLEDGE": "F1,F2,R2,O4"
      }
    }
  }
}

When FAI_PLAY is set, tools like search_knowledge prioritize the play's knowledge modules, validate_config uses play-specific thresholds, and estimate_costdefaults to the play's Azure services.

Tool Parameter Reference

Key tools and their parameters:

ToolRequired ParamsOptional ParamsReturns
get_modulemodule_idsectionFull module content or specific section
search_knowledgequerymax_resultsMatching sections across all modules
compare_modelsuseCaseprioritySide-by-side model comparison
estimate_costplayscaleItemized monthly Azure cost
validate_configconfig_type, config_contentplayValidation results with warnings
run_evaluationscoresthresholds, playPass/fail per metric
semantic_search_playsquerytop_kRanked play matches with confidence
wire_playplayId, manifestPathWiring report: primitives connected, context injected, duration
scaffold_playnamedescription, model, wafPillars, dryRun24+ files created with FAI Protocol auto-wired
inspect_wiringplayIdDependency graph: agents → instructions → skills → hooks
evaluate_qualityscoresthresholds, playPass/fail per metric against play guardrails

Building Custom MCP Tools

Extend the FAI MCP server by adding custom tools. Each tool is a function registered with the MCP runtime:

custom-tools/my-tool.js
// Custom MCP tool template
module.exports = {
  name: "my_custom_tool",
  description: "Describe what this tool does",
  parameters: {
    type: "object",
    properties: {
      query: {
        type: "string",
        description: "The input query"
      }
    },
    required: ["query"]
  },
  handler: async ({ query }) => {
    // Your tool logic here
    const result = await processQuery(query);
    return {
      content: [
        {
          type: "text",
          text: JSON.stringify(result, null, 2)
        }
      ]
    };
  }
};

Troubleshooting MCP Connections

Common issues when setting up the FAI MCP server:

SymptomCauseFix
Tools not appearing in CopilotMCP server not startedCheck .vscode/mcp.json exists and reload VS Code
Connection refusedPort conflict or npx cacheRun npx frootai-mcp@latest manually to verify
Stale responsesOld MCP server versionClear npx cache: npx clear-npx-cache
Play-scoped tools return generic dataFAI_PLAY env var not setAdd FAI_PLAY to mcp.json env block

External MCP Discovery

The fetch_external_mcptool searches public MCP registries for servers that complement the FAI ecosystem — GitHub, Jira, Slack, database, and other integrations. Combine FAI's architecture knowledge with external data sources for end-to-end workflows.

Example: Discover External MCP Servers
// In Copilot Chat:
// "Find MCP servers for database integration"

// The fetch_external_mcp tool searches public registries
// and returns compatible MCP servers:
// - @modelcontextprotocol/server-postgres
// - @modelcontextprotocol/server-sqlite
// - mcp-server-mongodb
// - mcp-server-redis

What Is Wiring? The FAI Protocol

Every solution play has a fai-manifest.json — a binding contract that declares which agents, instructions, skills, hooks, knowledge modules, and quality thresholds belong to the play. When you call wire_play, the FAI Engine:

  1. Loads the manifest and resolves all file paths
  2. Builds shared context — injects knowledge modules + WAF pillars into every primitive
  3. Wires the graph — connects agents → instructions → skills → hooks
  4. Creates quality gates — guardrails thresholds from the manifest

Think of it as docker compose up but for AI primitives. One manifest, one command, everything connected.

fai-manifest.json — The Binding Contract
{
  "play": "01-enterprise-rag",
  "version": "1.0.0",
  "context": {
    "knowledge": ["R2-RAG-Architecture", "O3-MCP-Tools-Functions"],
    "waf": ["security", "reliability", "cost-optimization"],
    "scope": "enterprise-rag-qa"
  },
  "primitives": {
    "agents": ["./agent.md"],
    "instructions": ["./instructions.md"],
    "skills": ["./.github/skills/deploy-enterprise-rag/"],
    "hooks": ["../../hooks/frootai-secrets-scanner/"],
    "guardrails": {
      "groundedness": 0.95,
      "coherence": 0.90,
      "safety": 0
    }
  }
}