About Claude Code

Claude Code is Anthropic's official agentic coding tool that runs in your terminal (CLI) or as a VS Code extension. It supports the Model Context Protocol (MCP), enabling you to connect fo-semantic-mcp for AI-assisted D365 F&O development.

Claude Code uses a .claude.json configuration file in your home directory to manage MCP servers.

Configuration Steps

  1. Locate Your Claude Code Config File

    Claude Code stores its MCP configuration in .claude.json in your home directory:

    Windows:

    C:\Users\<YourName>\.claude.json

    macOS / Linux:

    ~/.claude.json

    File doesn't exist?

    If the file doesn't exist, create it. Claude Code will use this file for MCP server configurations.

  2. Get Your API Key

    Sign in to xplusplus.ai and get your API key from the dashboard.

    Get API Key
  3. Add MCP Server Configuration

    Open your .claude.json file and add the fo-semantic-mcp server configuration:

    { "mcpServers": { "fo-semantic": { "command": "npx", "args": [ "-y", "fo-semantic-mcp" ], "env": { "FOINDEX_API_KEY": "your_api_key_here", "FO_LOCAL_ASSETS_PATH": "C:\\Users\\YourName\\AppData\\Local\\Microsoft\\Dynamics365\\10.0.xxxx\\PackagesLocalDirectory", "FO_SEARCH_DEFAULT_LIMIT": "10", "FO_THRESHOLD": "0.7" } } } }

    Configuration Options

    FOINDEX_API_KEY (required) - Your API key from xplusplus.ai
    FO_LOCAL_ASSETS_PATH (recommended) - Path to your local F&O PackagesLocalDirectory for XML file reading
    FO_SEARCH_DEFAULT_LIMIT - Number of search results (default: 10)
    FO_THRESHOLD - Relevance threshold 0-1 (default: 0.5)

  4. Restart Claude Code

    After saving the config file:

    • CLI: Close and reopen your terminal, then run claude
    • VS Code: Reload the window (Ctrl+Shift+P → "Developer: Reload Window")

    The MCP server will be automatically downloaded and started via npx on first use.

  5. Test the Connection

    Try asking Claude Code to search for F&O artifacts:

    > Find tables related to CustTable > Show me sales order validation patterns > Search for inventory transaction forms

Example in Action

Here's what it looks like when Claude Code uses the MCP server to find F&O artifacts:

Claude Code using fo-semantic-mcp to search F&O artifacts
Claude Code automatically calls fo-semantic-mcp to search for F&O artifacts, returning metadata and file paths.

What's Happening

When you ask about F&O artifacts, Claude Code automatically invokes the MCP server's search_fo_artifacts function. The server queries the xplusplus.ai artifact index and returns matching results with their local file paths for further analysis.

Finding Your PackagesLocalDirectory

To enable local XML file reading, you need to set FO_LOCAL_ASSETS_PATH to your F&O installation:

Typical Windows path:

C:\Users\[YourName]\AppData\Local\Microsoft\Dynamics365\[version]\PackagesLocalDirectory

PowerShell command to find it:

Get-ChildItem "$env:LOCALAPPDATA\Microsoft\Dynamics365\" -Recurse -Filter "PackagesLocalDirectory" | Select-Object FullName

Note: Use double backslashes (\\) in the JSON config file for Windows paths.

VS Code Extension Users

If you're using Claude Code as a VS Code extension, the configuration is the same. The extension reads from the same .claude.json file in your home directory.

VS Code Tips

1. Install the Claude Code extension from the VS Code marketplace
2. The extension automatically picks up MCP servers from ~/.claude.json
3. Use the Claude Code sidebar to interact with the AI assistant
4. Your F&O project context is automatically available to Claude

Troubleshooting

MCP server not starting?

No results returned?

Config file not being read?

Ready to Start?

Get your API key and start using AI-assisted F&O development with Claude Code

Get API Key Back to MCP Server