13FLOW MCP server
Commit Nov 14, 2026Provides source-linked SEC 13F research, fund data, stock information, and confluence signals for financial analysis via AI agents.
Also known as bluetouff/13flow
- Stars
- 4
- Tools
- —
- Downloads, 30 days
- —
- Latest version
- 1.0.0
- Last commit
- Nov 14, 2026
- License
- AGPL-3.0
What is 13FLOW MCP?
13FLOW provides source-linked SEC 13F research, fund data, stock information, and confluence signals for financial analysis via AI agents.
Summary generated from the project's README
About 13FLOW MCP server
Financial analysts and developers using AI agents can access source-linked SEC 13F research and fund data through this service. It provides tools to examine stock information, fund details, and confluence signals to support investment research. The server operates as a stateless Node service exposing a Model Context Protocol endpoint over Streamable HTTP, connecting to a local Flask API to deliver data without direct EDGAR access.
Public users can access read-only tools such as list_funds, get_stock, get_confluence_signals, and get_signal_history. For advanced requirements, an optional Pro profile can be enabled to provide access to professional tools like pro.list_funds and pro.get_fund. Access to these premium features requires either a valid 13FLOW Pro API key provided in the X-13FLOW-Key header or a verified x402 v2 payment signature. The system maintains strict privacy by storing only UTC daily aggregates for telemetry and never retaining user-specific identifiers or prompts.
Written from the project's README. Every use case is checked against a quote from it.
How to install 13FLOW MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall 13FLOW MCP in Claude Code
$ claude mcp add --transport http 13flow https://13flow.eu/api/mcpInstall 13FLOW MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"13flow": {
"url": "https://13flow.eu/api/mcp"
}
}
}Install 13FLOW MCP in VS Code
.vscode/mcp.json
{
"servers": {
"13flow": {
"type": "http",
"url": "https://13flow.eu/api/mcp"
}
}
}Install 13FLOW MCP in VS Code CLI
$ code --add-mcp '{"name":"13flow","type":"http","url":"https://13flow.eu/api/mcp"}'Install 13FLOW MCP in Codex
$ codex mcp add 13flow --url https://13flow.eu/api/mcpInstall 13FLOW MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.13flow] url = "https://13flow.eu/api/mcp"
Install 13FLOW MCP in Gemini CLI
$ gemini mcp add -s user --transport http 13flow https://13flow.eu/api/mcpInstall 13FLOW MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"13flow": {
"url": "https://13flow.eu/api/mcp",
"type": "http"
}
}
}Configuration
MCP_13FLOW_API_BASEMCP_13FLOW_PRO_API_BASEMCP_ALLOWED_HOSTSMCP_ALLOWED_ORIGINSMCP_API_TIMEOUT_MSMCP_GIT_SHAMCP_HOSTMCP_MAX_BODYMCP_MAX_CONNECTIONSMCP_MAX_IN_FLIGHTMCP_MAX_PAYMENT_CACHEMCP_MAX_RATE_BUCKETSMCP_MAX_UPSTREAM_BODYMCP_PATHMCP_PORTMCP_PRO_TOOLS_ENABLEDMCP_PUBLIC_SITEMCP_RATE_MAXMCP_REQUEST_TIMEOUT_MSMCP_STATS_FILEMCP_STATS_RETENTION_DAYSSKIP_HEALTHSTATS_URL
| Name | Description | |
|---|---|---|
| MCP_13FLOW_API_BASE | — | |
| MCP_13FLOW_PRO_API_BASE | — | |
| MCP_ALLOWED_HOSTS | — | |
| MCP_ALLOWED_ORIGINS | — | |
| MCP_API_TIMEOUT_MS | — | |
| MCP_GIT_SHA | — | |
| MCP_HOST | — | |
| MCP_MAX_BODY | — | |
| MCP_MAX_CONNECTIONS | — | |
| MCP_MAX_IN_FLIGHT | — | |
| MCP_MAX_PAYMENT_CACHE | — | |
| MCP_MAX_RATE_BUCKETS | — | |
| MCP_MAX_UPSTREAM_BODY | — | |
| MCP_PATH | — | |
| MCP_PORT | — | |
| MCP_PRO_TOOLS_ENABLED | — | |
| MCP_PUBLIC_SITE | — | |
| MCP_RATE_MAX | — | |
| MCP_REQUEST_TIMEOUT_MS | — | |
| MCP_STATS_FILE | — | |
| MCP_STATS_RETENTION_DAYS | — | |
| SKIP_HEALTH | — | |
| STATS_URL | — |
Automated checks
Ran Nov 14, 2026Full report →Not verified yet. A server needs a score of 80, no serious finding, and enough data for us to check. How checks work · What to fix for more points
- Source repository linked and reachablebluetouff/13flow is public and reachablegithub.com/bluetouff/13flow ↗Pass
- Package names this repository as its sourceNot checked
- Build provenance (Sigstore attestation)Not checked
- Open source license (OSI)AGPL-3.0spdx.org/licenses/AGPL-3.0.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-10-31github.com/bluetouff/13flow ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNot checked
- No critical advisory in the package or its dependenciesNot checked
- No hidden instructions to the model0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNot checked
- Remote endpoint answers the MCP handshakeinitialize answered with protocol 2025-06-18 in 68 msPass
README
View on GitHub13FLOW MCP Server
This directory contains the production MCP surface for 13FLOW.
It is intentionally separate from the Flask application:
- Flask serves the public website, public API and Pro API.
- This Node service exposes a Model Context Protocol endpoint over Streamable HTTP.
- Apache publishes the service at
https://13flow.eu/api/mcp. - The service calls the local Flask API at
http://127.0.0.1:8000and never touches EDGAR.
The design mirrors the l0g.fr MCP architecture: stateless transport, one MCP server per request, bounded JSON bodies, Host/Origin validation, per-IP rate limiting, health checks, structured tool output and read-only annotations.
Capability boundary
Public tools are free and read-only:
get_live_statusget_product_statusget_research_readinesslist_fundsget_fundget_stockpreview_watchlistdiscover_watchlistget_confluence_signalsget_signal_historyget_confluence_methodologyget_data_qualityget_agent_stats
Public resources include 13flow://product-status, 13flow://research-readiness and
13flow://agent-stats.
They expose the current validation, data-quality and operator-review boundaries without
turning the retired public commercial offer into an agent-facing contract.
get_agent_stats, the resource and GET /stats expose the same privacy-safe counters used
by /agents, /fr/agents and /api/agent-stats. They store UTC daily aggregates only:
fixed client families, registered tool names, handler outcomes and duration counters. The
telemetry store never retains IP addresses, User-Agents, client versions, raw client names,
arguments, prompts, responses or keys. An initialization is a handshake, not a unique user.
Context-heavy tools are bounded by default. list_funds returns compact paginated rows,
fund and ticker tools expose explicit result-window counts, and watchlist tools limit
movement evidence while keeping canonical web and API URLs in structured output.
Optional Pro tools are read-only, but are not registered or advertised unless an operator
deliberately sets MCP_PRO_TOOLS_ENABLED=1:
pro.list_fundspro.get_fundpro.get_data_quality
When that separate profile is enabled, calls are accepted only when one of these conditions is true:
- The request includes a valid existing 13FLOW Pro API key in
X-13FLOW-Key. - The request includes an x402 v2
PAYMENT-SIGNATUREthat is verified and settled through the configured facilitator.
Client Authorization headers are never accepted as MCP Pro credentials and are never
forwarded downstream. This prevents an MCP OAuth token from being passed through to a
different API audience.
If neither condition holds, the server returns HTTP 402 Payment Required with a
PAYMENT-REQUIRED header. The body remains JSON-RPC shaped so MCP clients can display a
clear failure.
x402 policy
13FLOW can use x402 as a machine-to-machine payment gate for individual Pro MCP tool calls. It is disabled by default, absent from the Registry profile and not part of the current public offer. Enabling it also requires an explicit Pro profile and a fresh operational security review. The server advertises one accepted payment option for each paid tool:
- scheme:
exactby default - network:
eip155:8453by default - price:
MCP_X402_PRICE - destination:
MCP_X402_PAY_TO - resource:
https://13flow.eu/api/mcp#<tool>
The server is fail-closed:
- if
MCP_X402_ENABLED=1is absent, no x402 paid access is granted; - if
MCP_X402_PAY_TOis absent, no x402 paid access is granted; - if
MCP_X402_FACILITATOR_URLis absent, no x402 paid access is granted; - if
MCP_13FLOW_INTERNAL_PRO_TOKEN_FILEis absent, no x402 paid access is granted; - a payment must pass facilitator
/verifyand/settlebefore the MCP tool runs.
The implementation follows x402 v2 HTTP headers:
PAYMENT-REQUIRED: server to client, base64 JSON payment requirement;PAYMENT-SIGNATURE: client to server, base64 JSON payment payload;PAYMENT-RESPONSE: server to client, base64 JSON settlement response.
The optional payment-identifier extension is accepted. When present, the server stores a short-lived fingerprint-bound settlement cache so retries for the exact same request do not execute as a different paid operation. Use Redis or another shared store before running multiple MCP replicas behind a load balancer.
Environment
MCP_HOST=127.0.0.1
MCP_PORT=8849
MCP_PATH=/mcp
MCP_PUBLIC_SITE=https://13flow.eu
MCP_13FLOW_API_BASE=http://127.0.0.1:8000
# Required only for an explicitly enabled isolated Pro profile.
MCP_13FLOW_PRO_API_BASE=http://127.0.0.1:8001
MCP_ALLOWED_HOSTS=13flow.eu,www.13flow.eu,127.0.0.1,localhost
MCP_ALLOWED_ORIGINS=https://13flow.eu,https://www.13flow.eu
MCP_RATE_MAX=120
MCP_MAX_RATE_BUCKETS=10000
MCP_MAX_BODY=1048576
MCP_MAX_UPSTREAM_BODY=8388608
MCP_MAX_IN_FLIGHT=32
MCP_MAX_CONNECTIONS=128
MCP_MAX_PAYMENT_CACHE=500
MCP_STATS_RETENTION_DAYS=30
# Production is pinned to this systemd StateDirectory path.
MCP_STATS_FILE=/var/lib/13flow-mcp/agent-stats.json
MCP_API_TIMEOUT_MS=10000
MCP_REQUEST_TIMEOUT_MS=15000
MCP_GIT_SHA=<deploy sha>
# Keep this disabled on the public Registry daemon.
MCP_PRO_TOOLS_ENABLED=0
# Optional isolated profile only (do not uncomment on the Registry daemon):
# MCP_PRO_TOOLS_ENABLED=1
# MCP_X402_ENABLED=1
# MCP_X402_SCHEME=exact
# MCP_X402_NETWORK=eip155:8453
# MCP_X402_PRICE=$0.05
# MCP_X402_PAY_TO=0x...
# MCP_X402_ASSET=<optional asset identifier>
# MCP_X402_FACILITATOR_URL=https://...
# Production secrets must use root-owned files, never inline environment values.
# MCP_X402_FACILITATOR_AUTH_FILE=/etc/13flow/mcp-facilitator-auth
# Server-side Pro credential used only after a verified x402 settlement.
# Prefer the _FILE form with a root-readable/flowmcp-readable 0640 secret.
# MCP_13FLOW_INTERNAL_PRO_TOKEN_FILE=/etc/13flow/mcp-internal-pro-token
MCP_X402_TEST_MODE=1 is only for local tests. It must not be enabled in production.
Local run
cd mcp-server
npm ci
npm run check
MCP_13FLOW_API_BASE=https://13flow.eu npm start
In another terminal:
cd mcp-server
URL=http://127.0.0.1:8849/mcp npm test
The test client verifies transport headers, Host/Origin rejection, JSON-RPC batch rejection,
protocol version handling, body limits, tool/resource discovery, read-only annotations,
result-size bounds, canonical provenance links and absence of Pro tools by default. Run
npm run test:config and npm run test:security for fail-closed configuration, oversized
upstream response and concurrency-cap regressions. npm run test:telemetry verifies
persistence, retention, metric reconciliation and absence of raw client/tool data. Set
SKIP_HEALTH=1 only when testing
through a public proxy that intentionally keeps /healthz private. The production
ModSecurity edge can reject an unsupported request content type before the MCP backend.
On Debian 12, the packaged ModSecurity 2.x JSON processor is also affected by
upstream issue #2807:
truncated JSON can be rejected with a generic HTTP 500 before REQBODY_ERROR becomes
available to a phase-2 rule. Set EXPECT_WAF_REJECTIONS=1 to accept only these bounded,
fail-closed edge differences (403 or 415 for unsupported content type; 400 or 500 for
truncated JSON). Direct backend tests remain strict and require 415 and 400 respectively.
Do not disable SecRequestBodyAccess or the JSON processor to normalize these statuses:
that would reduce request-body inspection.
URL=https://13flow.eu/api/mcp \
STATS_URL=https://13flow.eu/api/agent-stats \
SKIP_HEALTH=1 EXPECT_WAF_REJECTIONS=1 npm test
Official MCP Registry
The root server.json declares the public Streamable HTTP endpoint as
io.github.bluetouff/13flow. Validate the manifest before publication:
cd /opt/13flow
mcp-publisher validate
After the matching server version is deployed and the public smoke passes, authenticate as late as possible, publish once, then verify the exact version and remote URL:
mcp-publisher login github
mcp-publisher publish
cd mcp-server
npm run registry:verify -- --version 1.0.0
Registry publication is metadata publication. It does not deploy the MCP daemon, so the live endpoint and Registry entry must be verified independently.
Prove that the default Registry profile does not execute a private tool:
curl -i http://127.0.0.1:8849/mcp \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
--data '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"pro.list_funds","arguments":{}}}'
Expected result: a JSON-RPC unknown-tool error. pro.list_funds must also be absent from
tools/list.
An isolated, explicitly enabled Pro profile accepts only the dedicated key header:
printf "API token: "
read -r -s TOKEN
printf "\n"
curl -fsS http://127.0.0.1:8849/mcp \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-H "X-13FLOW-Key: $TOKEN" \
--data '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"pro.list_funds","arguments":{}}}'
unset TOKEN
Production deployment
Install dependencies once:
sudo useradd --system --no-create-home --shell /usr/sbin/nologin flowmcp
cd /opt/13flow/mcp-server
sudo npm ci --omit=dev
sudo chown -R root:flowmcp /opt/13flow/mcp-server
sudo chmod o+x /opt/13flow
Install the systemd unit from deploy/13flow-mcp.service, set environment variables in
/etc/13flow/13flow-mcp.env, then:
sudo systemctl daemon-reload
sudo systemctl enable --now 13flow-mcp
curl -fsS http://127.0.0.1:8849/healthz | python3 -m json.tool
curl -fsS http://127.0.0.1:8849/stats | python3 -m json.tool
The unit creates /var/lib/13flow-mcp as a mode 0700 systemd StateDirectory and grants
the daemon no other persistent write path. agent-stats.json is written mode 0600 through
a bounded temporary file and rename; production refuses an alternate telemetry path.
Apache must allow POST only on /api/mcp and proxy that path to the Node service. Keep the
main site method allow-list in place so other public endpoints remain read-only. The supplied
vhost caps the request at 1 MiB and removes client-supplied forwarding headers before proxying.
The supplied systemd unit denies non-loopback networking; enabling an external x402
facilitator therefore requires a deliberate network-policy override and a new review. It
also removes every Pro/x402 activation and secret variable after reading the environment file,
so this public unit cannot be converted into the private profile by an accidental env edit.
Methodology contract
The MCP server is only a delivery protocol. It does not redefine the investment signal.
Confluence v1 remains the frozen public research contract:
- score is an ordinal heuristic rank, not a probability or expected return;
- default weights are heuristic until live historical validation is published;
- live status, data quality, accession counts and coverage stay public;
- the append-only signal history is the audit trail for signal revisions;
- Pro output must keep enough metadata to reproduce the selected filing, basis date, positions, moves and data-quality caveats.
No MCP tool calls EDGAR directly. Freshness and 13F coverage come from the already published market database and cache files.
13FLOW MCP questions
How do I add 13FLOW MCP to Claude Code?
Run claude mcp add --transport http 13flow https://13flow.eu/api/mcp in your terminal. Add --scope user to make it available in every project.
How do I add 13FLOW MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
Does the MCP server connect directly to EDGAR?
No, the server does not touch EDGAR directly; it uses a local market database and cache files for 13F coverage.