返回 MCP 目录
public公开dns本地运行

AgentRPC服务器

AgentRPC 是一个跨网络边界和语言的通用 RPC 层,专为 AI 代理设计。它允许用户在不同环境(如私有 VPC、Kubernetes 集群、多云环境)中注册和连接任何语言的函数,并将它们包装在通用的 RPC 接口中。通过支持模型上下文协议(MCP)和 OpenAI 兼容的工具定义,AgentRPC 提供了一个托管的 RPC 服务器,使外部 AI 模型能够与注册的工具进行交互。其主要特性包括多语言支持、私有网络支持、长时间运行的函数、全面可观测性、自动故障转移和框架兼容性。AgentRPC 还提供了 TypeScript SDK,包含一个可选的 MCP 服务器,便于集成到各种开发环境中。

article

README

AgentRPC

NPM Version GitHub go.mod Go version PyPI - Python Version License

Universal RPC layer for AI agents across network boundaries and languages

Overview

AgentRPC allows you to connect to any function, in any language, across network boundaries. It's ideal when you have services deployed in:

  • Private VPCs
  • Kubernetes clusters
  • Multiple cloud environments

AgentRPC wraps your functions in a universal RPC interface, connecting them to a hosted RPC server accessible through open standards:

  • Model Context Protocol (MCP)
  • OpenAI-compatible tool definitions (OpenAI, Anthropic, LiteLLM, OpenRouter, etc.)

deployment

How It Works

  1. Registration: Use our SDK to register functions and APIs in any language
  2. Management: The AgentRPC platform (api.agentrpc.com) registers the function and monitors its health
  3. Access: Receive OpenAPI SDK compatible tool definitions and a hosted MCP server for connecting to compatible agents

Key Features

| Feature | Description | |---------|-------------| | Multi-language Support | Connect to tools in TypeScript, Go, Python and .NET (coming soon) | | Private Network Support | Register functions in private VPCs with no open ports required | | Long-running Functions | Long polling SDKs allow function calls beyond HTTP timeout limits | | Full Observability | Comprehensive tracing, metrics, and events for complete visibility | | Automatic Failover | Intelligent health tracking with automatic failover and retries | | Framework Compatibility | Out-of-the-box support for MCP and OpenAI SDK compatible agents |

Getting Started

Quick Start

Follow the quick start example on our docs site.

Examples

Explore working examples in the examples directory.

MCP Server

The AgentRPC TypeScript SDK includes an optional MCP (Model Context Protocol) server.

ANGENTRPC_API_SECRET=YOUR_API_SECRET npx agentrpc mcp

This launches an MCP-compliant server for external AI models to interact with your registered tools.

Claude Desktop Integration

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "agentrpc": {
      "command": "npx",
      "args": [
        "-y",
        "agentrpc",
        "mcp"
      ],
      "env": {
        "AGENTRPC_API_SECRET": "<YOUR_API_SECRET>"
      }
    }
  }
}

More Info

Cursor Integration

Add to your ~/.cursor/mcp.json:

{
  "mcpServers": {
    "agentrpc": {
      "command": "npx",
      "args": ["-y", "agentrpc", "mcp"],
      "env": {
        "AGENTRPC_API_SECRET": "<YOUR_API_SECRET>"
      }
    }
  }
}

More Info

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

This repository contains all the open-source components and SDKs for AgentRPC.

help

运行方式说明

cloud

托管运行

托管运行通常表示这个 MCP Server 由服务方环境承载,用户一般按页面提供的连接方式或授权流程接入,不需要在本地长期启动一个 MCP 进程

  1. 打开服务方连接页
  2. 完成授权或复制端点
  3. 在 MCP 客户端中连接
terminal

本地运行 / 其它方式

本地运行通常需要用户在自己的电脑或服务器上安装依赖,把 server_config 复制到 MCP 客户端,并按 env_schema 补齐环境变量、密钥或其它配置

  1. 复制 server_config
  2. 安装所需依赖
  3. 补齐环境变量后重启客户端