Developer Docs

LLM integrations

Connect PinglyMCP to your LLM

PinglyMCP is a remote Streamable HTTP MCP server. OAuth-capable clients can authorize through the MCP flow; this page shows the private-key setup for local clients and API integrations. Give your client the server URL and a PinglyMCP API key, then the model can discover and call tools such as ping.

Before you start

  1. Create a key at Dashboard → API Keys.
  2. Copy the key when it is shown. PinglyMCP stores only its hash.
  3. Use the MCP endpoint below.

MCP endpoint

https://mcp.pinglymcp.com
Start with a read-only tool
The examples below allow only ping, which checks reachability and has no external side effect. Contact actions send real messages and should remain approval-gated in your client.
Keep the API key private
Treat pmcp_ keys like passwords. Do not commit them to source control or paste them into public logs. Use a separate key per client so it can be revoked independently.
Recommended local setup

LM Studio

LM Studio supports remote MCP servers. The simplest persistent setup is to add PinglyMCP to LM Studio's mcp.json.

  1. Open LM Studio and load a model that supports tool use.
  2. Open the Program panel, choose Install, then Edit mcp.json.
  3. Add the PinglyMCP server configuration below and replace pmcp_YOUR_API_KEY.
  4. Save the file and enable the PinglyMCP integration for your chat.
  5. Ask the model something like “Ping example.com and tell me whether it is reachable.”

LM Studio mcp.json

{
  "mcpServers": {
    "pinglymcp": {
      "url": "https://mcp.pinglymcp.com",
      "headers": {
        "Authorization": "Bearer pmcp_YOUR_API_KEY"
      }
    }
  }
}
Using LM Studio through its API?
LM Studio also supports remote MCP integrations in API requests. Enable MCP access in Developer → Server Settings before using per-request or configured MCP servers programmatically.
LM Studio MCP documentation
Python

OpenAI Responses API

OpenAI's Responses API can connect directly to remote MCP servers. The example below gives the model access only to PinglyMCP's ping tool.

1. Install and set credentials

pip install openai

export OPENAI_API_KEY="YOUR_OPENAI_API_KEY"
export PINGLYMCP_API_KEY="pmcp_YOUR_API_KEY"

2. Call PinglyMCP from an OpenAI model

import os
from openai import OpenAI

client = OpenAI()

response = client.responses.create(
    model="gpt-5.6",
    input="Ping example.com and tell me whether it is reachable.",
    tools=[
        {
            "type": "mcp",
            "server_label": "pinglymcp",
            "server_url": "https://mcp.pinglymcp.com",
            "headers": {
                "Authorization": f"Bearer {os.environ['PINGLYMCP_API_KEY']}"
            },
            "allowed_tools": ["ping"],
            "require_approval": "never"
        }
    ]
)

print(response.output_text)
Why this example uses require_approval=never
This setting is safe here because allowed_tools is restricted to ping. If you add contact_website or another external-action tool, keep approval enabled and require a deliberate confirmation before sending.

The OpenAI API key authenticates your request to OpenAI. The separate PINGLYMCP_API_KEY is forwarded only to the PinglyMCP MCP server through the MCP tool configuration.

Python + local model

OpenAI Python SDK with LM Studio

LM Studio exposes an OpenAI-compatible /v1/responses endpoint, so you can reuse the OpenAI Python SDK while running the model locally. Enable Remote MCP in LM Studio's Developer settings first.

import os
from openai import OpenAI

client = OpenAI(
    base_url="http://localhost:1234/v1",
    api_key="lm-studio"
)

response = client.responses.create(
    model="YOUR_LM_STUDIO_MODEL_ID",
    input="Use PinglyMCP to ping example.com and summarize the result.",
    tools=[
        {
            "type": "mcp",
            "server_label": "pinglymcp",
            "server_url": "https://mcp.pinglymcp.com",
            "headers": {
                "Authorization": f"Bearer {os.environ['PINGLYMCP_API_KEY']}"
            },
            "allowed_tools": ["ping"]
        }
    ]
)

print(response.output_text)

Replace YOUR_LM_STUDIO_MODEL_ID with the identifier of the model you have loaded in LM Studio.

What the model can ask PinglyMCP to do

ping

Check reachability of a public IPv4 address, IPv6 address, or domain name.

describe_website

Describe the visible content of a public webpage with AI.

contact_website

Contact a website owner by email or contact form; AI assistance is optional and disabled by default.

get_account

Return the account associated with the current PinglyMCP key.

Troubleshooting

401 Unauthorized
Confirm the PinglyMCP key is active and that the client sends Authorization: Bearer pmcp_... to the MCP server.
The model never calls ping
Use a model with tool-calling support and ask explicitly for a reachability check. You can also restrict allowed tools to ping while testing.
LM Studio cannot see the server
Confirm the MCP URL matches the endpoint in these docs, save mcp.json, and make sure MCP integrations are enabled in LM Studio.