# Add an API to Claude as a connector

> Make an MCP server from your API's spec and add it to claude.ai, the Claude apps or Claude Code.

Source: https://sokie.sh/docs/add-an-api-to-claude

Claude calls an API through a connector: a remote MCP server it signs in to. If the API has an OpenAPI or Swagger spec, or a GraphQL schema, Sokie makes that server from it, and claude.ai, the Claude apps and Claude Code can all use it. You need no AI credits from Sokie: the agent is your own Claude.

## Make the server

In the app, choose **New server**, then paste the spec, drop the file or give its URL. Sokie shows every tool the spec becomes; leave out any you don't want Claude to have. Say how the API signs in, keep the server private, and choose **Create server and deploy**.

From a terminal, the same takes four commands:

```sh
sokie init https://api.example.com/openapi.json example
cd example
sokie login
sokie deploy --create
```

Either way you get an address like `https://majestic-lobster-123.sokie.cloud/mcp`. [OpenAPI to MCP server](https://sokie.sh/docs/openapi-to-mcp-server) says what each part of the spec becomes.

## Add it to claude.ai

1. Open **Customize**, then **Connectors**.
2. Choose **+**, then **Add custom connector**, and paste the server's address.
3. Connect it. Sokie opens and asks whether to connect Claude to your server; choose **Allow**.

The Claude desktop and mobile apps use the same connectors as claude.ai, so it's there too. Ask Claude something the API can answer, and it picks the tool.

## Add it to Claude Code

```sh
claude mcp add --transport http example https://majestic-lobster-123.sokie.cloud/mcp
```

Then run `/mcp` inside Claude Code and choose the server to sign in.

## Bring your key for the API

If the API takes a key from each person, Claude's first call that needs one shows you a link to Sokie instead of an answer. Open it, paste your key, choose **Save key**, and ask Claude again. Sokie keeps the key encrypted and sends it only on your own calls. Everyone who connects brings their own, so nobody shares yours.

## Decide what Claude may do

Sokie tells Claude whether each tool only reads, or can delete or act outside the API, and Claude can use that to decide when to ask you before calling. On the server's page you can decide for it: allow, ask first or turn off each kind of tool for every agent; see [What agents may do](https://sokie.sh/docs/agent-policy).

## Share it

Anyone in the server's workspace can add the same address to their own Claude, and each person approves their own connection. To let your API's users connect without a Sokie account, see [Open a server to your API's users](https://sokie.sh/docs/api-users). For an API anyone may call, a public server needs no sign-in at all: [Change access](https://sokie.sh/docs/manage-a-server#make-a-server-public-or-private).

Using ChatGPT too? The same server works there: [Add an API to ChatGPT](https://sokie.sh/docs/add-an-api-to-chatgpt).
