MCP server

Other clients

Connect any client that supports Streamable HTTP MCP.

The server is a standard Streamable HTTP MCP endpoint, so any compliant client can use it. What differs between them is only how they carry a credential.

Clients with JSON configuration

If your client accepts an MCP server URL and static headers in JSON, create an API key under Settings > Connections and configure it like this:

.cursor/mcp.json
{
  "mcpServers": {
    "pitvi": {
      "url": "https://api.pitvi.com/api/mcp",
      "headers": {
        "Authorization": "Bearer pitvi_sk_your_key_here"
      }
    }
  }
}

Clients with built-in OAuth

When a client asks only for a server address and offers a Sign in or Authenticate action, give it the endpoint and use OAuth:

https://api.pitvi.com/api/mcp

The client reads /.well-known/oauth-protected-resource, follows it to the authorization server, registers itself, and sends you to the Pitvi consent screen. Nothing to paste.

Writing your own client

Point a Streamable HTTP transport at the endpoint and send a bearer token.

import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";

const transport = new StreamableHTTPClientTransport(
  new URL("https://api.pitvi.com/api/mcp"),
  {
    requestInit: {
      headers: { Authorization: `Bearer ${process.env.PITVI_API_KEY}` },
    },
  },
);

const client = new Client({ name: "my-app", version: "1.0.0" });
await client.connect(transport);

const { tools } = await client.listTools();

Unauthenticated requests answer 401 with a WWW-Authenticate header naming the protected resource metadata, which is what lets a client discover the OAuth flow instead of treating the refusal as a dead server.