MCP Integration Guide

How to connect AI clients to Pharos and start querying your ERP data.


Prerequisites

Before connecting, ensure you have:

  • A running Pharos instance (on-premise or hosted)
  • A valid bearer token (see Authentication)
  • An MCP-compatible AI client

Connecting Claude Desktop

Add Pharos to your Claude Desktop MCP configuration:

{
  "mcpServers": {
    "pharos": {
      "command": "curl",
      "args": ["-s", "https://pharos.your-domain.com/mcp"],
      "env": {
        "PHAROS_TOKEN": "your-bearer-token"
      }
    }
  }
}

Restart Claude Desktop. Pharos tools will appear in the tool list automatically.

Connecting Custom Applications

For custom AI applications, connect via HTTP:

# Discover available tools
curl -s https://pharos.your-domain.com/mcp/tools \
  -H "Authorization: Bearer $PHAROS_TOKEN"

# Call a specific tool
curl -s -X POST https://pharos.your-domain.com/mcp/tools/schema_search \
  -H "Authorization: Bearer $PHAROS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"query": "customer"}'

Tool Discovery

When an AI client connects, it can request a list of all available tools:

{
  "tools": [
    {
      "name": "schema_search",
      "description": "Search for database tables matching a keyword",
      "inputSchema": {
        "type": "object",
        "properties": {
          "query": { "type": "string", "description": "Search keyword" }
        },
        "required": ["query"]
      }
    }
  ]
}

The AI uses these descriptions to decide which tool to call for a given question. You don't need to tell it which tool to use; it figures that out from context.

Testing Your Connection

Verify connectivity with a simple schema search:

curl -s -X POST https://pharos.your-domain.com/mcp/tools/schema_search \
  -H "Authorization: Bearer $PHAROS_TOKEN" \
  -d '{"query": "inventory"}'

A successful response returns matching tables with descriptions and row counts. If you get a 401 error, check your bearer token. If you get a connection error, verify your Pharos instance is running and accessible.

Next Steps

We use cookies to understand how visitors interact with our site.