SchemaSmith Documentation

MCP Server Setup

Connect Ask Forge's 46 schema tools to Claude Desktop, VS Code, Cursor, and other MCP-compatible AI clients.

Ask Forge MCP Server Setup

What is MCP?

The Model Context Protocol (MCP) is an open standard that lets AI assistants use external tools and data sources. Ask Forge includes an MCP server (ForgeBarrett.Mcp) that exposes all 46 tools, schema resources, and pre-built prompts to any MCP-compatible client.

The server communicates via JSON-RPC over stdio. It reads requests from stdin, writes responses to stdout, and sends logs to stderr. The protocol version is 2025-03-26.

46 Tools

Schema navigation, validation, generation, modification, and external tool execution across 4 tiers

Resources

Static docs, context-aware product data, and parameterized schema resource templates

8 Prompts

Pre-built prompts for schema design, review, migration, comparison, and onboarding workflows

Client Configuration

Select your AI client below to see the setup instructions. Each client launches the MCP server automatically -- you just need to add the configuration once.

MSI Installer Integration -- The MSI installer can register the MCP server automatically during installation. It adds a forge-barrett entry to your Claude Desktop config while preserving any existing MCP server entries.

Manual Setup

OSConfig File Path
macOS~/Library/Application Support/Claude/claude_desktop_config.json
Windows%APPDATA%\Claude\claude_desktop_config.json

Windows (MSI Install)

{
  "mcpServers": {
    "forge-barrett": {
      "command": "C:\\Program Files\\SchemaSmith\\ForgeBarrett\\ForgeBarrett.Mcp.exe",
      "args": [],
      "env": {
        "FORGE_TRUST_LEVEL": "assistant"
      }
    }
  }
}

Cross-Platform (ZIP / Framework-Dependent)

{
  "mcpServers": {
    "forge-barrett": {
      "command": "dotnet",
      "args": ["/path/to/ForgeBarrett.Mcp.dll"],
      "env": {
        "FORGE_TRUST_LEVEL": "assistant"
      }
    }
  }
}
Set FORGE_TRUST_LEVEL to the appropriate trust level for your use case. The recommended default is assistant (Tiers 1-2: read-only + generate).

Add to your VS Code settings.json (workspace or user):

{
  "mcp": {
    "servers": {
      "forge-barrett": {
        "command": "ForgeBarrett.Mcp.exe",
        "args": [],
        "env": {
          "FORGE_TRUST_LEVEL": "assistant"
        }
      }
    }
  }
}
If ForgeBarrett.Mcp.exe is not on your PATH, use the full path to the executable. After updating the configuration, restart VS Code to pick up the new MCP server.

Add to your Cursor MCP configuration file (~/.cursor/mcp.json):

{
  "mcpServers": {
    "forge-barrett": {
      "command": "ForgeBarrett.Mcp.exe",
      "args": [],
      "env": {
        "FORGE_TRUST_LEVEL": "assistant"
      }
    }
  }
}
After updating the configuration, restart Cursor to pick up the new MCP server.

Any MCP-compatible client that supports stdio transport can use the server. Point it at the ForgeBarrett.Mcp executable with no arguments. The server reads JSON-RPC from stdin and writes responses to stdout. Startup messages and logs go to stderr.

Set the FORGE_TRUST_LEVEL environment variable to control which tool tiers are accessible.

You don't normally start the MCP server manually. Your AI client launches it automatically based on its configuration.

Available Resources

Resources provide structured read access to documentation, configuration, and schema data. The server advertises both static resources and parameterized resource templates.

Static Resources

Always available, regardless of context.

URIDescription
forge://docs/overviewOverview of the SchemaSmith toolset and Forge Barrett assistant
forge://docs/platformsDatabase platforms supported by SchemaSmith with capabilities
forge://docs/naming-conventionsPlatform-specific naming convention rules
forge://config/connectionsDatabase connections from the config file (passwords masked)
forge://config/toolsExternal tool paths from the config file
forge://knowledge/categoriesBrowse the Forge Barrett knowledge base categories

Context-Aware Resources

These appear in the resource list only after a product is loaded via forge_navigate_context.

URIDescription
forge://product/infoProduct metadata (name, platform, path, template count)
forge://product/templatesTemplates in the current product with table counts

Resource Templates (Parameterized)

URI templates that accept parameters. Always advertised, but require an active product/template context to return data.

