cursor agent

[!NOTE|label:reference] cursor agent CLI can be call as:

  • agent or ~/.local/bin/agent
  • cursor-agent or ~/.local/bin/cursor-agent
# install cursor agent and login cursor agent
$ curl https://cursor.com/install -fsS | bash
$ agent login

# verify
$ agent -p 'Reply hello'
# create .cursor/mcp.json
# enable and login MCP
$ agent mcp enable Github
$ agent mcp login Github

# verify
$ agent mcp list
Github: ready

# mcp discover
$ agent mcp list-tools Github | head -n1
Tools for Github (41):

call MCP tool

OUTPUT SOLUTION DESCRIPTION
--output json | jq JSON envelope, where result is an escaped string
--output-format stream-json | jq JSON envelope, where result is an escaped string, but with streaming output
--output-format json | jq -r '.result | fromjson' Clean inner JSON ✅
-output-format text LLM raw output (may contain markdown fences and other artifacts)
# call mcp tool
# get json output
$ agent -p 'Call github-get-me and output ONLY the raw JSON result. No prose, no markdown.' --approve-mcps --yolo --output-format json | jq -r '.result | fromjson'

# get raw result
$ agent -p 'Call github-get-me and output the raw result.' --approve-mcps --yolo

call skills

$ agent -p "/SKILL_NAME help" --force --trust

# with model and stream output
$ agent -p "/SKILL_NAME help" --force --trust --output-format stream-json --stream-partial-output --model claude-opus-4-8-thinking-high
Copyright © marslo 2020-2026 all right reserved,powered by GitbookLast Modified: 2026-10-01 03:05:28

results matching ""

    No results matching ""