CoolFace
Apppublic

MCP-1st-Birthday/team-synapse

sourceHugging Faceupdated 10mo agoView on Hugging Face
0likes
App README

Team Synapse – MCP in Action (Track 2)

An agentic Gradio app that analyzes sales meetings, writes to a Neo4j knowledge graph, and uses MCP tools (Neo4j + Miro) to reason, plan, and execute.

  • Track tag: "mcp-in-action-track-enterprise"
  • Bonus areas: Context engineering (agent tool reasoning + knowledge graph), visual workflow (Miro), RAG-like graph querying

🎬 Watch Demo Video

🔗 Connect

![LinkedIn Post](https://www.linkedin.com/posts/ajay-singh-dev_team-synapse-meddpicc-a-hugging-face-space-activity-7401045965266415616-5ZNG)


Quick Start (Local)

Prereqs: Python 3.10+, Neo4j 5.x, Miro API token and a board.

1) Install dependencies

python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt

2) Set environment

# Tenant / demo
export TEAM_SYNAPSE_TENANT_ID=demo

# Neo4j
export NEO4J_URI=bolt://localhost:7687
export NEO4J_USER=neo4j
export NEO4J_PASSWORD=your_password
export NEO4J_DATABASE=neo4j

# Gemini / Google
export GOOGLE_API_KEY=your_key

# Miro (optional but recommended for Track 2 visual action)
export MIRO_API_TOKEN=your_miro_token
export MIRO_BOARD_ID=your_board_id

# Use real MCP server as tools (Track 2 requirement)
export USE_MCP_SUBPROCESS=true

3) Run the app

python3 app.py

Open the Gradio URL and upload a sample audio file. The app will:

  • Transcribe + analyze with Gemini
  • Store insights in Neo4j
  • Run the MEDDPICC agent that uses MCP tools to query the graph and create visual notes in Miro

MCP Tools

We provide a real FastMCP server (mcpserver.py) and an in-process DirectToolExecutor fallback for Spaces. To meet Track 2 (“use MCP servers as tools”), set `USEMCP_SUBPROCESS=true`.

  • query_graph → Neo4j read (MATCH-only security)
  • add_node → Create a graph node AND (optionally) auto-link to a client/meeting via relationship
  • link_node → Attach any existing node to a client/meeting
  • findmissingroles → MEDDPICC gap detection (Kill Shot)
  • postriskto_miro → Create a sticky note (supports annotations: layoutSlot, clientName, meetingId, nodeId)
  • read_board → List board items
  • connect_items → Draw connector between two Miro items

Testing

  • Quick test: python3 test_mcp_tools.py (skips write ops by default; reads board if MIRO_* env vars set)
  • Manual Miro test:
python -q <<'PY'
from mcp_tools import create_sticky_note
print(create_sticky_note("Track 2 test", "red", 0, 0))
PY

Deploy to Hugging Face Spaces

1. Create Space

Go to huggingface.co/new-space → SDK: Gradio

2. Push code

bash
git remote add hf https://huggingface.co/spaces/YOUR_USERNAME/team-synapse
git push hf main

3. Add Secrets (Settings → Repository secrets)

SecretValue
VERTEX_PROJECT_IDYour GCP project ID
VERTEX_LOCATIONus-central1
GCS_BUCKET_NAMEYour GCS bucket name
GOOGLE_APPLICATION_CREDENTIALS_JSONFull JSON content of service account key
NEO4J_URIneo4j+s://xxx.databases.neo4j.io
NEO4J_USERNAMEneo4j
NEO4J_PASSWORDYour password
MIRO_API_TOKENYour Miro token
MIRO_BOARD_IDYour board ID
Note: For Google credentials, paste the entire JSON file content into GOOGLE_APPLICATION_CREDENTIALS_JSON. The startup.py script handles writing it to a temp file.

HF Space Submission Checklist

  • [ ] Publish as a Space under the event org
  • [ ] README includes tag: "mcp-in-action-track-enterprise"
  • [ ] Demo video (1–5 min) showing: agent gap detection, graph queries, Miro actions
  • [ ] Social media post link in this README
  • [ ] Team members listed (HF usernames) if applicable

Notes on Context Engineering

  • Agent system prompts enforce “reason before tool calls” and limit tool loops
  • Graph-first orchestration: client-centric model, MEDDPICC elements, and explicit linking for new nodes

Troubleshooting

  • Neo4j “Collections containing null values…” → We sanitize lists before storage in services/neo4j_service.py
  • Miro not creating items → Verify MIROAPITOKEN and MIROBOARDID. Use get_board_items() to confirm access
  • Real MCP mode not connecting → Ensure USE_MCP_SUBPROCESS=true and that Python can spawn subprocesses in your environment