CoCounsel Standalone — Customer Insights Tool MCP
FastAPI backend + MCP server for CoCounsel Standalone (Core/Web) customer insights data sources.
Architecture
┌─────────────────────────────────────────────────┐
│ Claude Desktop │
│ - User conversation interface │
│ - Synthesizes final answers from theme data │
└────────────────┬────────────────────────────────┘
│ MCP Protocol (stdio)
▼
┌─────────────────────────────────────────────────┐
│ MCP Server (mcp_server_standalone.py) │
│ - 11 MCP tools (6 source-specific + 5 utility) │
│ - HTTP client to FastAPI backend │
│ - Port 8766 │
└────────────────┬────────────────────────────────┘
│ HTTP (localhost:8766)
▼
┌─────────────────────────────────────────────────┐
│ FastAPI Backend (cit/api/main.py) │
│ - 6 data pipeline modules │
│ - Snowflake Cortex Search integration │
│ - OpenArena WebSocket LLM gateway │
│ - SSE streaming for real-time progress │
└─────────────────────────────────────────────────┘
Data Sources (6)
| # | Source | Service | Filter | Citation URLs |
|---|---|---|---|---|
| 1 | Gong Calls | COCOUNSEL_VOC_SEARCH_SVC |
None (shared, contextual) | ✅ CALL_RECORDING |
| 2 | NPS | COCOUNSEL_NPS_SEARCH_SVC |
NPS_SOURCE="General" |
❌ Dashboard only |
| 3 | Skills Feedback | COCOUNSEL_SKILLS_SEARCH_SVC |
None (Standalone-only) | ❌ Dashboard only |
| 4 | Cases | COCOUNSEL_CASES_SEARCH_SVC |
ESC_PRODUCT_TITLE_C != "CoCounsel Drafting" |
❌ Case ID only |
| 5 | Teams Messages | COCOUNSEL_TEAMS_SEARCH_SVC |
CHANNEL_NAME IN ("Core Product Feedback", "Core Product Support") |
✅ WEB_URL |
| 6 | SharePoint VOC | COCOUNSEL_SHAREPOINT_SEARCH_SVC |
None (Standalone-only) | ✅ FILE_URL |
Quick Start
1. Install Dependencies
cd cocounsel_standalone_mcp
python3 -m venv .venv
source .venv/bin/activate # or .venv\Scripts\activate on Windows
pip install -r requirements.txt
pip install -r requirements-mcp.txt
2. Configure Environment
cp .env.example .env
# Edit .env with your Snowflake & ESSO credentials
3. Start Backend
./run_standalone.sh
Verify:
curl http://127.0.0.1:8766/health
# Expected: {"status":"ok","product":"standalone"}
4. Configure Claude Desktop
Edit ~/.config/Claude/claude_desktop_config.json (Linux/Mac) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"cit-standalone": {
"command": "/absolute/path/to/.venv/bin/python",
"args": ["/absolute/path/to/cocounsel_standalone_mcp/mcp_server_standalone.py"],
"env": {
"CIT_API_BASE": "http://127.0.0.1:8766",
"CIT_MCP_TIMEOUT": "200",
"SNOWFLAKE_ACCOUNT": "a206448_prod.us-east-1",
"SNOWFLAKE_USER": "[email protected]",
"SNOWFLAKE_PAT": "your-token",
"ESSO_TOKEN": "your-esso-token",
"WS_WORKFLOW_ID": "04d8d46e-0806-4653-b8ba-e718d919c567"
}
}
}
}
Restart Claude Desktop (quit completely, not just close).
5. Test
Click the tools icon (hammer) in Claude Desktop — you should see 6+ CIT tools:
search_gong_datasearch_nps_datasearch_skills_feedback_datasearch_cases_datasearch_teams_datasearch_sharepoint_datacit_health_check
Test prompt:
Check the health of the CIT system.
MCP Tools
Source-Specific Tools (6)
| Tool | Description |
|---|---|
search_gong_data |
Sales & customer call transcripts |
search_nps_data |
NPS feedback (General/Standalone) |
search_skills_feedback_data |
Skills feedback (Pendo) |
search_cases_data |
Support cases (excludes Drafting) |
search_teams_data |
Teams Core channel feedback |
search_sharepoint_data |
Customer interviews & VOC docs |
Utility Tools
| Tool | Description |
|---|---|
cit_health_check |
Check backend health |
Test Prompts
Single Source Queries
1. "What are the top pricing objections in Gong calls about CoCounsel Core?"
2. "What are the main NPS complaints for CoCounsel Standalone?"
3. "Which skills are users rating lowest?"
4. "What are the most common support cases for CoCounsel Core?"
5. "What feedback came through Core Product Feedback channel this month?"
6. "What themes emerged from VOC customer interviews?"
Multi-Source Query
7. "Compare NPS feedback and Gong calls about ease of use for CoCounsel Standalone."
Project Structure
cocounsel_standalone_mcp/
├── cit/
│ ├── api/
│ │ ├── main.py # FastAPI app entry point
│ │ ├── schemas.py # Pydantic request/response models
│ │ └── routers/
│ │ └── query.py # Query router with SSE streaming
│ ├── pipelines/
│ │ ├── standalone_gong.py # Gong calls (no filter)
│ │ ├── nps.py # NPS (filtered: General)
│ │ ├── skills.py # Skills (Standalone-only)
│ │ ├── cases.py # Cases (filtered: exclude Drafting)
│ │ ├── standalone_teams.py # Teams (filtered: Core channels)
│ │ └── standalone_sharepoint.py # SharePoint (Standalone-only)
│ ├── services/
│ │ ├── snowflake_conn.py # Snowflake connection management
│ │ ├── legacy.py # Cortex Search wrapper
│ │ ├── llm_gateway.py # OpenArena WebSocket LLM client
│ │ └── utils.py # Shared pipeline utilities
│ ├── core/
│ │ ├── errors.py # Custom exceptions
│ │ └── events.py # SSE event helpers
│ ├── config.py # Standalone-specific constants
│ └── settings.py # Environment variable loader
├── mcp_server_standalone.py # MCP server (stdio transport)
├── requirements.txt # Python dependencies
├── requirements-mcp.txt # MCP-specific dependencies
├── .env.example # Environment template
├── run_standalone.sh # Start script
└── claude_desktop_config_standalone.json # Claude Desktop config template
Troubleshooting
Tools don't appear in Claude Desktop
- Check Claude Desktop was fully quit and relaunched
- Verify config JSON is valid (use jsonlint.com)
- Check paths are absolute and correct
- Run server manually to see errors:
cd /path/to/cocounsel_standalone_mcp source .venv/bin/activate CIT_API_BASE=http://127.0.0.1:8766 python mcp_server_standalone.py
Cannot connect to CIT API
- FastAPI server (step 3) must be running
- Confirm:
curl http://127.0.0.1:8766/health - Check
CIT_API_BASEin Claude Desktop config matches port
Query timeout
- Increase
CIT_MCP_TIMEOUTin Claude Desktop config (e.g.,"240") - Default is 200 seconds
Support
Team: Product Analytics Yugendar Sairam — [email protected] Ashish Khurana — [email protected]