advocatehub-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@advocatehub-mcp list all active members in the 'Gold' group"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
advocatehub-mcp
A Model Context Protocol server for
Influitive AdvocateHub, built entirely on the
public Influitive REST API (api.influitive.com / api.influitives.com in
staging). This is Phase 1: no hub source changes, no internal endpoints —
everything here is something any AdvocateHub customer could build against
their own API token.
What it does
55 org-token tools (members, groups, challenges, events, rewards, approvals,
referrals, references, webhooks, messages, integrations, and more) plus
25 individual-user SSO / JWT self-service tools (sso_login, whoami,
sso_logout, and 22 my_* tools covering profile, groups, challenges, rewards,
activity, notifications, badges/achievements, and social auth). Org-token writes
are confirm-gated and audit-logged; SSO tools sign a human into their own hub
account via a real browser and call the hub as them, separate from the org-wide
API token.
Tool surface (HTTP-first): streamable HTTP defaults to the gateway surface
(~20 category tools). Set header X-Advocatehub-Tool-Surface: granular for the full
~83 granular catalog (e.g. Cursor). Claude Desktop is auto-detected from MCP
initialize clientInfo. Stdio defaults to granular unless
ADVOCATEHUB_TOOL_SURFACE=gateway. See docs/tool-reference.md
for gateway actions and docs/setup-claude.md for setup.
Related MCP server: hubspot-mcp
Status
P1a (stdio, for Claude Desktop/Code): done. See docs/setup-claude.md.
P1b (streamable HTTP, for ChatGPT / remote clients): done, needs a staging smoke pass. See docs/setup-chatgpt.md.
Individual-user SSO/JWT self-service (
sso_login/whoami/sso_logout+ 22my_*tools, seesrc/tools/myAccount.tsandsrc/tools/sso.ts): done for stdio only. See docs/setup-sso.md. Not yet available on the streamable HTTP transport.Target environment so far: staging (
https://api.influitives.com). Production support is a config change (X-Influitive-Base-Urlheader orINFLUITIVE_BASE_URLenv var tohttps://api.influitive.com) — re-run the staging smoke checklist against production before trusting it there.
Optimization roadmap
File-grounded improvement plans by credential model:
Org token + org id (integration / admin bot): docs/optimization-plan-org-token.md
Individual JWT / SSO (self-service, signed-in human): docs/optimization-plan-jwt-sso.md
Both credentials (hybrid stdio deployments): docs/optimization-plan-hybrid.md
See also JWT_INDIVIDUAL_USER_AUTH_CAPABILITY_MATRIX.md for what each credential can and cannot do today.
Quick start (HTTP — recommended)
npm install
npm run build
npm run start:http # listens on PORT (default 8787), no credentials neededPoint your MCP client at http://localhost:8787/mcp with per-connection headers:
{
"mcpServers": {
"advocatehub": {
"type": "http",
"url": "http://localhost:8787/mcp",
"headers": {
"Authorization": "Bearer <INFLUITIVE_API_TOKEN>",
"X-Influitive-Org-Id": "<ORG_ID>",
"X-Influitive-Base-Url": "https://api.influitives.com"
}
}
}
}See docs/setup-claude.md and docs/setup-chatgpt.md
for Claude Desktop, Claude Code (claude mcp add --transport http), and ChatGPT setup.
See docs/usage-guide.md for credential modes and which tools each auth type exposes.
Quick start (stdio)
npm install
npm run build
npm run start # or point your client's config at dist/src/index.jsSupply credentials via client env vars (INFLUITIVE_API_TOKEN, INFLUITIVE_ORG_ID)
or call the configure_tenant tool at session start. No .env file or setup
wizard required.
Hybrid mode (org token + SSO on one machine)
Use stdio transport and configure both credentials:
# Org-wide integration bot (required for admin tools)
INFLUITIVE_BASE_URL=https://api.influitives.com
INFLUITIVE_API_TOKEN=<from hub Admin -> Integrations -> Influitive API>
INFLUITIVE_ORG_ID=<numeric org id>
# Individual-user SSO (required for sso_login / whoami / my_* tools)
INFLUITIVE_HUB_URL=https://yourhub.influitives.comOr pass hub_url to configure_tenant alongside api_token and org_id.
After configuration, run sso_login once interactively to seed the browser profile. SSO tools do not work on streamable HTTP — see docs/setup-sso.md and docs/optimization-plan-hybrid.md.
Development
npm run dev # tsx watch, stdio
npm run dev:http # tsx watch, streamable HTTP
npm test # unit tests (mocked fetch, no network)
npm run test:integration # opt-in, hits real staging — see .env.example
npm run lint
npm run typecheckRepo layout
src/
index.ts stdio entrypoint (P1a)
http.ts streamable HTTP entrypoint (P1b)
server.ts builds the McpServer and registers all tools
config/ tenant session, HTTP header resolution, env bootstrap, SSO session cache
client/ InfluitiveClient: auth headers, retries, cursor pagination, rate limiting
auth/ HubSsoClient: Playwright-driven individual-user SSO login (see docs/setup-sso.md)
errors/ typed error classes + HTTP status -> error mapping
registry/ local per-tenant index of challenges this server has created
audit/ append-only JSONL write audit log (monthly rotation)
tools/ ~55 org-token tools + configure_tenant + 25 SSO/JWT self-service tools
test/
unit/ fast tests, fetch mocked, no network
integration/ opt-in, mutates a real (disposable) staging tenant
docs/ setup guides, usage guide, tool referenceDesign notes worth knowing before you touch this
Plug-and-play credentials: the server starts unconfigured. HTTP clients pass
Authorization,X-Influitive-Org-Id, and optionallyX-Influitive-Base-Urlper connection. Stdio clients use env vars orconfigure_tenantat runtime.Write safety: every write tool takes a
confirmflag.confirm:false(or omitted) only previews — it never calls the API.confirm:trueexecutes and always appends exactly one entry to the per-tenant audit log (~/.advocatehub-mcp/audit/<orgId>-YYYY-MM.jsonl, with legacy<orgId>.jsonlstill read), whether it succeeded or failed. Seesrc/tools/shared/confirmGate.ts.No raw exceptions cross the MCP boundary. Every tool handler is wrapped so typed errors (
AuthError,NotFoundError, ...) come back as{ isError: true }text, never an unhandled throw. Seesrc/tools/shared/formatters.ts.The public API has no "list challenges" endpoint.
ChallengeRegistry(src/registry/challengeRegistry.ts) is a local, best-effort index of challenges this server created — it does not know about challenges created any other way, and is lost if~/.advocatehub-mcpis wiped.contacts_api_searchis a per-tenant Labs flag. If it's off,/contactssilently ignores filters instead of erroring.search_membersrefuses filtered queries once it knows the flag is off (config.contactsSearchEnabled === false), and self-heals that cache the first time it sees evidence either way. Seesrc/tools/members.ts.Locking a member is seat reclaim, per current product policy: it blocks login and excludes the member from advocate counts, targeting, and the billable seat count.
deactivate_member/reactivate_memberdescribe this explicitly in their tool descriptions so an LLM doesn't undersell what the action does.
Available Tools
5 toolsaudit_searchARead-only
Search executed write audit entries for this tenant. Filter by tool name, actor type (org_token or sso), and optional ISO date range. Reads ~/.advocatehub-mcp/audit/-YYYY-MM.jsonl (and legacy .jsonl).
Inputs: tool, limit, end_at, start_at, +1 more.
audit_tailARead-only
Return the last N executed write audit entries for this tenant from ~/.advocatehub-mcp/audit/-YYYY-MM.jsonl (and legacy .jsonl if present). Only confirm:true writes are logged; previews are excluded.
Inputs: limit.
configure_tenantConfigure AdvocateHub tenant credentialsA
Supplies org-wide API credentials (api_token + org_id) and/or hub_url for SSO. Required before other tools when the server started unconfigured. Org-token tools need api_token + org_id; SSO-only sessions need only hub_url (org id is derived from the JWT after sso_login).
Inputs: org_id, hub_url, base_url, validate, +1 more.
get_active_identity_contextGet active org-token and SSO identity contextARead-only
Reports which credentials are active in this MCP session: org-wide API token (when configured) and individual-user SSO (when hub_url is set or after sso_login). Call before choosing org-token admin tools vs my_* / SSO self-service tools.
Inputs: no named parameters.
list_advocatehub_toolsList all AdvocateHub MCP toolsARead-only
Returns the complete catalog of AdvocateHub MCP tools with names and descriptions. Use this to discover, search, find, or list every available tool when tool_search only shows a subset. Filter by keyword (e.g. "member", "search", "reward", "challenge") or credential scope. No tenant credentials required.
Inputs: query, credential.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
The tools are mostly distinct: list_advocatehub_tools for discovery, configure_tenant for setup, get_active_identity_context for session context. The only potential confusion is between audit_tail and audit_search, but they are differentiated by recency vs. filtered search, and the descriptions clarify the distinction.
All tool names use snake_case and are readable. Most follow a verb_first pattern (list_, configure_, get_), but audit_tail and audit_search place the resource (audit) before the verb, a minor deviation from the otherwise consistent convention.
With five tools, the count falls within the typical 3-15 range and feels reasonable for a utility/admin-focused server. It is slightly on the smaller side given the apparent domain, but not inappropriately sparse.
The server name and list_advocatehub_tools description reference domain objects like members, rewards, and challenges, yet none of the actual tools perform any domain operations. The set is limited to configuration, identity, and audit utilities, leaving the core AdvocateHub functionality completely absent. Even within the meta-purpose, there is no way to modify configuration or manage audit logs beyond reading them.
Related MCP Connectors
One MCP server for all your MCP servers: code mode, per-tool permissions, approvals and audit.
One OAuth connector for your team's remote MCP servers, with Tool Packs, guardrails and logs.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Unified MCP Server is a remote MCP connector for AI agents and vertical AI products that provides access to 22,000+ authorized SaaS tools across 400+ integrations and 24 categories directly inside LLMs (Claude, GPT, Gemini, Cohere). Tools operate only on explicitly authorized customer connections, enabling agents to safely read and write against live third-party systems.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceThe first full-featured MCP server for Adobe Experience Platform: 29 tools across schemas, datasets, profiles, segments, query service, and GDPR/CCPA privacy operations. Extends Adobe's read-only beta with production-grade write operations.167 npm1Apache 2.0
- AlicenseNot gradedqualityDmaintenanceMCP server for the HubSpot CRM API with tools for managing contacts, companies, deals, tickets, and CRM workflows. Generated with MCPForge. Sensitive operations can be protected with permissions, audit logs, and approval workflows.MIT
- FlicenseNot gradedqualityDmaintenanceCustom MCP server for HubSpot CRM providing ICP segmentation, scoring, duplicate detection, Data Quality Score, and lifecycle stage automation. Exposes 39 tools to enhance HubSpot's native capabilities.-
- AlicenseNot gradedqualityCmaintenanceMCP gateway adding per-tool RBAC, tenant isolation, audit export, and PII redaction to any server.MIT