claude-fde-showcase

claude-fde-showcase

MCP server demonstrating FDE primitives: TF-IDF search, extractive summarisation, and an AST-sandboxed calculator. Designed for offline, deterministic tool use.

Category
访问服务器

README

claude-fde-showcase

CI

A compact, runnable demonstration of the three engineering primitives a Forward Deployed Engineer (FDE) / Applied AI engineer assembles when shipping production systems with Claude:

  1. An MCP server that gives a model typed, auditable access to tools.
  2. A sub-agent orchestrator that routes work to specialised, swappable workers.
  3. An agent skill that packages a capability as a self-describing unit.

Everything here is real, deterministic, and offline. There are no fabricated benchmarks, no client data, and no API keys required. The core logic uses the Python standard library only; the mcp SDK is needed solely to serve the tools, and is imported lazily so the entire test suite and CI run green without it.


Architecture

┌──────────────────────────────────────────────────────────────┐
│  MCP client (Claude Desktop, custom agent, ...)               │
└───────────────────────────┬──────────────────────────────────┘
                            │  stdio (MCP)
                            ▼
┌──────────────────────────────────────────────────────────────┐
│  MCP server  (src/claude_fde_showcase/mcp_server/server.py)   │
│  FastMCP — imported lazily — registers 4 tools:               │
│    • search_docs   • summarise   • calculate   • list_docs    │
└───────────────────────────┬──────────────────────────────────┘
                            │  calls pure, std-lib-only logic
                            ▼
┌──────────────────────────────────────────────────────────────┐
│  Tool logic  (src/claude_fde_showcase/tools/)                 │
│    search.py      TF-IDF cosine retrieval over docs/          │
│    summarise.py   extractive (Luhn-style) summarisation       │
│    calculator.py  AST-sandboxed safe arithmetic              │
└──────────────────────────────────────────────────────────────┘
        ▲                                   ▲
        │ same functions reused by          │ same summariser reused by
        │                                   │
┌───────┴───────────────────┐     ┌─────────┴────────────────────┐
│ Sub-agent orchestrator    │     │ Agent skill                  │
│ subagents/orchestrator.py │     │ agent_skills/doc_summariser/ │
│  routes search/summarise/ │     │  SKILL.md + helper.py        │
│  calculate to sub-agents  │     │                              │
└───────────────────────────┘     └──────────────────────────────┘

The key design decision is the seam between transport and logic. The pure tool logic in tools/ has no third-party dependency and is unit-tested directly. The MCP server, the orchestrator, and the agent skill are all thin layers over that same logic, so each can be evolved (e.g. swapping a deterministic worker for a Claude-backed one) without touching the others.

Components

Component Path What it actually does
MCP server src/claude_fde_showcase/mcp_server/server.py FastMCP server exposing search_docs, summarise, calculate, list_docs. mcp is imported lazily inside build_server().
search_docs src/claude_fde_showcase/tools/search.py Loads docs/*.md into an in-memory TF-IDF index and ranks documents by cosine similarity — computed from scratch with the standard library.
summarise src/claude_fde_showcase/tools/summarise.py Extractive summarisation: scores sentences by normalised term frequency (a Luhn-method variant) and returns the most salient ones in original order.
calculate src/claude_fde_showcase/tools/calculator.py AST-sandboxed arithmetic. Parses to an AST and walks an explicit node allowlist — never evals the string, so code injection is impossible.
Sub-agents subagents/orchestrator.py Orchestrator with explicit routing, infer_kind() classification, per-task error isolation, and result aggregation.
Agent skill agent_skills/doc_summariser/ SKILL.md capability description + helper.py exposing summarise_document / gist, sharing the same summariser as the MCP tool.
Docs corpus docs/ Five markdown documents that search_docs indexes and summarise can condense.
Tests tests/ 60+ pytest cases over every tool, the orchestrator, and the skill — all passing without mcp installed.
CI .github/workflows/ci.yml py_compile + pytest across Python 3.10–3.13, with mcp deliberately absent.

How this maps to a Forward Deployed Engineer role

An FDE embeds with a customer and turns frontier-model capability into a production system. This repo is a miniature of that workflow:

  • Integration without leaking data — the MCP server. An FDE connects a customer's private systems (a search index, a database, an internal API) to Claude through typed, auditable tools rather than dumping data into prompts. Here, search_docs plays that role over a local corpus; in a real engagement you swap DocStore for the customer's vector store behind the same interface and nothing downstream changes.

  • Decomposition you can test and evolve — the orchestrator. Production agentic systems are not one giant prompt. The orchestrator shows the pattern an FDE scales: deterministic stub workers prove the routing, error isolation, and aggregation first, then individual workers are replaced with Claude-backed implementations one at a time, each independently evaluable.

  • Hardened tools over hallucinated output — the calculator. A model should offload exact computation to deterministic code. The AST sandbox is exactly the kind of small, secure tool an FDE writes so the system computes instead of guessing — and the security tests prove the injection path is closed.

  • Reusable domain knowledge — the agent skill. SKILL.md is how an FDE encodes a customer's house style and domain knowledge into a portable, self-describing unit that survives across sessions and teammates.

  • Ship-with-confidence discipline — tests + CI. Pure logic is separated from transport so it can be tested fast, offline, with no keys. CI proves the whole thing compiles and passes with no mcp package and no network — the same reproducibility bar an FDE has to clear before anything reaches a customer.


Quickstart

python -m venv .venv && source .venv/bin/activate

# Install the package + test tooling (NO mcp SDK needed for any of the below):
pip install -e ".[dev]"

# Run the full test suite (offline, deterministic):
pytest

# Run the sub-agent orchestrator demo (search + summarise + calculate):
python -m subagents.orchestrator

# Run the agent-skill helper:
python agent_skills/doc_summariser/helper.py

Trying the pure logic in a REPL

from claude_fde_showcase.tools import search_docs, summarise_extractive, calculate

search_docs("how does an MCP server expose tools", limit=2)
summarise_extractive(open("docs/forward_deployed_engineering.md").read(), max_sentences=3)
calculate("sqrt(144) + 2 ** 5")   # -> 44.0

Running the actual MCP server

The MCP transport is the only part that needs the SDK:

pip install -e ".[mcp]"
claude-fde-mcp            # serves search_docs / summarise / calculate / list_docs over stdio

Point any MCP client (e.g. Claude Desktop) at that command to call the tools.


Testing & CI

  • tests/ contains focused suites: test_search.py, test_summarise.py, test_calculator.py (including security/injection cases), test_orchestrator.py, and test_smoke.py (cross-cutting / skill integration).
  • The suite asserts that the server module imports and its logic runs without the mcp package — guaranteeing the transport/logic separation actually holds.
  • .github/workflows/ci.yml installs only pytest, confirms mcp is absent, byte-compiles every source file, runs pytest, and smoke-runs the demos — across Python 3.10 through 3.13.

What this is (and is not)

It is a faithful, runnable illustration of the FDE building blocks with real algorithms (TF-IDF retrieval, extractive summarisation, an AST sandbox) and a real test/CI story. It is not a benchmark, and it makes no claims about model accuracy or production results — every number you see is computed by the deterministic code in this repo.

License

MIT — see LICENSE.

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选