CLI for Endgame's public MCP v1 endpoint.
Build locally:
go build -o endgame .Install from source:
go install github.com/Endgame-Labs/endgame-cli@latestCheck the build metadata:
endgame versionAuthenticate:
endgame auth
endgame auth login
endgame auth statusendgame auth and endgame auth login prompt for a login method when run interactively:
- browser login on this machine
- device-code login for a remote or separate browser session
You can also select the mode explicitly:
endgame auth login --mode browser
endgame auth login --mode deviceIf the CLI is running on a remote server and you use browser mode, forward the callback port first:
ssh -L 8788:127.0.0.1:8788 <server>Then run endgame auth login --mode browser --callback-port 8788.
List available MCP tools:
endgame tools --helpRun a few commands:
endgame tools find_person --json '{"search_query":"Sarah Chen"}'
endgame tools fetch_knowledge_documents --account-id VENDOR --filename battlecard
endgame tools search_vendor_documents --query "security questionnaire" --max-results 5
endgame tools web_search --json '{"query":"Acme pricing page"}'Most tools take their MCP input object via --json or piped stdin:
echo '{"query":"pricing preferences"}' | endgame tools search_user_preferencesAuthentication uses OAuth against the public Endgame auth server.
endgame authprompts for browser login or device-code login when run in an interactive terminalendgame auth login --mode browser|deviceselects the login flow explicitly- browser login discovers metadata from
https://app.endgame.io/.well-known/oauth-authorization-server - the CLI dynamically registers a public OAuth client
- browser login completes with authorization code + PKCE on a localhost callback
- device login uses the production Connect device flow on
https://login.endgame.io/oauth2/device_authorization - device login requests
openid profile email offline_access - refreshable OAuth tokens are stored in
~/.endgame-auth.json endgame auth statusverifies the saved token set against MCP
For repeated CLI use, including agent-heavy workflows, the CLI does not refresh on every command and does not run a background daemon:
- it reuses the cached access token until it is within a 2 minute refresh window
- if
expires_inis missing, it derives expiry from the JWTexpclaim - if the token is near expiry, it refreshes once before the request
- refresh token rotation is persisted back to
~/.endgame-auth.json - if MCP returns
401 invalid_token, it forces one refresh and retries once - login fails immediately if no refresh token is returned, instead of saving a token set that will break later
This was soak-tested with repeated authenticated CLI queries over 30 minutes, including crossing the original access-token expiry boundary and observing successful token rotation on disk.
There are no required auth environment variables. endgame thread env reports ENDGAME_TIMEOUT_SECONDS when set.
Top-level commands:
auth
thread
tools
version
whoami
endgame thread new --prompt "What deals closed this week?"
echo "What deals closed this week?" | endgame thread new
endgame thread continue --thread-id <thread-id> --prompt "What changed since yesterday?"
endgame thread followup <operation-id>
endgame thread envThe CLI exposes MCP tools directly as:
endgame tools <mcp_tool_name>Current raw MCP tool names:
fetch_knowledge_documents
find_person
find_relevant_documents
get_document
get_interaction_history
get_person_details
get_user_preferences
news_search
query_data
query_dataset
research_company
search_datasets
search_document_insights
search_knowledge_articles
search_meetings
search_my_meetings
search_people
search_salesforce_notes
search_slack_messages
search_user_preferences
search_vendor_documents
summarize_earnings_calls
web_search
Tool descriptions below are based on the live MCP tools/list response from the Endgame server.
People:
find_person: Look up a specific person by name, email address, Salesforce ID, LinkedIn profile ID, or Endgame Person ID. Accepts an optionalaccount_idto scope the search to a specific account.get_person_details: Load detailed profile data for one or more people by Endgame person ID. Accepts an optionalaccount_idto scope results to a specific account.search_people: Search for people at a target company using multiple data sources with filtering and pagination. Accepts an optionalaccount_idto scope results to a specific account.
Documents and knowledge:
fetch_knowledge_documents: List knowledge documents with metadata, previews, and pagination support.find_relevant_documents: Automatically find vendor knowledge documents relevant to a raw user message.get_document: Fetch the full content of a specific document by ID.search_document_insights: Search extracted facts and insights across all document types. Accepts an optionalaccount_idto scope results to a specific account.search_knowledge_articles: Search synthesized knowledge articles about customers and topics. Accepts an optionalaccount_idto scope results to a specific account.search_vendor_documents: Search vendor knowledge documents using semantic and keyword matching.
Meetings, interactions, and notes:
get_interaction_history: Retrieve chronological meeting and email history across one or more accounts, or for a specific person. Accepts an optionalaccount_idto scope results to a specific account.search_meetings: Search meetings, calls, and emails across the organization. Accepts an optionalaccount_idto scope results to a specific account.search_my_meetings: Search meetings, calls, and emails where the current user is a participant.search_salesforce_notes: Fetch Salesforce notes and activity history. Accepts an optionalaccount_idto scope results to a specific account.search_slack_messages: Fetch Slack messages. Accepts an optionalaccount_idto scope results to a specific account.
Preferences and memory:
get_user_preferences: Retrieve the current user's core preferences and standing instructions.search_user_preferences: Search the current user's contextual memories and situational preferences semantically.
Research and external search:
news_search: Search Google News for editorial coverage within a date range.research_company: Research one or more companies and return structured answers with quotes and source URLs.web_search: Search the public web via Google for pages, snippets, sources, and published dates.
Analytics and datasets:
query_data: Convert natural-language questions into SQL against the organization's warehouse data.query_dataset: Query uploaded structured datasets with natural language.search_datasets: Discover which structured datasets are available in the organization.
Earnings:
summarize_earnings_calls: Retrieve and summarize earnings call transcripts across one or more accounts. Accepts an optionalaccount_idto scope results to a specific account.
Invocation styles:
- First-class flagged commands:
fetch_knowledge_documentsget_documentsearch_vendor_documents
- Generic JSON commands:
- pass the MCP input object with
--json '{...}' - or pipe the JSON object on stdin
- pass the MCP input object with
Example generic call:
endgame tools search_meetings --json '{"account_ids":["001..."],"start_date":"2026-04-01","end_date":"2026-04-30"}'First-class flagged commands:
endgame tools fetch_knowledge_documents --account-id VENDOR --filename battlecardFlags:
--account-idrepeatable--after-date--before-date--content-type--filename--page-offset
endgame tools get_document --account-id VENDOR --document-id abc123defFlags:
--account-idrequired--document-idrequired--document-typedefaults toknowledge_document
endgame tools search_vendor_documents --query "security questionnaire" --max-results 5Flags:
--queryrequired--max-resultsdefaults to5
Generic examples:
endgame tools find_person --json '{"search_query":"Sarah Chen"}'endgame tools search_people --json '{"account_id":"001...","areas":["crm_contacts"]}'endgame tools search_meetings --json '{"account_ids":["001..."],"start_date":"2026-04-01","end_date":"2026-04-30"}'endgame tools query_data --json '{"messages":[{"user_message":"show top 10 accounts by ARR"}]}'endgame tools search_document_insights --json '{"search_sentences":["security questionnaire","redlines"]}'echo '{"query":"pricing preferences"}' | endgame tools search_user_preferencesendgame version prints the CLI version, commit, and build date.
For tagged builds, inject build metadata with -ldflags:
go build -ldflags "\
-X github.com/Endgame-Labs/endgame-cli/pkg/buildinfo.Version=v0.1.0 \
-X github.com/Endgame-Labs/endgame-cli/pkg/buildinfo.Commit=$(git rev-parse --short HEAD) \
-X github.com/Endgame-Labs/endgame-cli/pkg/buildinfo.Date=$(date -u +%Y-%m-%dT%H:%M:%SZ)"main.gois the entrypointcmd/contains Cobra commandspkg/auth/contains OAuth login, token persistence, and refreshpkg/endgame/contains the MCP transport and tool invocation logicpkg/buildinfo/contains build metadata used byendgame version