Skip to main content

Posit Connect MCP

Connect includes a built-in Model Context Protocol (MCP) server to allow AI agents to interact with and manage content. The MCP reference lists the name, description, behavior, inputs, and outputs for each built-in tool.

For client setup instructions, see Connect MCP in the user guide. To make the server available to everyone in your organization who uses an AI assistant, see Make Connect available in AI assistants.

Configure the built-in server

Several settings control the behavior of the Connect MCP server.

The MCP server is enabled by default.
To disable it, set ConnectMCP.Enabled to false.

By default, all MCP tools are available, but it is possible to restrict tools using a blocklist. To exclude tools, add one ConnectMCP.BlockedTool entry for each exact tool name in the reference. Connect logs a warning for each unregistered tool name and continues startup. For example:

/etc/rstudio-connect/rstudio-connect.gcfg
[ConnectMCP]
Enabled = true
BlockedTool = "publish_static_content"
BlockedTool = "deploy_bundle"

This example removes the two named tools from the available tool list. A blocked tool applies to every user, every AI provider, and every client.

Some desktop clients support adding plugins, which include MCP servers and skills, via an MCP Bundle (.mcpb) file. Connect serves a .mcpb bundle to facilitate this, but this can also be turned off. Set ConnectMCP.MCPBundleEnabled to false to stop serving the bundle at /mcpb; the MCP server itself stays enabled even with the bundle disabled. Note that Connect builds the bundle with the MCP URL based off of Server.Address, which must use HTTPS (or HTTP on localhost).

OAuth sign-in

MCP clients can sign in to the Connect MCP server through the OAuth authorization server, so each user signs in with their own Connect account. Server.OAuthClientsEnabled, on by default, turns on the OAuth server.

Server.OAuthAllowedRedirectURI lists the OAuth callback addresses that Connect accepts in addition to the defaults. Connect accepts localhost callbacks by default, which covers desktop extensions and coding agents. A hosted connection uses a callback address on the website of the AI provider, so add that address for each provider that you use. The Claude and ChatGPT sections list the addresses for those services.

Security considerations

Connect limits what an agent can do through the built-in server:

  • Each tool call runs with the permissions of the Connect user who authenticated the client. An agent cannot do more than that user can do.
  • Each tool has MCP tool annotations that tell the client whether the tool changes server state. Read-only tools set readOnlyHint. Connect writes a connect_mcp_tool_call audit event for each tool call that changes state. The event records whether the call completed or failed. Connect does not audit read-only tool calls. The deploy_bundle and publish_static_content tools set destructiveHint because they can replace the active bundle of existing content. The MCP reference shows the behavior of each tool.
  • Administrators can use ConnectMCP.BlockedTool to remove tools that the organization does not need.

Connect does not ask the user to confirm a tool call. The MCP client is responsible for confirmation and uses the annotations to decide when to ask. To use these protections:

  • Configure MCP clients to ask for user approval before they call tools that change server state.
  • Block tools that your organization does not need.
  • Give each user only the content access and user role that their work needs.

Prompt injection

These protections limit the effect of prompt injection. Tools return text that other users can write, such as content titles, descriptions, pin metadata, source files, and deployment logs. That text can contain instructions for the agent. An agent that follows these instructions can create, publish, or deploy content with the permissions of the user. The agent can also download source archives and pin data that the user can access, and send that data to other services. Connect cannot detect these instructions, so client approval and limited permissions are the main protections.

Make Connect available in AI assistants

Each user can connect an AI assistant to the built-in server by following the user guide. To make Connect available to everyone in your organization, you configure both Connect and the AI provider. This section explains the concepts that apply to every provider. The Claude and OpenAI sections cover the specific settings for each provider.

How AI assistants reach the server

AI providers offer two kinds of MCP connections, and the difference is which computer opens the connection to Connect:

  • Hosted connections: the provider runs the MCP client in its own cloud and calls Connect from there. The assistant works anywhere the user signs in, including the web and mobile apps. Connect must accept requests from the provider, which usually means it must be reachable from the internet. Anthropic calls these custom connectors. OpenAI calls them apps.
  • Local connections: a program on the computer of the user runs the MCP client and calls Connect directly. Desktop extensions, coding agents such as Claude Code and Codex, and MCP configuration files all work this way. These connections reach Connect over the same network as a web browser on that computer, including a corporate network or VPN. They work only in the application that runs the program, not on the web or mobile apps. Anthropic packages local connections as desktop extensions in the MCP Bundle (MCPB) format. OpenAI applications read local connections from an MCP configuration file.

Private Connect server configuration

