foggy-data-mcp-bridge-python: Instructions file for Claude Code

CLAUDE.md

foggy-data-mcp-bridge-python CLAUDE.md is an instructions file for Claude Code from foggy-projects/foggy-data-mcp-bridge-python. It costs 1,259 tokens per session, scanned A, original, Apache-2.0.

A Python service that connects an agent to structured data in a MySQL database through an MCP server. MCP is a standard way for an AI tool to expose callable functions to an agent.

In plain words
What is it for?
Use it to install and test the Python project, start the MCP service, connect it to MySQL, and maintain its query tools, models, routers, and audit logging. It is also used when synchronising definitions from the Java project.
Why use it?
It lets an agent query application data through a defined semantic layer instead of requiring every request to be written as raw database code. The instructions also keep the Python version aligned with its Java source and database schemas.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md.

This is foggy-projects/foggy-data-mcp-bridge-python's own configuration. It tells Claude Code how to work on foggy-data-mcp-bridge-python itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything foggy-data-mcp-bridge-python configures →

Reuse

Borrowing it

Nothing to install: this file belongs to foggy-projects/foggy-data-mcp-bridge-python. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/foggy-projects/foggy-data-mcp-bridge-python/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/foggy-projects/foggy-data-mcp-bridge-python

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for foggy-data-mcp-bridge-python CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/foggy-projects/foggy-data-mcp-bridge-python/claude-md/github.svg)](https://agentmods.dev/instructions/foggy-projects/foggy-data-mcp-bridge-python/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/foggy-projects/foggy-data-mcp-bridge-python/claude-md"><img src="https://agentmods.dev/badge/instructions/foggy-projects/foggy-data-mcp-bridge-python/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for foggy-data-mcp-bridge-python CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/foggy-projects/foggy-data-mcp-bridge-python/claude-md"><img src="https://agentmods.dev/badge/instructions/foggy-projects/foggy-data-mcp-bridge-python/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,259 This file is loaded in full into every session.
When invoked 1,259 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.01259 $0.01259
Opus 5.5 $0.00504 $0.00504
Sonnet 5.5 $0.00252 $0.00252
Haiku 4.5 $0.00126 $0.00126

Measured 2mo ago against content hash f1366047b4f1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

foggy-data-mcp-bridge-python CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 114 lines

How it starts

The opening of the file, as written. The whole thing — 114 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Foggy Data MCP Bridge — Python

开源项目,请勿上传私有 key、账号密码、token 等敏感信息。

从 foggy-data-mcp-bridge (Java) 迁移的 Python 版语义层查询服务。

快速启动

cd foggy-python

# 安装依赖
pip install -e ".[dev]"
pip install aiomysql   # MySQL 支持

# 运行测试
python -m pytest --tb=short -q

# 启动 MCP 服务(连接 Docker MySQL)
python -m foggy.demo.run_demo --port 8066

# 或指定数据库
python -m foggy.mcp.launcher.app --db-host localhost --db-port 13306 --db-user foggy --db-password foggy_test_123 --db-name foggy_test

项目结构

foggy-python/
├── src/foggy/
│   ├── core/              # 核心工具(异常、过滤器、工具类)
│   ├── bean_copy/         # Bean/Map 转换
│   ├── mcp_spi/           # MCP 工具接口
│   ├── dataset/           # 数据库层(方言、SQL 构建、ResultSet)
│   ├── dataset_model/     # 语义层引擎(定义、查询、元数据)
│   ├── fsscript/          # FSScript 脚本引擎
│   ├── mcp/               # MCP 服务器
│   │   ├── launcher/      # FastAPI 启动器
│   │   ├── routers/       # HTTP 路由(admin/analyst/mcp_rpc)
│   │   ├── schemas/       # 工具定义文件(从 Java 同步)
│   │   ├── spi/           # DatasetAccessor
│   │   ├── config/        # 配置(DataSource、Properties)
│   │   └── audit/         # 审计日志
│   └── demo/              # 演示模型和启动脚本
├── tests/                 # pytest 测试(625+)
└── scripts/
    └── sync_mcp_schemas.py  # 同步 Java 工具定义

MCP 端点

路径 方法 说明
/mcp/analyst/rpc POST MCP Streamable HTTP(JSON-RPC 2.0)
/mcp/analyst/rpc GET SSE 流
/api/v1/models GET 列出所有模型
/api/v1/models/{name} GET 模型元数据
/api/v1/query/{name} POST 执行查询
/api/v1/query/{name}/validate POST 验证查询(不执行)
/health GET 健康检查
/docs GET Swagger UI

MCP 工具(对齐 Java)

工具名 说明 状态
dataset.get_metadata 获取所有模型和字段的 V3 元数据包 ✅
dataset.describe_model_internal 获取指定模型的详细元数据定义 ✅
dataset.query_model 执行数据模型查询(V3:支持 payload 格式) ✅
dataset_nl.query 自然语言查询 ⏳ 需要 AI 服务
dataset.compose_query FSScript 多模型编排查询 ⏳
chart.generate 图表生成 ⏳ 需要 chart-render-service
dataset.export_with_chart 查询+图表导出 ⏳
dataset.inspect_table 数据库表结构检查 ⏳

Read the full file on GitHub · 114 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 114 lines · 1,259 tokens per session scan A f1366047b4f1

Subscribe to this mod's changes

foggy-data-mcp-bridge-python CLAUDE.md is an instructions file published in the GitHub repository foggy-projects/foggy-data-mcp-bridge-python (4 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 1,259 tokens to every session, about $0.0050 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

foggy-data-mcp-bridge-python CLAUDE.md compared with instructions from other repositories

foggy-data-mcp-bridge-python CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
foggy-data-mcp-bridge-python CLAUDE.mdfoggy-projects/foggy-data-mcp-bridge-pythonInstructions file42mo agoApache-2.0A1,259Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode