MCP Server

A Model Context Protocol (MCP) server implementation for Posit Package Manager (PPM), enabling AI assistants to interact with your package repositories programmatically. This MCP server provides seamless integration between AI assistants and Posit Package Manager, allowing you to:

The server leverages the Model Context Protocol to expose PPM’s Server APIs as tools that AI assistants can use to help you manage and explore your package ecosystem.

How to Enable MCP Server

EnhancedAdvanced

If you’d like to enable access to the MCP server, edit the configuration property [AI].MCPEnabled as follows and restarting Package Manager:

File: /etc/rstudio-pm/rstudio-pm.gcfg
[AI]
MCPEnabled = true

Positron Integration

Positron is Posit’s next-generation data science IDE, and it includes native support for the Model Context Protocol (MCP). If you want to use the Package Manager MCP server across all your projects, you can add its configuration to your user profile so it’s available in every workspace.

Setting Up in Positron

To add the Package Manager MCP server to your user settings, open the Command Palette and run MCP: Add Server. When prompted, provide the following details

  1. Type of MCP server to add: HTTP (HTTP or Server-Sent Events)
  2. URL of the MCP server, for example: https://[package-manager-server-address]/mcp
  3. Server ID: pm-mcp-server
  4. Select the configuration target: Global

The configuration will then be saved to your user profile.

You can also configure it manually by running MCP: Open User Configuration, which opens the mcp.json file in your user profile. Add your server information directly to the file, for example:

        "pm-mcp-server": {
            "url": "https://[package-manager-server-address]/mcp",
            "type": "http"
        }
Warning

Be sure to set Positron Assistant to Agent chat mode to enable MCP tool usage. You can find the available chat modes here: https://positron.posit.co/assistant.html#chat-modes

Back to top