eGain/egain-mcp-server
If you are the rightful owner of egain-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
Model Context Protocol (MCP) Server for the eGain API.
eGain MCP Server
Model Context Protocol (MCP) Server for the egain-mcp-server.
Overview
This server implements the Model Context Protocol (MCP) for eGain Knowledge, exposing Portal Manager, Search, Retrieve, and Answers as a single MCP endpoint for AI clients.
It enables tools like Claude Desktop, Cursor, and VS Code to browse portals, read articles, search knowledge, submit suggestions, and generate AI-powered answers — all using the user’s existing eGain permissions.
⚠️ This MCP server is built exclusively for eGain v4 APIs. Earlier API versions are not supported. For more details about the v4 APIs, visit our developer portal.
https://github.com/user-attachments/assets/1b6c8aab-eb50-4f9e-8dfc-2a9ac4fb6518
Learn more about the tools and usage of the MCP in the eGain MCP guide.
Prerequisites
- Node.js 20+ (required to run the MCP server)
- eGain platform version 21.22 or newer
- AI Services enabled for the tenant and target portal
- Knowledge portal and article content available
- Supported browser: Chrome, Edge, or Brave
- A PKCE-friendly client application in your eGain tenant
ℹ️ MCP access always mirrors the authenticated user’s permissions (portal and article visibility).
Installation
https://github.com/user-attachments/assets/2cecc8ff-6a90-4c26-92e1-6720f9124297
Step 1: Configure your MCP client (Cursor, Claude Desktop, Windsurf, VS Code, etc.) with the following:
Note: Replace "..." with your API domain (instructions in Step 2).
{
"mcpServers": {
"EgainMcp": {
"command": "npx",
"args": [
"@egain/egain-mcp-server",
"start",
"--api-domain",
"..."
]
}
}
}
Step 2: Find your API domain using the eGain Administrator Console
- Sign in as a Partition Admin → go to
Partition→Integration→Client Application. - Click
Metadata. The valueAPI Domainis detailed in the window.
Please contact your eGain PA if you do not have access to these admin-only details.
That's it! The MCP server will be automatically downloaded and run when needed.
If you're having trouble configuring your MCP client, see these detailed guides:
- Claude quick-start and example queries:
- Cursor quick-start and example queries:
Step 3: Make a query and authenticate
Once you've set up the server on your client, run your first eGain MCP query and a browser window will popup for authentication.
Requirements for authentication:
- A PKCE-friendly client application (SPA platform type recommended)
- A supported browser (Chrome, Edge, or Brave — Safari is not supported)
- Delegated API permissions in your client app:
knowledge.portalmgr.manageknowledge.portalmgr.readcore.aiservices.read
You'll need to enter your authentication configuration values in the browser form. For a tutorial, see the . Please contact your eGain PA if you do not have access to client application settings.
🆘 Having Issues?
Start here — most problems are covered in the FAQ:
- Authentication issues →
- Configuration issues →
- MCP tool issues →
Token issues (expired or stuck)
If authentication fails after it previously worked, delete cached token files and retry:
# Search your home directory for both token files
find ~ -name ".bearer_token*" 2>/dev/null
# Remove both token files
rm /path/to/.bearer_token*
Debugging
Use the MCP Inspector for interactive testing:
npx @modelcontextprotocol/inspector npx @egain/egain-mcp-server start --api-domain "..."
Resources & Support
Help Guides
Contact
- Issues: GitHub Issues
- eGain Support: Support Portal
- MCP Support: eloh@egain.com
MCP Server Created by Speakeasy