Cargando...
Buscando...
Nada coincide
Referencia del directorio ConfigClaude

Descripción detallada

Problem: "Unexpected token 'C'" JSON Errors

When using dotnet run, the .NET CLI outputs build information and file paths to stdout, which interferes with the MCP JSON-RPC protocol that requires clean JSON communication.

Solution

Use the compiled executable directly instead of dotnet run.

Configuration Steps

  1. Build the project in Release mode (recommended for production):
    dotnet build -c Release
  2. Update your Claude Desktop config at:
    • Windows: APPDATA%\Claude\claude_desktop_config.json
    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  3. Use this configuration:

    {
    "mcpServers": {
    "Sage50ES-server": {
    "command": "C:\\dev\\GitHub\\Sage.ES.S50.MCP\\Sage.ES.S50.MCP\\bin\\Release\\net8.0\\Sage.ES.S50.MCP.exe",
    "args": []
    }
    }
    }

    For Debug builds, use:

    {
    "mcpServers": {
    "Sage50ES-server": {
    "command": "C:\\dev\\GitHub\\Sage.ES.S50.MCP\\Sage.ES.S50.MCP\\bin\\Debug\\net8.0\\Sage.ES.S50.MCP.exe",
    "args": []
    }
    }
    }
  4. Restart Claude Desktop completely to apply changes.

Why This Works

Debugging

If you still see errors, check the logs in:

C:\dev\GitHub\Sage.ES.S50.MCP\Sage.ES.S50.MCP\bin\Debug\net8.0\Logs\erp-server-YYYY-MM-DD.log

Available Tools

The MCP server exposes these tools to Claude:

Connection String

Make sure appsettings.json has the correct connection string for your Sage 50 database.

Email Configuration

To use the email functionality, configure SMTP settings in appsettings.json:

{
"SmtpSettings": {
"Host": "smtp.gmail.com",
"Port": 587,
"EnableSsl": true,
"FromEmail": "your-email@gmail.com",
"Username": "your-email@gmail.com",
"Password": "your-gmail-app-password"
}
}

Note: For Gmail, use an App Password instead of your regular password. See EnviarEmail.md for detailed setup instructions.