Agent Data Bridge

Agent Data Bridge

agent-data-bridge•byariascarlet132

A service that exposes data-fetching and Python sandbox capabilities as MCP tools over an SSE transport.

License: Not specified•Runtime: Awaiting documentation review•Category: developer tools

WHAT IT DOES

  • •Provides an MCP Server over SSE with three tools: fetch_data, sandbox_run, and sandbox_list_files.
  • •Provides a sandbox_run MCP tool that runs Python code in a designated sandbox directory, with timeout and output-length truncation.
  • •Parses the first Markdown table in returned data into a DataFrame; small results are returned as tables, while large results are saved as parquet in the sandbox directory with a summary.

BEST FOR

  • •Agents that need to fetch data and then analyze the resulting parquet file with Python in a sandbox.
  • •Lightweight execution of trusted Python scripts where the working directory is confined to SANDBOX_DIR, with timeout and output truncation.

ABOUT AGENT-DATA-BRIDGE

Agent Data Bridge is cataloged as an MCP server attributed to ariascarlet132. A service that exposes data-fetching and Python sandbox capabilities as MCP tools over an SSE transport. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Agent Data Bridge are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

What MCP tools does the server expose?

It exposes fetch_data, sandbox_run, and sandbox_list_files.

Is sandbox execution strongly isolated?

No. It is not strongly isolated: the working directory is only fixed to SANDBOX_DIR and timeout/output truncation are added, so it should not be exposed to untrusted input on the public internet.

Upstream README

View this exact version on GitHub

README.md · c95ce123c30a · Fetched 2026-11-13 08:14:13 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

Agent Data Bridge

一个面向 Agent 的“数据桥接 + 轻量沙盒执行”服务,提供两种对外形态:

  • FastAPI HTTP API:用于手工/系统直接调用。
  • MCP Server(SSE Transport):把能力以 Tool 的形式暴露给支持 MCP 的客户端。

目前实际实现包含:

  • 通过两步 OAuth2(token -> query)调用 Spring Boot 接口获取数据(见 src/app/services/springboot_client.py)。
  • 将返回结果中的首个 Markdown 表格解析为 DataFrame;小数据直接返回表格,大数据保存为 parquet 到沙盒目录并返回摘要(见 src/app/main.py)。
  • 提供一个简易 Python “沙盒执行”入口:在指定的沙盒目录中运行脚本,支持超时与输出长度截断(见 src/app/services/sandbox.py)。

运行要求

快速开始

  1. 安装依赖
  • uv sync
  1. 启动 HTTP API(FastAPI)
  • uv run -- uvicorn app.main:app --reload --app-dir src

默认监听 http://127.0.0.1:8000。

如果希望“一条命令同时启动 REST + MCP”,可使用:

  • uv run -- python -m app.run_all

1.(可选)启动 MCP Server(SSE)

本项目的 MCP Server 默认监听 0.0.0.0:9000(可通过 MCP_HOST/MCP_PORT 修改),并使用 SSE 传输:

  • SSE 端点:GET /sse
  • 消息端点:POST /messages/

启动命令:

  • Windows(PowerShell,推荐):
$env:PYTHONPATH = "src"
uv run -- python -m app.mcp_server
  • 或者切换到 src 目录运行(一次性):
pushd src
uv run -- python -m app.mcp_server
popd
  • macOS/Linux:
PYTHONPATH=src uv run -- python -m app.mcp_server

配置(.env)

复制 .env.example 为 .env 后按需修改。

当前代码实际会用到的配置(与 .env.example 保持一致):

  • REST_HOST / REST_PORT:REST(FastAPI) 监听地址(用于 Docker 启动与一键启动脚本)。
  • MCP_HOST / MCP_PORT:MCP(SSE) 监听地址。
  • APP_ID / APP_SECRET:Spring Boot OAuth2 client credentials(默认 agent/agent)。

说明:

  • SPRING_BOOT_BASE_URL / SPRING_BOOT_API_PATH 目前在代码中未被使用;/api/fetch 与 MCP 的 fetch_data 都会直接使用传入的 host 参数作为目标地址(见 src/app/services/springboot_client.py)。

HTTP API

健康检查

  • GET /health

返回:{"status":"ok"}

拉取数据并返回摘要

  • POST /api/fetch

请求体:

{
  "host": "http://192.168.10.21:3000",
  "userid": "Admin",
  "sql": "select ...",
  "dataset": "demo"
}

行为(与实现一致,见 src/app/main.py):

  • 解析返回结果中的 data.markdown(Markdown 表格)。
  • Rows <= 15:直接返回完整 Markdown 表格。
  • Rows > 15:保存为 parquet 到 SANDBOX_DIR,并返回字段预览 + 前 5 行。

响应:

{ "message": "..." }

示例(curl):

curl -X POST http://127.0.0.1:8000/api/fetch \
  -H "Content-Type: application/json" \
  -d '{"host":"http://192.168.10.21:3000","userid":"Admin","sql":"select 1","dataset":"demo"}'

运行沙盒脚本

  • POST /api/sandbox/run

方式 A:JSON

{ "filename": "anything.py", "code": "print(123)" }

方式 B:multipart/form-data

  • 上传字段名 file(.py 文件)
  • 或者传 code / filename

返回(与实现一致,见 src/app/services/sandbox.py):

{
  "filename": "script_xxx.py",
  "exit_code": 0,
  "stdout": "...",
  "stderr": "..."
}

MCP Tools

MCP Server 目前提供以下 tools(见 src/app/mcp_server.py):

  • fetch_data(host, userid, sql, dataset) -> str
  • sandbox_run(code, filename=None) -> dict
  • sandbox_list_files() -> str

常见用法:先 fetch_data 生成 parquet 文件名,再用 sandbox_run 执行 Python 读取:

import pandas as pd
df = pd.read_parquet("<file_name>")
print(df.head())

目录说明

  • sandbox_storage/:默认沙盒数据目录(可通过 SANDBOX_DIR 覆盖)。
  • sandbox_storage/_scripts/:沙盒执行时写入的临时脚本目录(自动创建)。

安全与限制

  • 沙盒执行不是强隔离:只是把工作目录固定到 SANDBOX_DIR,并加了超时与输出截断;请勿在不可信输入场景直接暴露到公网。
  • Spring Boot 的 client_id/client_secret 已改为从 .env 读取(APP_ID/APP_SECRET,默认 agent/agent)。

Docker

同时启动 REST + MCP(推荐使用 compose,并把沙盒目录挂载到宿主机):

docker compose up --build

端口:

  • REST: http://127.0.0.1:${REST_PORT:-8000}
  • MCP(SSE): http://127.0.0.1:${MCP_PORT:-9000}/sse

数据卷:

  • ./sandbox_storage -> /app/sandbox_storage

常见问题

Windows 下 ModuleNotFoundError: No module named 'app'

使用 PowerShell 运行 MCP Server 时,请先设置:

$env:PYTHONPATH = "src"
uv run -- python -m app.mcp_server

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Agent Data Bridge from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/agent-data-bridge)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related developer tools MCP Servers

Alternative and complementary servers in the same category

View all in developer tools →
Postbye
postbye-mcp•postbye-team

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools
Singapore Proxy MCP
singapore-proxy-mcp•Xavierfok

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

0
Developer Tools

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools