Posit Connect MCP
Connect includes a built-in Model Context Protocol (MCP) server for managing content. The public MCP reference lists tools and fields for the built-in server without requiring a Connect login.
Endpoint and access
Connect serves its built-in MCP server at /mcp/ over the Streamable HTTP transport. Use https://connect.example.com/mcp/ as the endpoint URL in your client configuration. Replace connect.example.com with the host name of your Connect server. If your server URL includes a path prefix, preserve it before /mcp/ and /mcpb in the examples. /mcp/ is reserved for the built-in server and cannot be used as a content vanity URL.
Requests to /mcp/ require an authenticated Connect user. The endpoint does not accept machine identities. Content operations use the signed-in user’s Connect permissions.
Connect a client
With OAuth clients enabled, the built-in server supports OAuth 2.1. When you add the server to a client, the client discovers the Connect OAuth server and prompts you to sign in through a browser. The client refreshes access tokens automatically, so you can omit an API key and the Authorization header.
Claude Desktop custom connector
- In Claude Desktop, open Settings > Connectors and select Add custom connector.
- Enter
https://connect.example.com/mcp/as the server URL. - Complete the Connect OAuth sign-in in your browser.
Your organization can restrict custom connectors. Contact your Claude organization administrator if you cannot add one. Claude Desktop custom connectors send requests from a cloud service that Anthropic operates, so make your Connect server reachable over the public internet.
Install an MCP bundle
Connect provides an MCP bundle for agents that support .mcpb files, including Claude Desktop. The bundle includes a local bridge and preconfigures the MCP server URL for your Connect installation. An administrator can turn off the bundle download.
Download the MCP bundle from this Connect server.
- Use the download link when available, or open
https://connect.example.com/mcpbin your browser to downloadposit-connect-remote-mcp.mcpb. For a different server address, open/mcpbon your Connect server, preserving any path prefix. Use/mcpbwithout a trailing slash. If Connect returns a not found error for/mcpb, contact your Connect administrator. - Drag the downloaded file into Claude Desktop to open the installation dialog.
- Confirm the preconfigured MCP server URL and complete the extension installation.
- Authorize the connection through the Connect OAuth sign-in when the extension opens your browser.
Your organization can restrict desktop extension installation. Contact your Claude organization administrator if you cannot install the bundle. The bundle connects from your computer, so your computer must have network access to Connect. For another agent that supports MCP bundles, import the downloaded file using that agent’s installation workflow.
Edit the MCP server configuration
You can add Connect to the MCP server configuration file for your agent. Merge the example entry into the mcpServers object, preserving your other server entries and settings. Each agent uses its own configuration format.
Posit Assistant reads MCP server entries from ~/.posit/assistant/settings.json. Add the following entry:
~/.posit/assistant/settings.json
{
"mcpServers": {
"posit-connect": {
"type": "remote",
"url": "https://connect.example.com/mcp/",
"auth": "oauth"
}
}
}Restart Posit Assistant and complete the Connect OAuth sign-in when you connect to the server. If Posit Assistant runs in Posit Workbench, the OAuth redirect relay might require an allowed redirect address. See Workbench OAuth redirect configuration for details.
Open Settings > Developer > Edit Config to edit claude_desktop_config.json. The file resides at these locations:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Install Node.js so that the npx command is available. This configuration starts the mcp-remote bridge on your computer and connects it to the remote Connect server:
claude_desktop_config.json
{
"mcpServers": {
"posit-connect": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://connect.example.com/mcp/"
]
}
}
}Quit and reopen Claude Desktop, then complete the Connect OAuth sign-in when the bridge opens your browser.
Select Streamable HTTP in your client and use https://connect.example.com/mcp/ as its endpoint URL. Some clients accept a JSON entry for an HTTP MCP server:
{
"url": "https://connect.example.com/mcp/",
"type": "http"
}Register a server in a coding agent
Coding agents can register MCP servers through their command-line interfaces. Run the commands for your agent, then authorize the connection through Connect.
Terminal
claude mcp add --transport http posit-connect https://connect.example.com/mcp/Then, run /mcp in Claude Code and authorize the connection in your browser.
Terminal
codex mcp add posit-connect --url https://connect.example.com/mcp/
codex mcp login posit-connectTerminal
gemini mcp add --scope user --transport http posit-connect https://connect.example.com/mcp/Then, run /mcp auth posit-connect in Gemini CLI and complete the Connect OAuth sign-in in your browser. The --scope user option makes the server available across your projects.
API key authentication
If your administrator disables OAuth clients, or your client does not support the MCP OAuth flow, use API key authentication with a client that can send custom headers. Your administrator must enable Authentication.APIKeyAuth to allow API key authentication. See the API keys user guide for instructions to create an API key. Configure the built-in endpoint and header as shown in this example:
{
"url": "https://connect.example.com/mcp/",
"headers": {
"Authorization": "Key YOUR_CONNECT_API_KEY"
}
}Replace connect.example.com and YOUR_CONNECT_API_KEY with your server host name and API key.
Use the tools together
The server tells your agent to call get_server_skill when it does not already have workflow guidance. This tool provides context for using the Connect tools together. The MCP reference describes each built-in tool’s parameters and return fields.
Approve tool calls
Tool calls run with your Connect permissions. Content, pins, and logs that other users write can contain instructions for your agent. Configure your client to ask for your approval before it calls tools that change server state, such as create_content, deploy_bundle, and publish_static_content. If your agent can also send data to other services, require approval for download_bundle and request_pin_download too. The MCP reference shows which tools change server state.
Configure the server
Administrators can enable or disable the built-in server, or block individual tools, with the MCP configuration settings.