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:
- Query available R package repositories
- Find R packages by name across different repositories
- Discover system dependencies needed for package installation across different Linux distributions
- Extract functional documentation for both public and locally available packages
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 = truePositron 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
- Type of MCP server to add:
HTTP (HTTP or Server-Sent Events) - URL of the MCP server, for example:
https://[package-manager-server-address]/mcp - Server ID:
pm-mcp-server - 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"
}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