STDIO Server Packages
Learn how to install and manage STDIO-based MCP server packages with MCP Gatekeeper.
Overview
MCP Gatekeeper provides a streamlined interface for installing and managing STDIO-based MCP server packages from the npm registry. The package manager handles installation, dependency resolution, and automatic wrapper injection for metrics collection.
Note: For HTTP-based MCP servers, see HTTP Servers.
Installing Packages
From the Web UI
- Navigate to the Stdio Servers page
- Click "Install from npm"
- Enter the package name (e.g.,
@modelcontextprotocol/server-filesystem) - Optionally specify a version (defaults to latest)
- Click Install
The package will be downloaded and installed automatically.
Package Sources
MCP Gatekeeper currently supports:
- npm registry: Public npm packages
- Scoped packages: Packages like
@org/package-name - Specific versions: Install a particular version
Popular MCP Server Packages
# Filesystem access
@modelcontextprotocol/server-filesystem
# GitHub integration
@modelcontextprotocol/server-github
# Web automation
@modelcontextprotocol/server-puppeteer
# Database access
@modelcontextprotocol/server-postgres
# Brave Search
@modelcontextprotocol/server-brave-search
# Google Maps
@modelcontextprotocol/server-google-maps
How It Works
Installation Process
- Validation: Package name and version validated
- npm install: Package installed using npm
- Dependency Resolution: npm handles dependencies
- Binary Detection: Main entry point identified
- Wrapper Injection: STDIO wrapper added for metrics
- Database Record: Package info stored in database
- Notification: Frontend receives success notification
Installation Directory
Packages are installed in:
~/.mcp-gatekeeper/packages/
└── node_modules/
└── @modelcontextprotocol/
└── server-filesystem/
STDIO Wrapper
The package manager automatically wraps MCP server binaries with a metrics collection wrapper:
// wrapper_template.js
// Intercepts STDIO communication
// Collects metrics transparently
// Forwards messages to actual server
This enables zero-code metrics collection without modifying the original package.
Managing Packages
Viewing Installed Packages
The Stdio Servers page shows:
- Package Name: Full package identifier
- Version: Installed version
- Install Date: When it was installed
- Size: Package size on disk
- Actions: View details, README, uninstall
Viewing Package Details
Click on a package to view:
- Package metadata: Name, version, description
- Dependencies: Required packages
- README: Package documentation
- Entry point: Main executable file
- Installation path: Where it's installed
Uninstalling Packages
- Navigate to the Stdio Servers page
- Find the package you want to remove
- Click the Delete icon
- Confirm the deletion
Note: Uninstalling a package will also remove it from any agent configurations that reference it.
Troubleshooting
Installation Fails
Problem: Package installation fails
Solutions:
- Check internet connection
- Verify package name is correct
- Try installing without a version
- Check npm registry is accessible
- Review backend logs for errors
Package Not Found
Problem: "Package not found" error
Solutions:
- Verify package exists on npm:
npm view <package-name> - Check for typos in package name
- Ensure package is publicly available
Permission Errors
Problem: Permission denied during installation
Solutions:
- Check file permissions on
~/.mcp-gatekeeper/packages/ - Run with appropriate permissions
- Check disk space availability
Wrapper Not Working
Problem: Metrics not being collected
Solutions:
- Verify
app/templates/wrapper_template.jsexists in backend - Check server logs for wrapper errors
- Restart the MCP server
- Re-install the package
Advanced Usage
Installing Specific Versions
Package name: @modelcontextprotocol/server-filesystem
Version: 1.2.3
Installing from Git
Currently not supported. Packages must be published to npm.
Custom Package Registry
To use a private npm registry, configure:
# In apps/backend/.env
NPM_REGISTRY=https://your-registry.com/
Manual Installation
For development/testing, you can manually install packages:
cd ~/.mcp-gatekeeper/packages
npm install <package-name>
Then manually add to the database or use the UI to "discover" it.
Package Requirements
For a STDIO package to work with MCP Gatekeeper:
- MCP Protocol: Must implement MCP protocol
- STDIO Communication: Must use STDIO transport (not HTTP)
- npm Package: Must be installable via npm
- Executable: Must have a runnable entry point
For HTTP-based servers: Use the HTTP Servers feature instead.
Best Practices
- Use Official Packages: Prefer
@modelcontextprotocol/scoped packages - Specify Versions: Pin to specific versions for stability
- Review README: Check package documentation before installing
- Test Locally: Test packages before adding to agent configs
- Keep Updated: Regularly update packages for security fixes
Transport Types
MCP Gatekeeper supports two transport types:
- STDIO Servers (this page) - Local packages installed via npm
- HTTP Servers - Remote servers accessed via HTTP/SSE
Both types provide the same monitoring and metrics capabilities.
Next Steps
- HTTP Servers - Configure remote HTTP MCP servers
- Agent Configuration - Configure servers for agents
- Server Activity - Monitor server usage
- Metrics Collection - Understand metrics