Skip to main content

Prerequisites

  • WordPress 6.2+ with PHP 8.0+
  • GetMCP plugin installed and activated (Installation Guide)
  • An API you want to expose (or use a public API like OpenWeatherMap for testing)

Step 1: Create a Server

1

Navigate to GetMCP Dashboard

In your WordPress admin sidebar, click GetMCP to open the dashboard.GetMCP Dashboard
2

Click Create Server

Click the Create Server button in the top right corner.
3

Fill in Server Details

Enter a Name (e.g., My Weather Tools) and optionally a Slug (auto-generated from name if left blank). The slug becomes part of your MCP endpoint URL.Click Create to save.

Step 2: Add a Tool

1

Open the Tools Tab

Inside your new server, click the Tools tab.
2

Click Add Tool

Click Add Tool to open the tool editor.
3

Configure the Tool

Fill in the tool details:
  • Name: get_weather (use snake_case — this is how AI clients call it)
  • Description: Get current weather for a city (AI uses this to decide when to call the tool)
  • Endpoint URL: https://wttr.in/{city}?format=j1
  • HTTP Method: GET
Tool Editor
4

Define Input Parameters

In the Input Schema section, add a parameter:
  • Name: city
  • Type: string
  • Required: Yes
  • Description: The city name to get weather for
In Parameter Mapping, set cityPath (it replaces {city} in the URL).
5

Save the Tool

Click Save Tool. Your tool is now configured.

Step 3: Test the Tool

Before connecting an AI client, verify the tool works correctly.
1

Open the Test Panel

On the tool row, click the Test button (or the flask icon).
2

Enter Test Arguments

In the test panel, enter {"city": "London"} as the arguments.
3

Run the Test

Click Run Test. You should see the weather data returned from the API.Tool Test Panel

Step 4: Connect an AI Client

1

Copy the Server URL

On the server detail page, find the MCP Endpoint URL. It looks like:
https://yoursite.com/mcp/my-weather-tools/abc123def456
Copy this URL.
2

Configure Your AI Client

Open claude_desktop_config.json and add:
{
  "mcpServers": {
    "my-weather-tools": {
      "url": "https://yoursite.com/mcp/my-weather-tools/abc123def456"
    }
  }
}
Restart Claude Desktop to apply changes.

Step 5: Use It

Open your AI client and ask it to use your tool:
“What’s the weather like in Tokyo?”
The AI will automatically discover and call your get_weather tool via the MCP protocol. AI Client Using Tool

Next Steps

Authentication

Secure your tools with API keys, Bearer tokens, or OAuth 2.0

Resources & Prompts

Expose static content and reusable prompt templates

Analytics

Monitor tool usage and performance

cURL Import

Import existing API calls directly from cURL commands