If Connect is reachable from the internet, hosted connections work without network changes. If Connect is reachable only on a private network, choose one of these approaches:

  • Use local connections only: users connect through a desktop extension or coding agent from a computer on your network. This approach needs no network changes, but the assistant cannot reach Connect from the web or mobile apps.
  • Allow the provider to reach Connect: publish the MCP and OAuth paths of Connect through a reverse proxy, and allow only the published IP address ranges of the provider.
  • Use a tunnel from the provider: some providers offer a tunnel that opens an outbound-only connection from your network. See the Claude and OpenAI tunnel sections.

For a hosted connection, the provider and the browser of the user need different parts of Connect:

Path Requested by Purpose
/mcp/ AI provider The built-in MCP server
/.well-known/oauth-protected-resource/mcp/ AI provider Points the client to the OAuth server
/.well-known/oauth-protected-resource AI provider Points the client to the OAuth server
/.well-known/oauth-authorization-server AI provider OAuth server metadata
/oauth/v1/register AI provider Dynamic client registration
/oauth/v1/token AI provider Token exchange and refresh
/oauth/v1/authorize Browser of the user Sign-in and approval

When a client calls /mcp/ without signing in, Connect responds with a pointer to /.well-known/oauth-protected-resource/mcp/, and the client requests that URL first. To forward both protected resource paths with one rule, match /.well-known/oauth-protected-resource as a path prefix.

The authorization endpoint sends the user to the Connect sign-in page, so the browser of the user must be able to reach all of Connect. The browser can reach Connect over your private network. See OAuth endpoints for the full list.

Settings in the AI provider

Business and enterprise plans of AI providers give administrators controls such as these:

  • Which hosted connections members can add, and whether only administrators can add them
  • Which desktop extensions or local MCP servers members can install
  • Which plugins members receive, and whether members can remove them
  • Policies for desktop and coding-agent applications, delivered through mobile device management (MDM) or managed settings files

Provider controls apply only to that provider. To restrict what any assistant can do in Connect, configure the built-in server and give each user only the user role and content access that their work needs.

Claude

Anthropic offers Claude on the web, in desktop and mobile apps, and in the Claude Code coding agent. Each of these applications can use the built-in Connect MCP server. The settings in this section require a Claude Team or Enterprise plan, and the Owner or Primary Owner role in the Claude organization.

Approach Connects from Works in Requires public Connect Set up by
Custom connector Anthropic cloud Web, desktop, mobile, Cowork, and Claude Code Yes, or allow Anthropic IP ranges Owner
Custom connector through a tunnel Anthropic cloud, through your tunnel Web, desktop, mobile, Cowork, and Claude Code No Owner
Desktop extension Computer of the user Claude Desktop No Owner, or each user while the allowlist is off
Claude Code configuration Computer of the user Claude Code No Administrator, or each user

For a Connect server that users reach only on a private network, use a desktop extension for Claude Desktop and managed settings for Claude Code.

Custom connector

A custom connector makes Connect available in every Claude application. Claude connects to a custom connector from the Anthropic cloud, so Connect must be reachable from the internet. To limit access to Anthropic, allow only the outbound IP address ranges that Anthropic publishes.

  1. Allow the OAuth callback address that Claude uses for its hosted applications, https://claude.ai/api/mcp/auth_callback:

    /etc/rstudio-connect/rstudio-connect.gcfg
    [Server]
    OAuthAllowedRedirectURI = https://claude.ai/api/mcp/auth_callback

    Restart Connect after you change the configuration.

  2. In Claude, go to Organization settings > Connectors, select Add, and then select Custom. If Claude asks for the connector type, choose Web.

  3. Enter https://connect.example.com/mcp/ as the server URL. Use the same URL that Connect uses in Server.Address, followed by /mcp/.

  4. Leave the OAuth client ID and secret empty. Connect supports Dynamic Client Registration (DCR), so Claude registers itself with Connect when each member connects. If Claude asks how it identifies itself, choose Register automatically.

  5. Select Add.

Each member then goes to Customize > Connectors, finds the connector with the Custom label, and selects Connect to sign in to Connect. Only an Owner, or an Enterprise member with a custom role that manages organization libraries, can add a custom connector to a Team or Enterprise organization.

Members can turn the connector off in a conversation, and can block individual tools from Customize > Connectors. To remove a tool for every member, use ConnectMCP.BlockedTool in Connect.

Custom connector through a tunnel

An MCP tunnel connects Claude to an MCP server inside a private network. A small stack of containers in your network opens an outbound-only connection to Anthropic, so your firewall needs no inbound rules. Members then use the server as a custom connector.

Important

MCP tunnels are a research preview, available by request to organizations on the Claude Enterprise plan. The tunnel relies on Cloudflare for transport, and Anthropic can change or discontinue the feature at any time. Posit has not tested Connect with MCP tunnels.

Connect hosts its own OAuth server, and that server is also inside your network. The browser of the user must reach the authorization endpoint, and Claude must reach the registration and token endpoints through the tunnel. Anthropic describes the Tunnel OAuth configuration settings for this case. Copy the endpoint paths from /.well-known/oauth-authorization-server on your Connect server.

