Add example: external HTTP MCP server (TensorFeed.ai)#945
Open
RipperMercs wants to merge 1 commit into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
examples/external_mcp_tensorfeed.pydemonstrating how to wire an external HTTP MCP server into the Claude Agent SDK viaClaudeAgentOptions.mcp_servers. Pairs with the existingexamples/mcp_calculator.py(which shows the in-process SDK server side of theMcpServerConfigunion) by covering thetype: "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 asai.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_bylist 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
mcp_calculator.pycreate_sdk_mcp_serverplugin_example.pyplugins=[{type: "local"}]tools_option.pytools=[...]external_mcp_tensorfeed.py(new)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.pyruns end-to-end with justOPENAI_API_KEYand the SDK installed (locally tested 2026-05-09)ClaudeAgentOptions/query/AssistantMessage/TextBlock/ResultMessageAPILicense
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.