fo-semantic-mcp Setup for Claude Code
Configure the MCP server with Claude Code CLI and VS Code Extension
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
-
Locate Your Claude Code Config File
Claude Code stores its MCP configuration in
.claude.jsonin your home directory:Windows:
C:\Users\<YourName>\.claude.jsonmacOS / Linux:
~/.claude.jsonFile doesn't exist?
If the file doesn't exist, create it. Claude Code will use this file for MCP server configurations.
-
Get Your API Key
Sign in to xplusplus.ai and get your API key from the dashboard.
Get API Key -
Add MCP Server Configuration
Open your
.claude.jsonfile 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) -
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.
- CLI: Close and reopen your terminal, then run
-
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:
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:
PowerShell command to find it:
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?
- Ensure Node.js 18+ is installed
- Check that npx is in your PATH
- Verify your API key is correct
- Make sure the JSON syntax is valid (use a JSON validator)
No results returned?
- Try lowering the FO_THRESHOLD value (e.g., 0.5)
- Check your API key has available quota
- Try a simpler search query
Config file not being read?
- Ensure the file is named exactly
.claude.json(with the leading dot) - Check that it's in your home directory, not the project folder
- Restart Claude Code completely after making changes
Ready to Start?
Get your API key and start using AI-assisted F&O development with Claude Code