URI TemplateMIME TypeDescription
forge://template/{templateName}/infotext/plainMetadata for a specific template
forge://template/{templateName}/tablestext/plainList of tables in a specific template
forge://template/{templateName}/scriptstext/plainScript folders in a specific template
forge://table/{tableName}application/jsonFull table definition JSON
forge://table/{tableName}/columnsapplication/jsonColumn definitions for a specific table
forge://table/{tableName}/indexesapplication/jsonIndex definitions for a specific table
forge://table/{tableName}/foreign-keysapplication/jsonForeign key definitions for a specific table
forge://knowledge/{category}text/plainList knowledge articles in a specific category
forge://knowledge/{category}/{articleName}text/plainRead a specific knowledge article

Available Prompts

The MCP server provides 8 pre-built prompts that guide AI assistants through common workflows. Each prompt generates a structured message with relevant context, tool references, and resource links. Prompts are context-aware -- if a product or template is already loaded, the prompt content includes current context details.

PromptDescriptionRequiredOptional
design_table Design a new table with best practices for naming, columns, keys, and indexes tableName platform
validate_schema Validate a SchemaSmith product for naming conventions, missing keys, and best practices -- productPath
plan_migration Plan a safe migration for a table change with rollback strategy tableName changeType
review_schema Review schema health: naming, nullability, orphaned tables, duplicate indexes -- templateName
compare_tables Compare two table definitions side-by-side for structural differences table1, table2 --
onboard_product Guide through loading and exploring a SchemaSmith product for the first time productPath --
troubleshoot_migration Diagnose and resolve a failed or problematic migration errorDescription --
extract_and_scaffold Extract schema from a live database and scaffold a SchemaSmith product platform, database --

Argument Completions

The server supports completion/complete for interactive argument suggestions in clients that support it.

  • platform -- completes from MSSQL, PostgreSQL, MySQL
  • tableName, table1, table2 -- completes from tables in the current template context
  • templateName -- completes from templates in the current product context
  • changeType -- completes from AddColumn, RemoveColumn, RenameColumn, ChangeDataType, AddForeignKey, RemoveForeignKey, AddIndex, RemoveIndex

Tool Annotations

Each of the 46 tools includes MCP 2025-03-26 annotations that hint at the tool's behavior. MCP clients can use these annotations to make informed decisions about tool invocation.

AnnotationApplies ToDescription
readOnlyHint: true Tier 1 (ReadOnly) Tool only reads data, never modifies files or state
destructiveHint: false Tier 2 (Generate) Tool generates output but does not modify existing schemas
destructiveHint: true Tier 3 (Modify), Tier 4 (External) Tool can modify files or create packages -- requires confirmation
idempotentHint: true Context tools (navigate_context, set_connection, set_tool_path, clear_connection, clear_tool_path) Calling the tool multiple times with the same arguments produces the same result
openWorldHint: true Tier 4 (External) Tool invokes external processes (SchemaTongs, SchemaQuench) outside the MCP server

Tools by Tier

TierNameCountConfirmationKey Annotations
1ReadOnly25NeverreadOnlyHint: true
2Generate9NeverdestructiveHint: false
3Modify9confirm: true requireddestructiveHint: true
4External3confirm: true requireddestructiveHint: true, openWorldHint: true

Tier 3/4 Confirmation

Tier 3 (Modify) and Tier 4 (External) tools require a "confirm": true parameter in the MCP tool call arguments. If the parameter is missing or false, the server returns a description of what the tool would do instead of executing it. This prevents accidental execution of destructive operations.

Without Confirmation (Description Only)

{
  "method": "tools/call",
  "params": {
    "name": "forge_apply_change",
    "arguments": {
      "tableName": "Users",
      "change": "..."
    }
  }
}

Response (No Execution)

This operation requires confirmation.

Tool: forge_apply_change
Tier: Modify (Modifies files or creates packages)
Description: ...

To execute this tool, add 'confirm: true' to the arguments.

With Confirmation (Executes)

{
  "method": "tools/call",
  "params": {
    "name": "forge_apply_change",
    "arguments": {
      "tableName": "Users",
      "change": "...",
      "confirm": true
    }
  }
}

Server Capabilities

The MCP server advertises the following capabilities during the initialize handshake.

CapabilityValueDescription
tools.listChangedfalseTool list is static after startup
resources.listChangedtrueResource list changes when product context is loaded
prompts.listChangedfalsePrompt list is static after startup
completionsenabledArgument completion for prompts and resources

The server emits a notifications/resources/list_changed notification when context-changing tools succeed (navigate_context, create_table, rename_table), signaling clients to re-fetch the resource list.

Troubleshooting

If you run into issues with the MCP server -- tools not appearing, connection timeouts, or unexpected responses -- see the Troubleshooting page for diagnostic steps and common solutions.