Desktop extension

A desktop extension runs an MCP server on the computer of the user inside Claude Desktop. Claude Desktop starts the server as a local program, so the extension can reach systems behind your firewall. Desktop extensions are desktop only and do not work on the web or mobile apps.

The MCP bundle that Connect serves at /mcpb is a desktop extension for Claude Desktop. It contains a small bridge program that Claude Desktop runs locally. To use Connect in Claude Code, follow the steps in Claude Code instead. The bridge connects to the built-in server at the address in Server.Address, and each user signs in to Connect in a browser. The computer of the user must be able to reach Connect, for example through your VPN.

To make the extension available to your organization:

  1. Download posit-connect-remote-mcp.mcpb from https://connect.example.com/mcpb.
  2. In Claude, go to Organization settings > Connectors, and open the Desktop tab.
  3. Select Add custom extension and choose the downloaded file.
  4. In Custom team extensions, open the menu for the extension and select Add to team.

Members then install the extension from Settings > Extensions in Claude Desktop.

Owners also control which other desktop extensions members can install:

  • The allowlist: when it is off, members can install any extension in the public registry. When it is on, members can install only the extensions that you approve, and cannot install .mcpb files themselves.
  • Turning on the allowlist: removes the extensions that members already installed. Tell members before you turn it on. Members reinstall approved extensions from Settings > Extensions.
  • Updates: to update a custom extension, upload the file again with Upload new version. Claude requires a higher version number in the extension manifest for each update.

On managed computers, you can also deliver these policies through MDM:

Policy key Controls
isDesktopExtensionEnabled Whether Claude Desktop runs desktop extensions
isDesktopExtensionDirectoryEnabled Whether members can reach the extension registry
isLocalDevMcpEnabled Whether members can add MCP servers to claude_desktop_config.json themselves

Each key defaults to true. MDM policies override the allowlist. If you set either extension key to false, members cannot install the Connect extension either. Set isLocalDevMcpEnabled to false to prevent members from adding MCP servers through the configuration file, which the allowlist does not control.

On the Enterprise plan, Owners can also set some of these controls in Organization settings, without MDM. These settings are in beta and require Claude Desktop 4.29.0 or later:

  • Allow local MCP servers: when you turn it off, MCP servers that members add themselves do not start.
  • Block all desktop extensions: turns off every installed desktop extension, including the Connect extension, and prevents new installations.

A policy set on a computer overrides these settings.

Claude Code

Claude Code runs on the computer of the user and connects to remote MCP servers from that computer, so it can reach a private Connect server. Users can add the server themselves with the command in the user guide.

To provide the server to every Claude Code user, add it to managedMcpServers in a managed settings source:

managed-settings.json
{
  "managedMcpServers": {
    "posit-connect": {
      "type": "http",
      "url": "https://connect.example.com/mcp/"
    }
  }
}

Each user signs in to Connect with OAuth the first time the server connects. Users cannot remove a server that you provide this way, but they can turn it off. The same page describes allowlists, denylists, and managed-mcp.json, which restrict the MCP servers that users can add.

Plugins

Owners can distribute plugins to members in Claude on the web, Claude Desktop, Cowork, and Claude Code. Each plugin can be hidden, available to install, installed by default, or required.

A plugin can refer to the URL of the built-in server, but the plugin does not change how Claude connects. When a plugin refers to a URL outside the Claude directory, the member adds that URL as a custom connector, which has the usual network requirements. Setting a plugin to installed by default or required does not add its connector. An Owner adds the connector separately in Organization settings > Connectors. A plugin that runs a local MCP server works in Cowork and Claude Code, but not in chat.

Use a plugin to distribute skills that describe how your organization publishes to Connect, alongside a connector or desktop extension that provides the connection.

Example: private Connect server

This example makes a private Connect server available in Claude Desktop and Claude Code, and restricts members to approved extensions:

  1. In Connect, block any tools that your organization does not need with ConnectMCP.BlockedTool.
  2. Confirm that Server.Address is the HTTPS address that users reach, and that https://connect.example.com/mcpb downloads the bundle.
  3. In Claude, upload the bundle as a custom desktop extension and add it to the team.
  4. Tell members that turning on the allowlist removes their installed extensions, and then turn on the allowlist.
  5. Through MDM, set isLocalDevMcpEnabled to false if members must not add their own MCP servers. Leave isDesktopExtensionEnabled and isDesktopExtensionDirectoryEnabled unset.
  6. Add the server to managedMcpServers in the Claude Code managed settings.
  7. Ask members to install the extension from Settings > Extensions and sign in to Connect.

OpenAI

OpenAI offers ChatGPT on the web and in desktop apps, and the Codex coding agent as a command-line tool and an IDE extension. Each of these applications can use the built-in Connect MCP server.

