### Basic Server Sharing Example
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/docs/router_share.md
Demonstrates installing a server and then sharing it. Includes an example of sharing with custom port and subdomain settings.
```bash
# Install and share a server
mcpm install mcp-server-browse
mcpm share mcp-server-browse
```
```bash
# Share with custom settings
mcpm share mcp-server-browse --port 9000 --subdomain browse
```
--------------------------------
### Install MCP Server
Source: https://context7.com/pathintegral-institute/mcpm.sh/llms.txt
Install a server from the registry. Supports interactive or non-interactive installation using environment variables. Use --force to overwrite existing installations.
```bash
# Install a server interactively
mcpm install time
```
```bash
# Force reinstall (overwrite existing)
mcpm install everything --force
```
```bash
# Install with a custom alias
mcpm install youtube --alias yt
```
```bash
# Fully non-interactive install (for CI/AI agents)
export MCPM_NON_INTERACTIVE=true
export MCPM_FORCE=true
export GITHUB_TOKEN=ghp_xxxxxxxxxxxx # server-specific argument
mcpm install github
```
--------------------------------
### Install MCPM
Source: https://context7.com/pathintegral-institute/mcpm.sh/llms.txt
Choose one of the following installation methods. The one-line installer is recommended for most users.
```bash
# Recommended: one-line installer
curl -sSL https://mcpm.sh/install | bash
```
```bash
# Homebrew
brew install mcpm
```
```bash
# pipx (isolated Python environment)
pipx install mcpm
```
```bash
# uv tool
uv tool install mcpm
```
```bash
# pip
pip install mcpm
```
--------------------------------
### List Installed Servers
Source: https://context7.com/pathintegral-institute/mcpm.sh/llms.txt
Display all servers configured globally, including their assigned profiles. This command helps in visualizing the current server setup.
```bash
mcpm ls
# Output:
# Installed MCP Servers (2 total)
# ┌───────────────┬───────────────────────────────┬──────────────────┐
# │ Name │ Command / URL │ Profiles │
# ├───────────────┼───────────────────────────────┼──────────────────┤
# │ filesystem │ npx @modelcontext/server-fs │ web-dev, default │
# │ github │ npx @modelcontext/server-gh │ web-dev │
# └───────────────┴───────────────────────────────┴──────────────────┘
```
--------------------------------
### Get Server Metadata and Installation Details
Source: https://context7.com/pathintegral-institute/mcpm.sh/llms.txt
Retrieves and prints metadata for a specific server, including display name, description, author, installation methods, required arguments, and usage examples. This is useful for understanding server capabilities and integration points.
```python
meta = repo.get_server_metadata("filesystem")
if meta:
print(meta["display_name"])
print(meta["description"])
print(meta["author"]["name"])
# Installation methods
for method_id, method in meta.get("installations", {}).items():
print(method_id, method.get("type"), method.get("command"))
# Required arguments
for arg_name, arg_info in meta.get("arguments", {}).items():
print(arg_name, arg_info["required"], arg_info.get("description"))
# Usage examples
for example in meta.get("examples", []):
print(example["title"], example.get("prompt"))
```
--------------------------------
### MCPM v1 Client Integration Configuration Example
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/MIGRATION_GUIDE.md
Shows the JSON configuration for client integration in MCPM v1, which involves a complex router setup.
```json
{
"mcpServers": {
"mcpm-router": {
"command": ["mcpm", "router", "run"],
"args": ["--port", "3000"]
}
}
}
```
--------------------------------
### Install MCPM using a shell script
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/pages/index.html
Quickly install MCPM by downloading and executing the installation script from the official source.
```bash
$ curl -sSL https://mcpm.sh/install | bash
```
--------------------------------
### Install MCP Server Globally
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/pages/index.html
Install a server once for global configuration and access. Replace 'server-name' with the name of the server you want to install.
```bash
mcpm install server-name
```
--------------------------------
### Install MCPM using curl
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/README.md
Recommended installation method for MCPM. Executes a script to install the tool.
```bash
curl -sSL https://mcpm.sh/install | bash
```
--------------------------------
### Install MCP Server using MCPM
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/mcp-registry/README.md
Use the MCPM tool to install a server by its name from the registry. Ensure MCPM is installed and configured.
```bash
mcpm add server-name
```
--------------------------------
### Installation Tab Functionality
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/pages/index.html
This JavaScript handles the functionality for installation tabs, allowing users to switch between different installation methods or content panels.
```javascript
document.querySelectorAll('.install-tab').forEach(tab => {
tab.addEventListener('click', function() {
const tabName = this.dataset.tab;
document.querySelectorAll('.install-tab').forEach(t => t.classList.remove('active'));
this.classList.add('active');
document.querySelectorAll('.install-content').forEach(c => c.classList.remove('active'));
document.getElementById(tabName + '-content').classList.add('active');
});
});
```
--------------------------------
### Install MCP server
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/README.md
Installs a specified MCP server from the registry into the global MCPM configuration.
```bash
mcpm install SERVER_NAME
```
--------------------------------
### Show Server Details with mcpm info
Source: https://context7.com/pathintegral-institute/mcpm.sh/llms.txt
Fetches and displays full metadata for a registry server. Use this to get information about a server before installation or to understand its requirements.
```bash
mcpm info filesystem
```
--------------------------------
### Profile Sharing Example
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/docs/router_share.md
Illustrates creating a profile, adding servers to it interactively, and then sharing the entire profile.
```bash
# Create a profile and share it
mcpm profile create web-dev
mcpm profile edit web-dev # Add servers interactively
mcpm profile share web-dev
```
--------------------------------
### Development Workflow Example
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/docs/router_share.md
Shows a typical development workflow: first testing a server locally with HTTP and a specific port, then sharing it publicly when ready.
```bash
# Test locally first
mcpm run my-server --http --port 8080
# Share publicly when ready
mcpm share my-server --port 8080
```
--------------------------------
### Install an MCPM package
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/pages/index.html
Install a specific package, such as 'mcp-server-browse', using the MCPM CLI.
```bash
$ mcpm install mcp-server-browse
```
--------------------------------
### MCPM v1 Workflow Example
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/MIGRATION_GUIDE.md
Demonstrates the complex target-based workflow in MCPM v1, involving creating and setting targets before adding servers.
```bash
# Complex target-based workflow
mcpm target create @cursor
mcpm target set @cursor
mcpm add mcp-server-browse
mcpm add mcp-server-git
mcpm target create %web-dev
mcpm add mcp-server-browse --target %web-dev
mcpm add mcp-server-git --target %web-dev
mcpm router start
mcpm share mcp-server-browse
```
--------------------------------
### Install MCPM using uv tool
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/README.md
Installs the mcpm CLI tool using the uv tool.
```bash
uv tool install mcpm
```
--------------------------------
### MCPM v2.0 Simplified Workflow Example
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/MIGRATION_GUIDE.md
Illustrates the simplified global configuration and profile management workflow in MCPM v2.0, including direct execution and sharing.
```bash
# Simple global configuration
mcpm install mcp-server-browse
mcpm install mcp-server-git
# Create and organize with profiles
mcpm profile create web-dev
mcpm profile edit web-dev # Interactive server selection
# Direct execution and sharing
mcpm run mcp-server-browse
mcpm share mcp-server-browse
mcpm profile run web-dev
mcpm profile share web-dev
```
--------------------------------
### Install MCP Server
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/llm.txt
Installs an MCP server to the global configuration. Use --force to reinstall if already present or --alias to set a custom name.
```bash
mcpm install time
```
```bash
mcpm install everything --force
```
```bash
mcpm install youtube --alias yt
```
```bash
mcpm install sqlite
```
```bash
ANTHROPIC_API_KEY=sk-ant-... mcpm install claude
```
```bash
mcpm install filesystem --force
```
--------------------------------
### Define Command Examples in Python
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/docs/llm-txt-generation.md
Customize the llm.txt content by adding or modifying command examples within the `example_map` dictionary in the generation script.
```python
example_map = {
'mcpm new': [
'# Create a stdio server',
'mcpm new myserver --type stdio --command "python -m myserver"',
],
'mcpm your-new-command': [
'# Your example here',
'mcpm your-new-command --param value',
]
}
```
--------------------------------
### Install MCPM using pip
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/README.md
Installs the mcpm CLI tool using pip.
```bash
pip install mcpm
```
--------------------------------
### Install MCPM using pip
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/pages/index.html
Install MCPM using pip, the standard Python package installer. Ensure you have Python and pip set up.
```bash
$ pip install mcpm
```
--------------------------------
### Install MCPM using Homebrew
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/README.md
Installs the mcpm CLI tool using the Homebrew package manager.
```bash
brew install mcpm
```
--------------------------------
### List installed MCP servers and profiles
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/README.md
Displays a list of all servers installed in the global configuration, along with their assigned profiles.
```bash
mcpm ls
```
--------------------------------
### Install MCPM using x-cmd
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/README.md
Installs the mcpm.sh CLI tool for users of the x-cmd platform.
```sh
x install mcpm.sh
```
--------------------------------
### List Installed MCP Servers
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/llm.txt
Lists all installed MCP servers from the global configuration. Use -v for verbose output showing detailed server configurations.
```bash
mcpm ls
```
```bash
mcpm ls -v
```
```bash
mcpm profile ls
```
--------------------------------
### Install MCPM using Nix Flakes
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/README.nix.md
Install MCPM to your user profile using this command. This makes the MCPM executable available globally.
```bash
nix profile install github:pathintegral-institute/mcpm.sh
```
--------------------------------
### Install MCPM using pipx
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/pages/index.html
Install MCPM using pipx, a tool for installing and running Python applications in isolated environments.
```bash
$ pipx install mcpm
```
--------------------------------
### Install MCPM using Homebrew
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/pages/index.html
Install MCPM on macOS or Linux using the Homebrew package manager.
```bash
$ brew install mcpm
```
--------------------------------
### Install MCPM using pipx
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/README.md
Installs the mcpm CLI tool using pipx, recommended for Python tools.
```bash
pipx install mcpm
```
--------------------------------
### Example: Mixed Profile CLI Commands
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/examples/proxy_transport_types.md
Demonstrates adding different server types to a profile and running it. The FastMCP proxy automatically handles the various transport types.
```bash
# Add a local stdio server
mcpm add mcp-server-time --profile mixed-demo
# Add a remote HTTP server (hypothetical)
mcpm client add --global --server remote-weather --url https://weather-api.com/mcp
# Run the profile - FastMCP proxy handles all transport types
mcpm profile run mixed-demo
# Or run in HTTP mode for sharing
mcpm profile run --http mixed-demo
```
--------------------------------
### List MCPM Configuration Settings
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/llm.txt
Lists all current MCPM configuration settings. Use this to review your current setup.
```bash
mcpm config ls
```
--------------------------------
### Add Install Button to Server Header
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/pages/registry/index.html
Appends an install button to the server header. This button triggers a deep link to install the package, including necessary parameters like name, action, command, and arguments. It prevents the modal from opening on click and handles environment variables if present.
```javascript
const installButton = document.createElement('button');
installButton.className = 'install-button';
installButton.type = 'button';
// Add download icon
installButton.innerHTML =
` Install
`;
// Handle click event to build search params and trigger deeplink
installButton.addEventListener('click', (event) => {
// Prevent the modal from opening
event.stopPropagation();
// Build search params with server install info
const params = new URLSearchParams();
params.append('name', server.name.replace(/-/g, '_'));
params.append('action', 'install');
const installInfo = Object.values(server.installations)[0];
// No remote for now, only stdio
params.append('command', installInfo.command);
params.append('args', encodeURIComponent(installInfo.args.join(' ')));
if (installInfo.env) {
params.append('env', JSON.stringify(installInfo.env));
}
// Create and trigger the deeplink
const deeplink = `${sourceProtocol}://mcpm?${params.toString()}`;
window.location.href = deeplink;
});
serverHeader.appendChild(installButton);
```
--------------------------------
### Install Dependencies in Development Mode
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/README.md
Installs project dependencies in editable mode using uv, allowing for direct development and testing.
```bash
uv pip install -e .
```
--------------------------------
### Setup JSON Formatter Controls
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/pages/registry/index.html
Sets up event listeners for 'Expand All' and 'Collapse All' buttons to control the visibility of JSON elements. Assumes buttons with IDs 'expandAllBtn' and 'collapseAllBtn' exist.
```javascript
function setupJsonControls() {
document.getElementById('expandAllBtn').addEventListener('click', () => {
if (jsonFormatter) {
jsonFormatter.openAtDepth(Infinity);
}
});
document.getElementById('collapseAllBtn').addEventListener('click', () => {
if (jsonFormatter) {
jsonFormatter.openAtDepth(1);
}
});
}
```
--------------------------------
### Install MCPM using yarn
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/pages/index.html
Install the MCPM package globally using yarn. This command makes the `mcpm` executable available in your system's PATH.
```bash
yarn global add mcpm
```
--------------------------------
### FastMCP Proxy Configuration Example
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/examples/proxy_transport_types.md
An example JSON structure representing the FastMCP proxy configuration, showing how local and remote servers are defined. Custom server configurations are excluded.
```json
{
"mcpServers": {
"local-server": {
"command": ["python", "-m", "server"],
"env": {"KEY": "value"}
},
"remote-server": {
"url": "https://api.example.com/mcp",
"transport": "http",
"headers": {"Authorization": "Bearer token"}
}
}
}
```
--------------------------------
### Display Server Information
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/llm.txt
Shows detailed information about a specific MCP server, including installation instructions and dependencies.
```bash
mcpm info github
```
```bash
mcpm info pinecone
```
--------------------------------
### Client Connection Configuration
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/docs/router_share.md
Example JSON configuration for a client to connect to a shared server using curl.
```json
{
"mcpServers": {
"shared-server": {
"command": ["curl"],
"args": ["-X", "POST", "https://shared-url.example.com"]
}
}
}
```
--------------------------------
### Install MCPM using npm
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/pages/index.html
Install the MCPM package globally using npm. This command makes the `mcpm` executable available in your system's PATH.
```bash
npm install -g mcpm
```
--------------------------------
### Manually Start Jekyll Dev Server
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/docs/dev_guide.md
Manually start the Jekyll development server within the 'pages' directory. Requires Docker and mounts the current directory to the Jekyll environment.
```bash
cd pages
docker run --rm -it -v "$PWD:/srv/jekyll" -p 4000:4000 jekyll/jekyll:4.2.0 jekyll serve --livereload
```
--------------------------------
### Run Jekyll Dev Server with Docker (Alternate Port)
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/pages/registry/README.md
Starts the Jekyll development server using Docker, mounting the current directory to the container and exposing port 4001 to the container's port 4000. Use this if port 4000 is already in use.
```bash
docker run --rm -it -v "$PWD:/srv/jekyll" -p 4001:4000 jekyll/jekyll:4.2.0 jekyll serve --livereload
```
--------------------------------
### Batch operations in mcpm
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/llm.txt
Examples of performing batch operations for adding or removing multiple servers from profiles or clients.
```bash
# Add multiple servers at once
mcpm profile edit myprofile --add-server "server1,server2,server3"
# Remove multiple servers
mcpm client edit cursor --remove-server "old1,old2"
```
--------------------------------
### Run Jekyll Dev Server with Docker (Default Port)
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/pages/registry/README.md
Starts the Jekyll development server using Docker, mounting the current directory to the container and exposing port 4000. Assumes port 4000 is available.
```bash
docker run --rm -it -v "$PWD:/srv/jekyll" -p 4000:4000 jekyll/jekyll:4.2.0 jekyll serve --livereload
```
--------------------------------
### Create a new MCPM profile
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/pages/index.html
Create a new profile for organizing your MCPM configurations, for example, a 'work' profile.
```bash
$ mcpm profile create work
```
--------------------------------
### mcpm server management workflow
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/llm.txt
A typical workflow for managing servers using mcpm, including searching, installing, and running them.
```bash
# 1. Search for available servers
mcpm search sqlite
# 2. Get server information
mcpm info sqlite
# 3. Install server
mcpm install sqlite --force
# 4. Create custom server if needed
mcpm new custom-db --type stdio --command "python db_server.py" --force
# 5. Run server
mcpm run sqlite
```
--------------------------------
### Run mcpm.sh Locally with Dev Script
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/docs/dev_guide.md
Use this script for the easiest way to run the site locally. It processes manifests, sets up directories, and starts the Jekyll development server.
```bash
./dev.sh
```
--------------------------------
### Get Server Metadata
Source: https://context7.com/pathintegral-institute/mcpm.sh/llms.txt
Retrieves the full metadata for a specific MCPM server. This includes details like display name, description, author, installation methods, required arguments, and usage examples.
```APIDOC
## Get Server Metadata
### Description
Retrieves the full metadata for a specific MCPM server.
### Method
```python
repo.get_server_metadata(server_name: str)
```
### Parameters
#### Path Parameters
- **server_name** (str) - Required - The name of the server to retrieve metadata for.
### Response
Returns a dictionary containing server metadata if found, otherwise None.
#### Success Response (dict)
- **display_name** (str) - The display name of the server.
- **description** (str) - A brief description of the server.
- **author** (dict) - Information about the server author.
- **name** (str) - The name of the author.
- **installations** (dict) - Available installation methods.
- **method_id** (str) - Unique identifier for the installation method.
- **type** (str) - The type of installation (e.g., 'command').
- **command** (str) - The command to execute for installation.
- **arguments** (dict) - Required arguments for the server.
- **arg_name** (str) - The name of the argument.
- **required** (bool) - Whether the argument is required.
- **description** (str) - Description of the argument.
- **examples** (list) - Usage examples for the server.
- **title** (str) - The title of the example.
- **prompt** (str) - The prompt or command for the example.
```
--------------------------------
### Create and Run Development Profile
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/docs/advanced_features.md
Create a development profile and add servers like browse, git, and filesystem. Then, run all servers in the profile together, exposing them through a single HTTP endpoint.
```bash
# Create a development profile
mcpm profile create web-dev
mcpm profile edit web-dev # Add: browse, git, filesystem servers
# Run all servers in profile together
mcpm profile run web-dev --http --port 8080
```
--------------------------------
### List MCP Clients
Source: https://context7.com/pathintegral-institute/mcpm.sh/llms.txt
Detects installed MCP client applications and shows which MCPM profiles/servers are enabled in each. Use the --verbose flag for detailed server configuration.
```bash
mcpm client ls
```
```bash
mcpm client ls --verbose
```
--------------------------------
### Execute a Server with mcpm run
Source: https://context7.com/pathintegral-institute/mcpm.sh/llms.txt
Runs an installed MCP server through MCPM's FastMCP proxy, supporting stdio, HTTP, and SSE transport modes. Use `--http` or `--sse` to specify the transport protocol and port.
```bash
# Run in stdio mode (default, for direct client communication)
mcpm run filesystem
```
```bash
# Run as HTTP server on default port 6276
mcpm run filesystem --http
```
```bash
# Run as HTTP on a specific port and host
mcpm run filesystem --http --port 9000 --host 0.0.0.0
```
```bash
# Run in SSE mode
mcpm run filesystem --sse --port 8080
```
```json
# Use in Claude Desktop config (claude_desktop_config.json):
# {
# "mcpServers": {
# "filesystem": {
# "command": "mcpm",
# "args": ["run", "filesystem"]
# }
# }
# }
```
--------------------------------
### Set up Virtual Environment with uv
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/README.md
Creates and activates a virtual environment using uv for managing project dependencies.
```bash
uv venv --seed
source .venv/bin/activate # On Unix/Mac
```
--------------------------------
### Check MCPM System Health
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/llm.txt
Performs comprehensive diagnostics on your MCPM installation, configuration, and installed servers.
```bash
mcpm doctor
```
--------------------------------
### Initialize MCPM project
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/pages/index.html
Initialize a new MCPM project in the current directory. This command sets up the necessary configuration files for MCPM.
```bash
mcpm init
```
--------------------------------
### Create a New Profile
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/pages/index.html
Organize your servers by creating profiles for different workflows. Replace 'work' with your desired profile name.
```bash
mcpm profile create work
```
--------------------------------
### Initialize and Configure Global Settings
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/docs/router_tech_design.md
Instantiate the GlobalConfigManager to manage all servers within a single configuration. Use add_server to add server configurations and list_servers to retrieve the current list.
```python
from mcpm.global_config import GlobalConfigManager
config = GlobalConfigManager()
config.add_server(server_config)
servers = config.list_servers()
```
--------------------------------
### Organize Servers with MCPM Profiles
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/MIGRATION_GUIDE.md
Commands to create and edit profiles for organizing servers.
```bash
mcpm profile create frontend
```
```bash
mcpm profile create backend
```
```bash
mcpm profile create ai-tools
```
```bash
# Use interactive editor to assign servers
mcpm profile edit frontend
```
--------------------------------
### Add and Serve a Local Stdio Server
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/README.md
Add a new server to MCPM and then serve it over HTTP. Use `--force` to bypass confirmation prompts during server addition.
```bash
mcpm new [MY_SERVER_NAME] --type stdio --command "[COMMAND]" --args "[ARG_1] [ARG_2] ..."
```
```bash
mcpm ls
```
```bash
mcpm run [MY_SERVER_NAME] --http
```
```bash
mcpm run [MY_SERVER_NAME] --http --host 0.0.0.0
```
```bash
mcpm run [MY_SERVER_NAME] --http --port
```
--------------------------------
### Combine and Serve Multiple Servers as a Profile
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/README.md
Add multiple servers to MCPM and then serve them as a single profile. Use `--force` to bypass confirmation prompts when adding servers.
```bash
# Stdio server
mcpm new [SERVER_A] --type stdio --command "[COMMAND]" --args "[ARG_1] [ARG_2] ..." --force
```
--------------------------------
### Display MCPM help information
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/README.md
Shows general help information and lists all available commands for the MCPM CLI.
```bash
mcpm --help
```
--------------------------------
### Display MCPM version
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/README.md
Retrieves and displays the currently installed version of the MCPM CLI tool.
```bash
mcpm --version
```
--------------------------------
### Build MCPM Package with Nix
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/README.nix.md
Build the MCPM package from source using Nix. This command should be run after cloning the repository and navigating into its directory.
```bash
nix build
```
--------------------------------
### Integrate MCPM Clients
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/MIGRATION_GUIDE.md
Commands for configuring clients interactively or importing existing configurations.
```bash
# Configure clients interactively
mcpm client edit claude-desktop
```
```bash
mcpm client edit cursor
```
```bash
# Or import existing configurations
mcpm client import claude-desktop
```
--------------------------------
### Using environment variables for secrets in mcpm
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/llm.txt
Set environment variables for API keys to be used by installed mcpm servers.
```bash
# Set API keys via environment
export ANTHROPIC_API_KEY=sk-ant-...
export OPENAI_API_KEY=sk-...
# Install servers that will use these keys
mcpm install claude --force
mcpm install openai --force
```
--------------------------------
### Open Server Modal - JavaScript
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/pages/registry/index.html
Opens a modal dialog to display detailed manifest information for a given server. It populates the modal with server details like name, description, version, and license.
```javascript
function openServerModal(server) {
const modal = document.getElementById('serverModal');
const modalTitle = document.getElementById('modalTitle');
const jsonContent = document.getElementById('jsonContent');
if (!modal || !modalTitle || !jsonContent) {
console.error('Required modal elements not found');
return;
}
modalTitle.textContent = `${server.display_name || server.name} Manifest`;
const apiUrlElement = document.getElementById('apiUrl');
if (apiUrlElement) {
const fullApiUrl = `${window.location.origin}/api/servers/${server.name}.json`;
apiUrlElement.textContent = fullApiUrl;
}
const safeSetText = (id, value) => {
const element = document.getElementById(id);
if (element) {
element.textContent = value || 'N/A';
}
};
const safeSetHTML = (id, value) => {
const element = document.getElementById(id);
if (element) {
element.innerHTML = value || 'N/A';
}
};
safeSetText('detailName', server.name);
safeSetText('detailDisplayName', server.display_name);
safeSetText('detailDescription', server.description);
safeSetText('detailVersion', server.version);
safeSetText('detailLicense', server.license);
}
```
--------------------------------
### List MCPM Profiles
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/README.md
Verify the creation of your profile by listing all available profiles. This command shows profiles with their selected servers.
```bash
mcpm profile ls
```
--------------------------------
### Search for MCP servers
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/README.md
Searches the MCP Registry for available servers based on a query. Use this to find servers to install.
```bash
mcpm search [QUERY]
```
--------------------------------
### Build Production Site Locally
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/docs/dev_guide.md
Build the production version of the site locally using Docker. The output will be in the 'pages/_site/' directory.
```bash
cd pages
docker run --rm -it -v "$PWD:/srv/jekyll" jekyll/jekyll:4.2.0 jekyll build
```
--------------------------------
### Remove MCPM Configuration Setting
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/llm.txt
Removes a specific configuration setting by name. For example, to remove the node executable path.
```bash
mcpm config unset node_executable
```
--------------------------------
### Share MCPM Profile
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/llm.txt
Creates a secure public tunnel to all servers in a profile, making them accessible remotely. Each server gets its own endpoint.
```bash
mcpm profile share web-dev # Share all servers in web-dev profile
mcpm profile share ai --port 5000 # Share ai profile on specific port
```
```bash
# Basic usage
mcpm profile share
```
--------------------------------
### Create a Profile with mcpm profile create
Source: https://context7.com/pathintegral-institute/mcpm.sh/llms.txt
Creates a named profile (virtual tag group) for organizing servers. Use `mcpm profile ls` to list existing profiles.
```bash
# Create a new profile
mcpm profile create web-dev
```
```bash
# List all profiles
mcpm profile ls
```
--------------------------------
### Run MCPM CLI during Development
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/README.md
Executes the mcpm CLI directly from the development environment, either via the installed package or the development script.
```bash
# Either use the installed package
mcpm --help
# Or use the development script
./test_cli.py --help
```
--------------------------------
### System and Configuration Management
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/README.md
Perform system health checks, manage MCPM configuration, and migrate settings between versions.
```bash
mcpm doctor # Check system health and server status
```
```bash
mcpm config # Manage MCPM configuration and settings
```
```bash
mcpm migrate # Migrate from v1 to v2 configuration
```
--------------------------------
### Get MCPM Command Help
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/MIGRATION_GUIDE.md
Commands to access help information for MCPM, including general commands, migration, and specific command usage.
```bash
mcpm --help
```
```bash
mcpm migrate --help
```
```bash
mcpm COMMAND --help
```
--------------------------------
### Import Server Configurations from Clients
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/docs/advanced_features.md
Import existing server configurations from MCP clients. You can import from a specific client or import into a designated profile.
```bash
# Import from Claude Desktop
mcpm client import claude-desktop
# Import from Cursor to a specific profile
mcpm client import cursor --profile development
```
--------------------------------
### Get Current Context in FastMCP
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/docs/fastmcp_progress_notification_investigation.md
Retrieves the active context for the current task. Raises a RuntimeError if no context is found. This is a core component for context management.
```python
def get_context() -> Context:
from fastmcp.server.context import _current_context
context = _current_context.get()
if context is None:
raise RuntimeError("No active context found.")
return context
```
--------------------------------
### Uninstall an MCP server using mcpm
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/llm.txt
Remove an installed MCP server from global configuration. Use the --force flag to remove without confirmation.
```bash
mcpm uninstall filesystem
mcpm uninstall filesystem --force
```
```bash
# Basic usage
mcpm uninstall
```
--------------------------------
### Share a server using mcpm
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/llm.txt
Share an installed server from global configuration through a tunnel. Specify the server name and optionally a port, retry count, or other parameters.
```bash
mcpm share time # Share the time server
mcpm share mcp-server-browse # Share the browse server
mcpm share filesystem --port 5000 # Share filesystem server on specific port
mcpm share sqlite --retry 3 # Share with auto-retry on errors
```
```bash
# Basic usage
mcpm share
```
--------------------------------
### Create and Edit MCPM Profiles
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/README.md
Commands to create a new profile and edit an existing one. Editing a profile allows interactive selection of installed servers.
```bash
mcpm profile create [PROFILE_NAME]
mcpm profile edit [PROFILE_NAME]
```
--------------------------------
### Update MCP Servers
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/README.md
Check for and apply updates to installed MCP servers. Updates can be applied to all servers or specific ones, with options for dry runs and rebasing.
```bash
mcpm update # Update all servers
```
```bash
mcpm update SERVER_NAME # Update a specific server
```
```bash
mcpm update --check # Dry run — check for updates without applying
```
```bash
mcpm update --rebase # Use git rebase instead of fast-forward
```
```bash
mcpm update --init # Scan servers and populate source metadata
```
```bash
mcpm update --init --force # Re-detect all source metadata
```
--------------------------------
### Initialize Modal and Event Listeners
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/pages/registry/index.html
Sets up the modal window, including close button functionality and click-outside-to-close behavior. It also attaches event listeners to buttons for copying different types of content (URL, JSON, combined URL) to the clipboard.
```javascript
document.addEventListener('DOMContentLoaded', () => {
const modal = document.getElementById('serverModal');
const closeButton = document.querySelector('.close-button');
const copyUrlButton = document.getElementById('copyUrl');
const copyContentButton = document.getElementById('copyContent');
const copyCombinedUrlButton = document.getElementById('copyCombinedUrl');
if (closeButton) {
closeButton.addEventListener('click', () => {
modal.style.display = 'none';
});
}
window.addEventListener('click', (event) => {
if (event.target === modal) {
modal.style.display = 'none';
}
});
if (copyUrlButton) {
copyUrlButton.addEventListener('click', (event) => {
event.stopPropagation();
const apiUrl = document.getElementById('apiUrl')?.textContent;
if (apiUrl) {
copyToClipboard(apiUrl, copyUrlButton);
}
});
}
if (copyContentButton) {
copyContentButton.addEventListener('click', () => {
const jsonContent = document.getElementById('jsonContent')?.textContent;
if (jsonContent) {
copyToClipboard(jsonContent, copyContentButton);
}
});
}
if (copyCombinedUrlButton) {
copyCombinedUrlButton.addEventListener('click', () => {
const combinedApiUrl = document.getElementById('combinedApiUrl')?.textContent;
if (combinedApiUrl) {
copyToClipboard(combinedApiUrl, copyCombinedUrlButton);
}
});
}
});
```
--------------------------------
### Responsive Design Media Query
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/pages/index.html
Applies styles for smaller screens, specifically adjusting container padding and hero section padding. This is a basic example of responsive adjustments.
```CSS
/* Responsive design */ @media (max-width: 768px) { .container { padding: 0 1rem; } .hero { padding: 2rem 0 4rem; } .features-grid { grid-temp
```
--------------------------------
### MCPM v1 Migration Options
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/MIGRATION_GUIDE.md
Choose one of the following options when prompted during automatic migration. 'Y' migrates to v2, 'N' starts fresh with v2, and 'I' ignores the migration for now.
```bash
Y - Migrate to v2 (recommended)
```
```bash
N - Start fresh with v2 (backup v1 configs)
```
```bash
I - Ignore for now (continue with current command)
```
--------------------------------
### Configure Local STDIO Server
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/examples/proxy_transport_types.md
Define a local server using a command and arguments. Environment variables can be passed to the command.
```yaml
name: local-python-server
command: python
args: ["-m", "my_mcp_server"]
env:
API_KEY: ${MY_API_KEY}
```
--------------------------------
### Integrate MCP Clients
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/README.md
Manage MCP client configurations for tools like Claude Desktop, Cursor, and Windsurf. Clients can be listed, edited, and configurations imported.
```bash
mcpm client ls # List all supported MCP clients and their status
```
```bash
mcpm client edit CLIENT_NAME # Interactive server enable/disable for a client
```
```bash
mcpm client edit CLIENT_NAME -e # Open client config in external editor
```
```bash
mcpm client import CLIENT_NAME # Import server configurations from a client
```
--------------------------------
### Example Fix Architecture for Request Tracking
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/docs/fastmcp_progress_notification_investigation.md
Illustrates a potential Python class for tracking requests between subprocess IDs and their associated progress tokens. This is part of the required fix for context injection.
```python
class ProxyRequestTracker:
def __init__(self):
self._request_mapping: Dict[subprocess_id, ProgressToken] = {}
def track_request(self, subprocess_id: str, progress_token: ProgressToken):
self._request_mapping[subprocess_id] = progress_token
def get_progress_token(self, subprocess_id: str) -> ProgressToken | None:
return self._request_mapping.get(subprocess_id)
```
--------------------------------
### Manage MCP Clients
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/docs/advanced_features.md
List all detected MCP clients and configure servers for specific clients.
```bash
# List all detected clients
mcpm client ls
# Configure servers for specific clients
mcpm client edit claude-desktop
mcpm client edit cursor
mcpm client edit windsurf
```
--------------------------------
### Run MCPM Server
Source: https://github.com/pathintegral-institute/mcpm.sh/blob/main/llm.txt
Executes an installed MCP server in stdio (default), HTTP, or SSE mode. Defaults to stdio for direct client communication. Port defaults to 6276 and host to 127.0.0.1.
```bash
mcpm run server-name
```
```bash
mcpm run --http server-name
mcpm run --http --port 9000 server-name
mcpm run --http --host 0.0.0.0 server-name
```
```bash
mcpm run --sse server-name
mcpm run --sse --port 9000 server-name
mcpm run --sse --host 0.0.0.0 server-name
```
```json
{"command": ["mcpm", "run", "mcp-server-browse"]}
```
```bash
# Run a server
mcpm run sqlite
# Run with HTTP transport
mcpm run myserver --http --port 8080
```
--------------------------------
### Edit Server Configuration with mcpm edit
Source: https://context7.com/pathintegral-institute/mcpm.sh/llms.txt
Opens an interactive editor or allows non-interactive modification of an installed server's command, arguments, and environment variables. Use `--force` for non-interactive changes.
```bash
# Interactive mode
mcpm edit myserver
```
```bash
# Non-interactive: set a new env variable
mcpm edit myserver --env "API_KEY=newvalue123" --force
```
```bash
# Non-interactive: change command
mcpm edit myserver --command "python -m mynewserver" --force
```