Project
Sourcegraph GTM Assistant
A stateless MCP server on Cloud Run that gives any authenticated Sourcegraph employee, through claude.ai, one tool surface over curated per-account research (GCS corpus) and live internal data (Salesforce, Looker, PostHog, HubSpot via cost-safeguarded databot), spanning account discovery, intelligence, lead scoring, and voice-checked outreach drafting.
PythonAgentsSlackLLM
The connector is a stateless streamable-HTTP MCP server (Python, Starlette ASGI, deployed as the account-mcp service on Cloud Run) that exposes Sourcegraph’s GTM account-intelligence surface to any MCP client, primarily claude.ai. Architecturally it is a thin transport-and-identity shim over a shared ToolDispatcher that the internal Slack bot also drives, so the two surfaces stay behavior-identical. The security boundary is authentication, not authorization: the server is an OAuth 2.0 protected resource (RFC 9728) that advertises Google as its authorization server, so the claude.ai connector runs the login flow directly against the Sourcegraph Google Workspace using a pre-registered client (this sidesteps Google’s lack of dynamic client registration). Every request must carry a bearer token that a middleware verifies and domain-locks to sourcegraph.com; the verified email becomes the caller’s identity via ae_from_email, and identity is never taken from tool arguments. There is deliberately no per-account scope gate. Any authenticated employee can read any account, including PII, because people legitimately work accounts outside their own book. The server runs in stateless mode with JSON responses specifically so it survives Cloud Run redeploys and scale-out, where a session pinned to one instance would 400 the moment a request lands elsewhere.
The data model is two-tiered. The curated tier is a GCS-backed corpus split across two buckets, one with no PII and one with PII, both readable by any authenticated employee. Per-account artifacts are keyed by a domain slug: research-brief.md, evidence.json, and status.yaml plus the marketing brief live in the public bucket, while contacts.json, per-contact persona-
Capability-wise the tool catalog covers the full account-to-outreach loop. Discovery and firmographics: lookup_account (SFDC record and customer/prospect/open-opp status for any domain, on the priority list or not), list_priority_accounts, list_enriched_accounts, accounts_by_owner, and accounts_by_segment. Curated context: get_account_intel, get_playbook, get_persona_brief, and get_contacts. Live analysis: databot_query for pipeline, ARR, product usage, cohorts, and cross-account trends. Marketing and outreach: rank_leads for scoring event or webinar lists by ICP fit, draft_outreach and get_outreach_drafts, plus campaign and per-account asset retrieval (get_account_asset, list_account_assets, get_campaign_content). Two behavioral contracts are worth flagging for anyone extending it. All customer-facing copy must go through draft_outreach and be relayed verbatim, since hand-written prose bypasses the house voice, cleared-customer rules, and anchor contract. And any tool result carrying web-scraped or CRM free-text is fenced as untrusted, to be read as data and never as instructions. Connector-level routing guidance ships in the MCP initialize result’s instructions field, so the model gets always-on “how to use this connector” context without the caller first opening a curated Project.