Approach Connects from Works in Requires public Connect Set up by
Custom MCP server in ChatGPT OpenAI cloud ChatGPT Yes, or allow OpenAI IP ranges Members whose workspace role allows it
Secure MCP Tunnel OpenAI cloud, through your tunnel ChatGPT and Codex No Users with tunnel permissions in the OpenAI Platform organization and the workspace role for custom MCP servers
Local MCP configuration Computer of the user ChatGPT desktop app, Codex CLI, IDE extension No Each user

For a Connect server that users reach only on a private network, use the local MCP configuration.

Custom MCP server in ChatGPT

ChatGPT organizes MCP connections as plugins. A plugin can include skills, apps, or both, and an app is an MCP connection to a service. ChatGPT connects to the MCP server from the OpenAI cloud, so the server must be reachable through a public HTTPS endpoint or a Secure MCP Tunnel. To limit access to OpenAI, allow the ChatGPT integration address ranges in https://openai.com/chatgpt-connectors.json. OpenAI changes these ranges, so update your allowlist from the file regularly.

ChatGPT signs in to MCP servers with OAuth and cannot send API keys. Keep Server.OAuthClientsEnabled on.

  1. Allow the ChatGPT OAuth callback address:

    /etc/rstudio-connect/rstudio-connect.gcfg
    [Server]
    OAuthAllowedRedirectURI = https://chatgpt.com/connector_platform_oauth_redirect

    ChatGPT uses this address for OAuth servers that support issuer identification, and Connect supports it. If ChatGPT shows a different redirect URI for the server, add that address instead. Restart Connect after you change the configuration.

  2. In ChatGPT, go to Plugins, select the plus button, and then select Add custom MCP server.

  3. Enter a name and description that members recognize, such as “Posit Connect”.

  4. Under Connection, enter https://connect.example.com/mcp/.

  5. Choose OAuth authentication, review the risk warning, and select I understand and want to continue.

  6. Select Create as a plugin, and review the tools that ChatGPT discovers.

Workspace owners control who can create and publish plugins in Permissions & roles:

  • Upload plugins with custom MCP servers and Create plugins with MCPs control who can create plugins that connect to MCP servers.
  • Publish plugins to workspace controls who can add a plugin to the workspace plugin directory.

For each published plugin, admins choose whether members can install it, whether ChatGPT installs it for the whole workspace, or whether it is turned off. On plans with role-based access, admins can also choose a different setting for each role. The app controls let admins choose which tools members can use. Review tools that change Connect, such as deploy_bundle, before you turn them on. ChatGPT treats tools without readOnlyHint as write actions, and asks the user to confirm write actions by default. Connect sets readOnlyHint only on tools that do not change server state.

Secure MCP Tunnel

Secure MCP Tunnel connects private MCP servers to ChatGPT, Codex, and the OpenAI Responses API. A client program inside your network opens an outbound-only connection, so the MCP server needs no public listener. When you add the custom MCP server in ChatGPT, select Tunnel under Connection and choose the tunnel. Creating or selecting a tunnel requires tunnel permissions in the OpenAI Platform organization. Adding the server in ChatGPT also requires the workspace permissions described in Custom MCP server in ChatGPT, so two different administrators might need to take part.

OAuth discovery travels through the tunnel, but the authorization server does not. Connect hosts its own authorization server, so OAuth sign-in through the tunnel can fail even when ChatGPT reaches the MCP server. The browser of the user must reach Connect, and OpenAI must reach the token endpoint of Connect.

Important

Posit has not tested Connect with Secure MCP Tunnel.

ChatGPT desktop app and Codex

The ChatGPT desktop app, the Codex CLI, and the Codex IDE extension share one MCP configuration file, ~/.codex/config.toml. These applications connect from the computer of the user, so they can reach a private Connect server. ChatGPT on the web does not read this file.

Users add Connect with the commands in the user guide, which create this entry:

~/.codex/config.toml
[mcp_servers.posit-connect]
url = "https://connect.example.com/mcp/"

codex mcp login signs in through a loopback callback, http://127.0.0.1/callback unless you change it. Connect accepts loopback callbacks by default. If you set mcp_oauth_callback_url, or oauth.callback_url for the server, to a different address, add that address to Server.OAuthAllowedRedirectURI.

To restrict which MCP servers these applications can use, add an allowlist to the managed requirements, in Agent security in the OpenAI Admin Console or in requirements.toml. An application turns on an MCP server only when both its name and its URL match an allowed entry:

requirements.toml
[mcp_servers.posit-connect]
identity = { url = "https://connect.example.com/mcp/" }

An empty mcp_servers table turns off every MCP server. The managed requirements restrict servers, but do not add them for users. To give users the server, share the commands from the user guide, or distribute a plugin that includes the server.