
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
mcp-agent-proxy
Advanced tools
MCP proxy server that allows MCP clients to communicate with agent servers (Mastra, LangGraph, etc.)
Connect any MCP client to any agent server - creating an "Internet of Agents" through simple, composable primitives.
Supports Mastra β€οΈ and LangGraph π¦πΈοΈ servers! π
Add this to your MCP client's configuration:
{
"mcpServers": {
"mcpAgentProxy": {
"command": "npx",
"args": ["mcp-agent-proxy@latest"]
}
}
}
That's it! The proxy lets your MCP client connect to different agent servers and exposes agent interactions as MCP tools. It automatically detects agent server types and adapts accordingly.
https://github.com/user-attachments/assets/9eaf1d36-298f-430f-b9e8-37e921cce2d1
Instead of building complex protocols, we provide 5 simple tools that let agents discover, connect, and orchestrate across unlimited networks:
Tool | Purpose |
---|---|
listAgents | Discover available agents across all servers |
describeAgent | Get detailed agent capabilities for intelligent routing |
callAgent | Execute any agent with smart conflict resolution |
connectServer | Dynamically add new agent servers at runtime |
disconnectServer | Remove dynamically connected servers |
Agent servers can be MCP clients themselves, creating recursive agent networks:
Your MCP Client β MCP Proxy β Agent Server (Mastra/LangGraph) β Agents -> MCP Proxy -> Other Agent Servers β π Agents
One configuration line unlocks entire ecosystems of AI capabilities.
β Fully MCP 2025-03-26 Compliant
π Multi-Transport Support
npx mcp-agent-proxy
){
"mcpServers": {
"mcpAgentProxy": {
"command": "npx",
"args": ["mcp-agent-proxy"],
"env": {
"AGENT_SERVERS": "http://localhost:4111 http://localhost:2024"
}
}
}
}
{
"mcpServers": {
"mcpAgentProxy": {
"command": "npx",
"args": ["mcp-agent-proxy"],
"env": {
"AGENT_SERVERS": "https://my-mastra.vercel.app http://localhost:2024"
}
}
}
}
{
"mcpServers": {
"mcpAgentProxy": {
"command": "node",
"args": ["/path/to/mcp-agent-proxy/dist/mcp-server.js"],
"env": {
"AGENT_SERVERS": "http://localhost:4111"
}
}
}
}
Basic Agent Call:
Can you call the weatherAgent to get the current weather in New York City?
Network Exploration
Explore the agents you're connected to
Smart Conflict Resolution:
I need to use the weatherAgent from server1 specifically, not the default one
Dynamic Network Expansion:
Connect to the ML specialists at https://ml-specialists.vercel.app and then use their modelTrainer agent
Variable | Default | Description |
---|---|---|
AGENT_SERVERS | (none) | Space/comma-separated server URLs (supports Mastra and LangGraph) |
MCP_SERVER_PORT | 3001 | Proxy server port |
MCP_TRANSPORT | http | Transport method (stdio/http) |
Ready-to-use configurations in the examples/
directory:
mcp.json
- Zero setupmulti-server-config.json
- Multiple local serversvercel-config.json
- Cloud deploymentFor advanced configuration options, see CONFIGURATION.md.
NPX Issues:
npx clear-npx-cache
npx mcp-agent-proxy@latest
Port Conflicts:
"env": { "MCP_SERVER_PORT": "3002" }
Connection Issues:
langgraph dev
)Debug Mode:
DEBUG=mastra:* npx mcp-agent-proxy
We've implemented comprehensive validation workflows to ensure code quality and MCP protocol compliance:
# Quick validation (build + test + lint + format)
pnpm validate:quick
# Full validation (includes integration tests + health checks)
pnpm validate:full
# CI validation (includes coverage + dead code analysis)
pnpm validate:ci
# Build and test
pnpm build
pnpm test
pnpm test:integration
# Code quality
pnpm lint
pnpm format
pnpm format:check
# Test MCP protocol compliance
pnpm mcp:test
# Test security features
pnpm security:test
# Manual server testing
pnpm start # Start server
pnpm check # Check running server (requires jq)
Use pnpm run
to see all available scripts, or use these common ones:
pnpm dev # Build and start development server
pnpm test # Run all tests
pnpm test:watch # Run tests in watch mode
pnpm build # Build for production
pnpm lint # Run ESLint
pnpm format # Format code with Prettier
We welcome contributions! Please see our Contributing Guide for details.
MIT License - see LICENSE file for details.
π Configuration Guide β’ π Examples β’ π Issues β’ π¬ Discussions
Building the Internet of Agents, one connection at a time.
FAQs
MCP proxy server that allows MCP clients to communicate with agent servers (Mastra, LangGraph, etc.)
The npm package mcp-agent-proxy receives a total of 71 weekly downloads. As such, mcp-agent-proxy popularity was classified as not popular.
We found that mcp-agent-proxy demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.Β It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.