Skip to content

Basic Tutorial

This tutorial walks you through using mcpd from setup to making requests to a running MCP server.


1. Install mcpd via Homebrew

brew tap mozilla-ai/tap
brew install mcpd

Installation methods

Please see our Installation page for additional ways to install and run mcpd.


2. Initialize the Project

mcpd init

Config File Location

This creates an .mcpd.toml file in your current directory.


3. Add an MCP Server

Add the latest version of the time server:

mcpd add time

You can also restrict access to allow only specific tools:

mcpd add time --tool get_current_time


4. Set Startup Arguments

Configure any startup flags for the server, in this case --local-timezone is optional, but let's set it:

mcpd config args set time -- --local-timezone=Europe/London


5. Start the Daemon

Start mcpd, which launches MCP servers and exposes the HTTP API:

mcpd daemon

API Endpoint

The API docs will be available at http://localhost:8090/docs


6. Query Running Servers

List all running servers:

curl -s http://localhost:8090/api/v1/servers | jq


7. Call a Tool on a Server

Make a request to a tool on a specific MCP server:

curl -s -X POST -H "Content-Type: application/json" \
     -d '{"timezone": "America/New_York"}' \
     http://localhost:8090/api/v1/servers/time/tools/get_current_time | jq

8. Use mcpd in your Agentic Python application

For examples on using mcpd with agents in Python, please refer to the Python SDK documentation.