Your first MCP call

By the end you will have called a real MCP tool from your shell — mcpal installed, a reference server registered, a live response back. A lesson, not a reference; follow it top to bottom.

Time: about five minutes once npx is cached.

You will need: a shell, cargo, and npx (Node.js 18+).

1. Install

cargo install --path crates/mcpal
mcpal --version

Output:

mcpal 0.1.1

Prebuilt binaries: GitHub Releases (planned).

2. Register a stdio server

mcpal server add ev -- npx -y @modelcontextprotocol/server-everything

Output:

added server 'ev'

Tokens after -- form the spawned command. ev is the local alias.

3. Verify it speaks MCP

mcpal server ping ev

Output:

ok: true
ref: ev

4. List the server's tools

mcpal tool list ev

The reference server exposes about a dozen tools — echo, get-sum, trigger-long-running-operation, and so on.

5. Call one

mcpal tool call ev echo --message hi

Output:

content:
- type: text
  text: 'Echo: hi'

That round-trip is a real MCP tools/call request and response.

6. Filter the response

mcpal --query 'content[0].text' tool call ev echo --message hi

Output:

'Echo: hi'

--query runs JMESPath on the response before printing.

Next