Perforce Agentic Gateway — Claude Code MCP server setup
Local proxy connecting AI assistants to multiple MCP servers over one connection. It prevents context bloat and manages credentials in your system keychain.
claude mcp add perforce-agentic-gateway -- uvx perforce-agentic-gatewayWhat Perforce Agentic Gateway does
PAG acts as an intermediary layer between your client and downstream servers. Instead of burdening your assistant with hundreds of tool definitions at once, you configure PAG once over stdio. The gateway controls child processes, restarts crashed instances, and routes secret tokens through an external dashboard to keep them out of chat logs.
Context efficiency relies on a minimal toolset. Rather than exposing every method upfront, the assistant uses pag__explore to inspect catalog slices and pag__execute to trigger downstream logic via JavaScript. Multi-server loops run in one round trip.
Getting started requires uv on your machine. Servers packaged as containers will fail to launch without Docker or Podman.
What it helps with
- prevent context saturation caused by numerous tool definitions
- chain actions across different MCP tools in a single execution
- store authentication credentials outside chat history
- restart crashing downstream server processes automatically
Example prompts for the agent
- Show me all available MCP servers in the PAG registry.
- Enable the P4 server from the catalog.
- Register a custom server called fetch that runs uvx mcp-server-fetch.
How to install Perforce Agentic Gateway
Platform CLI
claude mcp add perforce-agentic-gateway -- uvx perforce-agentic-gatewayuvx runs the command named after the package; if the README names another one, use uvx --from perforce-agentic-gateway <command>
Platform CLI
codex mcp add perforce-agentic-gateway -- uvx perforce-agentic-gatewayuvx runs the command named after the package; if the README names another one, use uvx --from perforce-agentic-gateway <command>
Config file
{
"mcpServers": {
"perforce-agentic-gateway": {
"command": "uvx",
"args": [
"perforce-agentic-gateway"
]
}
}
}uvx runs the command named after the package; if the README names another one, use uvx --from perforce-agentic-gateway <command>
Config file
{
"servers": {
"perforce-agentic-gateway": {
"type": "stdio",
"command": "uvx",
"args": [
"perforce-agentic-gateway"
]
}
}
}uvx runs the command named after the package; if the README names another one, use uvx --from perforce-agentic-gateway <command>
Platform CLI
gemini mcp add perforce-agentic-gateway uvx perforce-agentic-gatewayuvx runs the command named after the package; if the README names another one, use uvx --from perforce-agentic-gateway <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Perforce Agentic Gateway
How to install Perforce Agentic Gateway in Claude Code?
Run claude mcp add perforce-agentic-gateway -- uvx perforce-agentic-gateway in your terminal. You must have uv installed beforehand.
What does Perforce Agentic Gateway do?
It proxies your AI assistant to multiple MCP servers using a single stdio channel. The gateway handles background processes and passes tool schemas only when needed.
What dependencies are needed before running PAG?
The primary prerequisite is Astral's uv. Containerized tools need Docker or Podman, while external servers still require their own runtimes such as Node.js.