Relay

Relay

Enables AI agents to access a unified catalog of tools from various APIs (OpenAPI, GraphQL, MCP, Google Discovery) through the MCP protocol.

Category
访问服务器

README

<p align="center"> <img src="assets/relay-icon.png" alt="Relay" width="80" /> </p>

<h1 align="center">Relay</h1>

<p align="center"> <strong>The integration layer for AI agents.</strong><br/> One catalog for every tool, shared across every agent you use. </p>

<p align="center"> <a href="https://www.npmjs.com/package/relay"><img src="https://img.shields.io/npm/v/relay?color=3B82F6&label=npm&style=flat-square" alt="npm version" /></a> <a href="https://github.com/gothamdev244/relay/blob/main/LICENSE"><img src="https://img.shields.io/github/license/gothamdev244/relay?color=10B981&style=flat-square" alt="license" /></a> <a href="https://discord.gg/eF29HBHwM6"><img src="https://img.shields.io/badge/discord-join-5865F2?style=flat-square&logo=discord&logoColor=white" alt="discord" /></a> </p>


<p align="center"> <img src="assets/demo.gif" alt="Relay CLI Demo" width="600" /> </p>

Relay is an open-source runtime that unifies your integrations — OpenAPI, GraphQL, MCP, and Google Discovery — into a single tool catalog. Connect once, use everywhere: from Claude Code and Cursor to custom agents built with the SDK.

Architecture

<p align="center"> <img src="assets/architecture.svg" alt="Relay Architecture" width="100%" /> </p>

Quick Start

npm install -g relay
relay web

Opens a local runtime with a web UI at http://127.0.0.1:4788. Add your first source and start using tools.

Use as an MCP Server

Point any MCP-compatible agent at Relay to share your tool catalog, auth, and policies across all of them.

relay mcp

Example mcp.json for Claude Code / Cursor:

{
  "mcpServers": {
    "relay": {
      "command": "relay",
      "args": ["mcp"]
    }
  }
}

SDK

Three entry points — pick the one that fits:

Import Use case
@relay-sh/sdk Promise-based. Scripts, quick integrations, non-Effect codebases.
@relay-sh/sdk/core Effect-native. Full type safety, streaming, composable pipelines.
@relay-sh/sdk/testing Mocks and utilities for writing tests against your tools.
import { createRelay } from "@relay-sh/sdk";

const relay = await createRelay();

await relay.openapi.addSpec({
  url: "https://petstore3.swagger.io/api/v3/openapi.json",
});

const tools = await relay.tools.list();
console.log(tools);

await relay.close();

Adding Sources

Relay has first-party support for OpenAPI, GraphQL, MCP, and Google Discovery. The plugin system is open to any source type.

Web UI

Open http://127.0.0.1:4788Add Source → paste a URL. Relay detects the type, indexes tools, and handles auth.

CLI

relay call relay openapi addSource '{
  "spec": "https://petstore3.swagger.io/api/v3/openapi.json",
  "namespace": "petstore",
  "baseUrl": "https://petstore3.swagger.io/api/v3"
}'

Using Tools

Programmatic

const matches = await tools.discover({ query: "github issues", limit: 5 });

const detail = await tools.describe.tool({
  path: matches.bestPath,
  includeSchemas: true,
});

const issues = await tools.github.issues.list({
  owner: "vercel",
  repo: "next.js",
});

CLI

relay tools search "send email"
relay call github issues create '{"owner":"octocat","repo":"Hello-World","title":"Hi"}'
relay call gmail send '{"to":"alice@example.com","subject":"Hi"}'

If an execution pauses for auth or approval:

relay resume --execution-id exec_123

CLI Reference

relay web                               Start runtime + web UI
relay daemon run | status | stop        Manage background daemon
relay mcp                               Start MCP endpoint
relay call <path...> '{"k":"v"}'        Invoke a tool by path
relay call <path...> --help             Browse namespaces and methods
relay resume --execution-id <id>        Resume paused execution
relay tools search "<query>"            Search tools by intent
relay tools sources                     List sources + tool counts
relay tools describe <path>             Show tool schema

Project Structure

apps/
  cli/            CLI (relay command)
  local/          Local runtime server
  cloud/          Hosted service
  desktop/        Desktop app
  marketing/      relay.sh website

packages/
  core/
    sdk/          Core contracts, plugin wiring, scopes, policies
    execution/    Execution engine
    config/       Configuration and scope management
    storage-*/    Storage adapters
  plugins/
    openapi/      OpenAPI plugin
    graphql/      GraphQL plugin
    mcp/          MCP plugin
    google-*/     Google Discovery plugin
  kernel/
    quickjs/      QuickJS sandboxed runtime
    deno/         Deno subprocess runtime
    ir/           IR compiler
  react/          React UI components
  hosts/
    mcp/          MCP host surface

Development

bun install
bun run dev

Dev server starts at http://127.0.0.1:4788.

bun run test          # run tests
bun run lint          # oxlint
bun run typecheck     # type checking
bun run format        # oxfmt

See CONTRIBUTING.md for full setup instructions.

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选