# Expose a credential over MCP

import { Steps } from "@astrojs/starlight/components"

For a service **Connection** credential, Studio can expose that integration as an inbound **MCP connection**. An
external MCP client (Cursor, Claude Desktop, or similar) uses the **MCP server URL** and **Bearer token** from the
panel to list and call that credential’s operations as tools. This is separate from
[connecting a coding agent](../../build-with-a-coding-agent/connect-your-coding-agent/), where you sign in as yourself to
plan, build, and run automations.

## When to use

- You want an editor or agent to call **one** connected integration through Mindflow, using that credential’s
  operations as MCP tools.
- Prefer [Connect your coding agent](../../build-with-a-coding-agent/connect-your-coding-agent/) when a coding agent
  should plan, build, and run automations in your organization.
- Prefer [MCP Client](../mcp-client/) when a **flow** must call an **external** MCP server (outbound).

Before you begin, create a service **Connection** credential in the environment that holds the integration. See
[Create and manage credentials](../../../../getting-started/credentials/). You must be able to open **MCP connection**
on that row (Owners). Treat the bearer token like any other secret.

## Guide

### Open MCP connection

The credentials table on an environment offers **MCP connection** for supported Connection credentials. The modal title
is **MCP connection**. The subtitle is the credential name.

1. **Open Environments.** In the Studio sidebar, choose **Environments**, then open the environment that owns the
   credential.
2. **Open MCP connection.** On the credentials table, choose **MCP connection** for the Connection credential you want
   to expose.
3. **Read the server URL.** Copy **MCP server URL** from the dialog. Point the MCP client at that URL—do not invent a
   path.
4. **Reveal the bearer token.** Show **Bearer token**, then copy it. In the client, set the Authorization header to
   that Bearer value, as the dialog describes.
5. **Close the dialog.** After you rotate the credential, open **MCP connection** again and copy a new token for the
   client.

## Example

An analyst wants Cursor to call **VirusTotal v3** using the **VirusTotal — threat lookup — Docs** Connection credential
instead of storing a second API key in the editor.

1. **Open the credential.** In **Docs**, they open **MCP connection** on **VirusTotal — threat lookup — Docs**.
2. **Configure Cursor.** They paste the copied server URL and Bearer token into a Cursor MCP server entry for that
   integration only.
3. **Call tools.** Cursor lists VirusTotal operations as MCP tools. The credential token gives Cursor only those tools,
   not the Mindflow guide for building automations.

## Keep in mind

- **MCP connection** is for service Connection credentials. It does not replace signing in as yourself when you
  [connect a coding agent](../../build-with-a-coding-agent/connect-your-coding-agent/).
- Auditing can apply to inbound tool calls when enabled for your organization.
- Do not put the bearer token in a flow, a chat prompt, or a shared repository.

## Related

[MCP Client](../mcp-client/) · [Connect your coding agent](../../build-with-a-coding-agent/connect-your-coding-agent/) ·
[Create and manage credentials](../../../../getting-started/credentials/)
