Skip to content

Add example: external HTTP MCP server (TensorFeed.ai)#945

Open
RipperMercs wants to merge 1 commit into
anthropics:mainfrom
RipperMercs:ripper/add-tensorfeed-mcp-example
Open

Add example: external HTTP MCP server (TensorFeed.ai)#945
RipperMercs wants to merge 1 commit into
anthropics:mainfrom
RipperMercs:ripper/add-tensorfeed-mcp-example

Conversation

@RipperMercs
Copy link
Copy Markdown

Summary

Adds examples/external_mcp_tensorfeed.py demonstrating how to wire an external HTTP MCP server into the Claude Agent SDK via ClaudeAgentOptions.mcp_servers. Pairs with the existing examples/mcp_calculator.py (which shows the in-process SDK server side of the McpServerConfig union) by covering the type: "http" external-hosted side.

What it teaches

The example uses TensorFeed.ai's hosted MCP server (https://tensorfeed.ai/api/mcp, no auth required, also published in the official Model Context Protocol Registry as ai.tensorfeed/mcp-server). Demo task: cross-database CVE verification.

The agent autonomously sequences three tool calls (MITRE CVE record, CISA KEV catalog, FIRST.org EPSS score) and surfaces a confirmed_by list so the user can audit which sources backed the answer. The premise the example explains: the actual production failure mode for security agents is not hallucination but acting on a single source. Cross-source corroboration is the fix; one external MCP server in the agent loop replaces N parallel API integrations.

Why it complements the existing examples

Example Pattern
mcp_calculator.py In-process SDK server via create_sdk_mcp_server
plugin_example.py Local plugin via plugins=[{type: "local"}]
tools_option.py Built-in tool selection via tools=[...]
external_mcp_tensorfeed.py (new) External HTTP MCP server via mcp_servers={...type: "http"}

Together these cover the four main ways an SDK user wires capabilities into a Claude agent.

Test plan

  • python examples/external_mcp_tensorfeed.py runs end-to-end with just OPENAI_API_KEY and the SDK installed (locally tested 2026-05-09)
  • TensorFeed MCP server is live and stable (also published in MCP Registry, used by other Anthropic vertical-marketplace repos via PRs in anthropics/life-sciences#41, anthropics/skills#1114, anthropics/knowledge-work-plugins#221, anthropics/financial-services#156)
  • No new SDK dependencies; uses only the existing ClaudeAgentOptions / query / AssistantMessage / TextBlock / ResultMessage API
  • License posture documented in the docstring (TensorFeed underlying data is mostly US Government public domain or CC0)

License

The example file itself is MIT (matching the SDK repo).

About TensorFeed

TensorFeed.ai aggregates and re-serves machine-readable AI ecosystem data. Source: https://github.com/RipperMercs/tensorfeed. Endpoint catalog: https://tensorfeed.ai/api/meta. The MCP server exposes 17 free tools across AI news, model pricing, AI service status, security advisories, SEC EDGAR filings, FDA regulatory data, and US energy indicators.

Adds examples/external_mcp_tensorfeed.py demonstrating how to wire
an external HTTP MCP server into the Claude Agent SDK. Pairs nicely
with examples/mcp_calculator.py (in-process SDK MCP server) by
showing the type="http" external-hosted side of the McpServerConfig
union.

The demo walks through cross-database CVE verification. The agent
calls three tools on the TensorFeed MCP server (MITRE CVE record,
CISA KEV catalog, FIRST.org EPSS score) and composes a single fact
card with a confirmed_by list. No auth required for these free tools.

The example is runnable with just the SDK and an Anthropic API key:

    python examples/external_mcp_tensorfeed.py

Other free tools the same server exposes (worth trying for users
exploring this example): get_news_articles, get_status_summary,
get_models, query_fda_drug_recalls, search_sec_edgar, get_eia_series.

License posture: TensorFeed underlying data is mostly US Government
public domain (SEC, BLS, FRED, MITRE, CISA, EIA) or CC0 (openFDA),
with FIRST.org EPSS free-for-any-use and OSV.dev under Apache 2.0.
Commercial redistribution permitted; attribution preserved on every
response.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants