MyOpenFund MCP Server
OfficialThis deployment exposes only server_info: you can introspect what the server offers, but no data-querying tools are mounted.
Call
server_infoto learn which toolsets are enabled, your caller tier, the server version, and data freshness (last vault ingest).If the vault is unreadable,
freshnessis null andfreshness_errorgives the reason while the rest still answers.It is read-only and takes no arguments (no side effects, no open-world access).
Not available in this schema:
vault_*document search/facts/stats/pipeline health,rag_searchcited passage search, andcompanies_*/datasets_*— those toolsets are not configured here.No hosted LLM is required; the tool is deterministic.
Reads MyOpenFund's official-document vault, a PostgreSQL database accessed through a read-only role: searches the corpus of primary-source documents with filters (corpus, publisher/source code, doc type, language, year, MIME type, date ranges, title text), retrieves every stored fact of a document with provenance (doc IDs, dates, source and PDF URLs, publisher, extra metadata), computes live-document counts grouped by field, and reports ingestion pipeline health (runs, per-source run counts and errors, open discovery errors, publication cadence).
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MyOpenFund MCP Server find official primary-source documents about inflation with provenance"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
myopenfund-mcp
One MCP server over the MyOpenFund bricks: official documents and pipeline health, cited passage search over the embedded corpus, and company data.
Any MCP client (a desktop assistant, a coding agent, your own agent, a local model) gets outcome-oriented
tools over MyOpenFund's data: find official primary-source documents, read their facts with provenance
(doc_id, dates, source URLs), search the text of the documents by meaning and get passages to cite, count
the corpus, check the ingestion pipeline's health. Toolsets are
enabled per deployment: a toolset whose environment variables are not set is not configured, so it is not
mounted, and server_info says so. A toolset whose variables are set but whose extra is not installed
stops the server at start with a clear configuration error (it never runs silently without it).
MyOpenFund manages nobody's money and gives no investment advice. This server returns documents and facts from official sources, with their provenance. What you do with them is your decision.
Two transports, same code: stdio for local use, Streamable HTTP (bearer tokens) in a Docker image.
Host-agnostic: the same image runs on a laptop, on a host on a private network or on a cloud VM; everything deployment-specific comes from
MOF_*environment variables.Deterministic: no tool needs a hosted LLM (see Local models).
Contents
Related MCP server: learning-mcp-server
Quick start (stdio)
Prerequisites:
Python 3.12+ and git (the
[vault]extra installs a pinned dependency from git);read access to the vault database as the read-only role
vault_readonly(never a writing role).
git clone https://github.com/MyOpenFund/myopenfund-mcp.git
cd myopenfund-mcp
python -m venv .venv
.venv/bin/pip install ".[vault]"Register it with your MCP client. With Claude Code:
claude mcp add myopenfund \
-e MOF_VAULT_DATABASE_URL='postgresql://vault_readonly:<password>@<host>:5432/documents?sslmode=verify-full' \
-- /path/to/myopenfund-mcp/.venv/bin/myopenfund-mcp serveAny other client: run the command myopenfund-mcp serve (stdio is the default transport) with the same
environment. Over stdio there is no token: the local user owns the process and gets every tier
(MOF_MCP_TOKENS, if set, is ignored with a warning on stderr). Then ask the client to call server_info.
The snippet above stores the database URL, password included, in the MCP client's configuration file. Use the read-only role
vault_readonlyonly, and keep that file private.
HTTP deployment
MOF_MCP_TRANSPORT=http serves Streamable HTTP at MOF_MCP_PATH (default /mcp). It requires
MOF_MCP_TOKENS: the HTTP server never runs unauthenticated, and refuses to start without tokens.
The server speaks plain HTTP. Network exposure and TLS are the deployment's job, never the public
internet by default. The repository ships a generic Dockerfile,
compose.example.yaml and .env.example; nothing host-specific
lives in it.
cp compose.example.yaml compose.yaml
cp .env.example .env # never committed
.venv/bin/myopenfund-mcp hash-token alice # once per client, see Tiers and tokens
.venv/bin/myopenfund-mcp hash-token agent-1 --tier read
# edit .env: MOF_MCP_TOKENS, MOF_VAULT_DATABASE_URL, MOF_MCP_BIND_ADDR ...
docker compose up -d --buildNo venv on the deployment host? Run hash-token in the container instead (after cp .env.example .env,
which compose needs, and with the image built):
docker compose build
docker compose run --rm mcp myopenfund-mcp hash-token alicehash-token prints the token on stderr (copy it to the client) and only the MOF_MCP_TOKENS
entry on stdout, so redirecting stdout (>> entries.txt) never writes the clear token into a file.
The image runs as a non-root user (uid 10001), listens on 0.0.0.0:8000 inside the container, and
the compose file publishes it on 127.0.0.1 of the host unless MOF_MCP_BIND_ADDR says otherwise. In
.env, leave MOF_MCP_TRANSPORT and MOF_MCP_HOST unset: the image sets them. The compose file also runs it with a
read-only root filesystem (writable /tmp only), no Linux capabilities and no-new-privileges.
Pinned versions
Every rebuild of the image and every start of the install service installs the same Python packages,
the ones the CI tested:
Base image:
PYTHON_IMAGEin theDockerfile, a tag and a digest (python:3.13.<patch>-slim-<debian>@sha256:...); the variant without a built image incompose.example.yamluses the same value. The image's Python and pip come with it.PyPI runtime dependencies:
constraints.txt, the exact version of every dependency of[vault,companies,rag]on that image (fastmcp and everything below it), passed with-c.Build backends: this package and its git dependencies are built from source at every install, in isolated build environments that
-cdoes not reach;build-constraints.txtpins their backends (hatchling, setuptools and their dependencies, pluseditables, which hatchling needs for the CI's editable install), passed with--build-constraint. The file records the git pins it was generated from: bumping one without regenerating fails the tests. That test compares the recorded list only; thelockedjob also runsscripts/check_constraints.py --build, which reads every build requirement (this package's, and each git dependency's at its pinned commit) and fails when one is not pinned in the file at a version its specifier allows.Git dependencies (
vault-query,my-open-data,company-corpus,rag-engine): pinned by full commit inpyproject.toml, as before.
The install service passes both files of the same commit as URLs (the same <commit> three times):
pip install -c https://raw.githubusercontent.com/MyOpenFund/myopenfund-mcp/<commit>/constraints.txt \
--build-constraint https://raw.githubusercontent.com/MyOpenFund/myopenfund-mcp/<commit>/build-constraints.txt \
'myopenfund-mcp[...] @ git+https://github.com/MyOpenFund/myopenfund-mcp@<commit>'so the host also needs outbound HTTPS to raw.githubusercontent.com at each start, besides github.com
and PyPI.
Not covered: the git package the build stage installs with apt (a build tool, absent at runtime), file
hashes (pins are == versions, not --require-hashes, which pip refuses next to git requirements), and,
outside Python, the DuckDB extensions the companies toolset downloads at start and the embedding model
(pinned by its own revision, see Deploying the rag toolset).
The CI runs the tests twice: floating within the ranges of pyproject.toml (Python 3.12 and 3.13, so a
coming break shows early) and locked (locked job: the image's Python, both constraint files, then
scripts/check_constraints.py, which fails when a runtime dependency of the server is missing from
constraints.txt or installed at another version, e.g. a new dependency brought by a release, and when an
extra it is asked to check does not exist, then scripts/check_constraints.py --build, which reads the git
dependencies' build requirements from raw.githubusercontent.com). A test checks that the job's Python is
the patch of PYTHON_IMAGE.
Upgrading is a deliberate change in a pull request: for the base image, look up the digest of the new
tag (docker buildx imagetools inspect python:<tag>) and replace PYTHON_IMAGE in the Dockerfile and the
image lines of compose.example.yaml; for the packages, run python3.13 scripts/update_constraints.py (on
linux x86_64, the image's platform; it reads the git dependencies' build requirements from GitHub at their
pinned commits) and commit both regenerated files. The locked job then tests the new set.
A client connects with its token, e.g. with Claude Code:
claude mcp add --transport http myopenfund https://<your-host>/mcp \
--header "Authorization: Bearer <token>"Connect from any MyOpenFund repo
Each MyOpenFund code repo ships a .mcp.json holding variables only, never an address or a token. Clone one
repo or all of them: each works on its own, including in new worktrees, and projects outside MyOpenFund do not
see the server. Set these two client-side variables once, in your shell profile or a private file it loads:
export MOF_MCP_URL=https://<your-host>/mcp
export MOF_MCP_TOKEN=<token> # your client token, the one from hash-tokenMOF_MCP_TOKEN is the client's clear token; MOF_MCP_TOKENS is the server's list of digests. Claude Code asks
you to approve the server once per project. Start it from a shell that has the variables. Without them, it
warns about the missing variables and everything else keeps working.
Pattern 1: a host on a private network
A home server, a NAS or an office machine reachable only over a VPN or a private interface.
Set
MOF_MCP_BIND_ADDRto the host's private address (the VPN or LAN interface), never0.0.0.0on a host that also has a public interface.If the vault Postgres runs as a compose stack on the same Docker host, do not publish its port: join its Docker network instead (uncomment the
networksblocks incompose.yaml, setMOF_VAULT_DOCKER_NETWORK) and use the database service name as<host>inMOF_VAULT_DATABASE_URL. On that private Docker network,sslmode=disableis acceptable.TLS: the VPN already encrypts the traffic; for HTTPS on top, put a reverse proxy holding a certificate for the private name in front, or use your VPN's own HTTPS feature if it has one.
Pattern 2: a cloud VM (or container service)
Keep the default
MOF_MCP_BIND_ADDR=127.0.0.1and terminate TLS at a reverse proxy on the same VM (Caddy, nginx, Traefik) proxying to127.0.0.1:8000, or run the container behind the provider's load balancer with a TLS listener and a security group that only admits the balancer.Health check for the load balancer or orchestrator:
GET /healthanswers200with the bodyok, without a token (it reveals no version and no data);/mcpkeeps requiring one. The image's DockerHEALTHCHECKuses the same endpoint.Reach the vault database over the provider's private network with
sslmode=verify-fulland the provider's CA certificate (sslrootcert=...).sslmode=requireis a fallback: it encrypts but does not authenticate the server.Restrict who can reach the HTTPS endpoint (IP allow-list, private load balancer) wherever you can: the bearer token is the only authentication in v1.
Deploying the rag toolset
The rag_search tool needs a Qdrant collection already filled by the ingestion (rag-engine through the
data-orchestrator) and the embedding model intfloat/multilingual-e5-base as an ONNX file. The server only
reads: it never creates a collection, an index or a point. Angle brackets are placeholders: no real host
name, address or key belongs in this repository or in a compose file under version control.
The steps below work as they are for the two ways compose.example.yaml runs the server: the image built
from this repository, or its variant without a built image, where an install service puts the package
into a volume at each start of the stack.
A read-only API key on the Qdrant side. In the Qdrant stack, set a read-only key next to the main one (
QDRANT__SERVICE__READ_ONLY_API_KEY) and restart Qdrant. The MCP gets that key only. Check it from any host that reaches Qdrant. The key is typed at a prompt that shows nothing (read -s, in bash and in zsh) and kept in a variable of that shell: it is written neither in a command nor in the shell history.# Run this first line alone and type the key: pasted with the lines below, some shells # (bash before 5.1, the bash of macOS) take the next pasted line as the key. printf 'read-only key: '; read -rs MOF_KEY_CHECK; echo curl -s -o /dev/null -w '%{http_code}\n' -H "api-key: $MOF_KEY_CHECK" http://<qdrant-host>:<qdrant-port>/collections/<collection> curl -s -o /dev/null -w '%{http_code}\n' -H "api-key: $MOF_KEY_CHECK" -H 'Content-Type: application/json' -X PUT -d '{"vectors":{"size":4,"distance":"Cosine"}}' http://<qdrant-host>:<qdrant-port>/collections/mof-key-checkThe first request is a read: it must print
200(401or403: Qdrant does not accept the key;404: no collection of that name).The second is a write: it must print
403. The key cannot write, and nothing was created.If the second prints
200, the key can write: it is not a read-only key, and the request has just created an empty collection namedmof-key-check. Delete that collection, then give the MCP a real read-only key and run the two checks again:curl -s -o /dev/null -w '%{http_code}\n' -H "api-key: $MOF_KEY_CHECK" -X DELETE http://<qdrant-host>:<qdrant-port>/collections/mof-key-checkAt the end:
unset MOF_KEY_CHECK.Qdrant behind TLS: write
https://in these URLs, with the port TLS is served on; addQDRANT_HTTPS=trueto the command of step 2 and setMOF_RAG_QDRANT_HTTPS=truein step 6. The key then no longer travels in clear.
Payload indexes, once, from the data side. The filters and the list of valid filter values use Qdrant's payload indexes. Whoever owns the collection creates them, once per collection, with a key that can write, from an environment where
rag-engineis installed (the ingestion's own, or any venv withpip install "rag-engine @ git+https://github.com/MyOpenFund/rag-engine@6be21ac393d82d7c5c1a058dcad8204ae15c7289", the commit this server is built on). Give the host AND the port: the engine's default port is 6333. The key is typed at a prompt here too:# Alone first, as in step 1. printf 'key that can write: '; read -rs QDRANT_API_KEY; echo; export QDRANT_API_KEY QDRANT_HOST=<qdrant-host> QDRANT_PORT=<qdrant-port> python -c "from rag_engine.store import QdrantStore; print(QdrantStore().ensure_payload_indexes('<collection>'))" unset QDRANT_API_KEYIt prints the indexes it created (
[]when they were all there: running it again does nothing). The MCP never does this (its key cannot). Without the indexesrag_searchstill answers, more slowly: a filtered search reads every point (about 0.15 s on 34,000 points), and the valid filter values are read by one scroll of the collection, in the background (up to 100,000 points; beyond that, filter values are no longer checked).At this commit the engine also creates the datetime indexes on
date_startanddate_end(payload schema version 2). Once they exist,automode applies date bounds to the intervals (withinMOF_RAG_DATE_FILTER_REFRESH_Sseconds, without a restart of the MCP). That is safe before the payloads carry their intervals (a point without one is still found by itsdate), but a month or a year document is found by its whole period only once the orchestrator'ssync-metadatahas written the intervals;sync-metadatacreates the two indexes itself (see Dates).The
[rag]extra in the install line. With the built image:MOF_EXTRAS=vault,ragas a build argument (compose.example.yaml). Without a built image:'myopenfund-mcp[vault,rag] @ git+https://github.com/MyOpenFund/myopenfund-mcp@<commit>'in theinstallservice. From a checkout:pip install ".[vault,rag]". No PyTorch is installed: queries are embedded on the ONNX runtime, on CPU. Without the extra the server refuses to start as soon asMOF_RAG_QDRANT_HOSTis set.Fill the model cache, once. The model is about 1.1 GB. It is pinned to one revision and every file is hash-checked at each start, so a changed or damaged file is refused. The fill is a one-shot container with the cache volume mounted read-write; it needs outbound HTTPS to
huggingface.coand to the hosts it redirects downloads to (underhf.co), and a writableHOME. The exact line it runs:python -c "from rag_engine.config import Settings; from rag_engine.embedding import make_embedder; make_embedder(Settings(backend='onnx', model_cache='/models')).release(); print('model cache ready')"It succeeded when its last line is
model cache readyand its exit code is 0. Anything else (a traceback, another exit code) is a failed fill: the service would start without the model.Built image:
docker run --rm -v myopenfund-mcp-rag-models:/models myopenfund-mcp python -c "..."with the line above (the image owns/modelsas its service user and setsHOME).No built image: the
rag-model-fillservice ofcompose.example.yamlruns it for the first start of the stack (theinstallservice gives the volume to the service user). Check both signs withdocker compose logs rag-model-fill(last linemodel cache ready) anddocker compose ps -a rag-model-fill(Exited (0)), then delete that service.Without Docker: the same line in the server's venv, with your own absolute directory in place of
/models.
Run again on a filled cache, the line downloads nothing, verifies the files and prints the same line. A filled directory can be copied from another host instead, keeping its symbolic links (
snapshots/links intoblobs/):cp -a,rsync -aortar, never a copy that follows or drops links.The service (
compose.yaml):the cache volume mounted read-only at
/models;mem_limit: 3gor more: the process peaks at about 2 GB at every start, while the model loads, and stays around 1.5 GB afterwards; with a CPU limit, also setMOF_RAG_ONNX_THREADSto it;ORT_DISABLE_TELEMETRY=1andHF_HUB_OFFLINE=1in its environment (see Outbound connections);a healthcheck start period of 60 s: the port opens once the model is loaded, 5 to 7 s from a warm disk on 4 cores, more than 30 s when the 1.1 GB file is read from a cold disk (the image's
HEALTHCHECKhas it);a route to Qdrant. On the same Docker host, join the Qdrant stack's network and use its service name and its internal port (
MOF_RAG_QDRANT_HOST=<qdrant-service>,MOF_RAG_QDRANT_PORT=6333unless that stack changed it), without publishing anything. Otherwise use a host port Qdrant publishes on a private interface (MOF_RAG_QDRANT_HOST=<private-address>,MOF_RAG_QDRANT_PORT=<published-port>). Without TLS the key travels in clear: private network only.
The variables, in
.env:MOF_RAG_QDRANT_HOST(the host alone:qdrant:6333is refused),MOF_RAG_QDRANT_PORT,MOF_RAG_QDRANT_API_KEY(the read-only key of step 1),MOF_RAG_COLLECTION,MOF_RAG_MODEL_CACHE=/models;MOF_RAG_QDRANT_HTTPS=truewhen Qdrant is behind TLS; optionallyMOF_RAG_DESCRIPTION_NOTES(see Passage search). The others have defaults (Configuration and limits); the date settings (MOF_RAG_DATE_FILTER_MODE=auto,MOF_RAG_DATE_FILTER_REFRESH_S=300,MOF_RAG_DATE_FILTER_RETRY_S=30) need no value of their own.Restart and check.
GET /healthanswers200within the start period.The log holds, in this order,
rag: embedding model intfloat/multilingual-e5-base ready in ... s,rag: collection <collection> checked, searches are servedandrag: filter values read from the collection (source_codes: ..., doc_types: ..., languages: ...), then (loggerrag_engine.store)Qdrant collection '<collection>' has no datetime index on both date_start and date_end: date filters in auto mode use the date field (legacy)(beforesync-metadata) or... has datetime indexes on date_start and date_end: date filters in auto mode use the intervals(after). It holds no line with the wordDownloading: the running service never downloads. An error line namingMOF_RAG_MODEL_CACHEmeans the cache is incomplete, unreadable or not the pinned model.server_info:toolsets.ragisenabled,rag.statusisready, andrag.source_codes/rag.doc_typeslist the collection's codes. Ifrag.statusisunavailable,rag.reasonand the log say why (see Passage search).rag_searchwith a short query and one valid code, e.g.{"query": "inflation outlook", "source_codes": ["<a code of rag.source_codes>"]}: passages come back.rag_searchwith the same code in the wrong case: the answer is[invalid_argument] source_codes: unknown value "..." (did you mean "..."? values are matched exactly); valid values: ....rag_searchwith a date bound, e.g.{"query": "inflation outlook", "date_from": "2016-07-14", "date_to": "2016-07-14", "include_undated": false}: passages come back (or none, for a day nothing is dated to),filters.include_undatedisfalse, and each hit hasdate_precisionanddate_kind(nulluntilsync-metadatahas run).
Never run this repository's integration tests against a production Qdrant.
tests/integration/test_real_qdrant.pycreates and deletes collections: it is for a throwaway Qdrant only (see Development).
Redeploying a new version (such as the one that raised the rag-engine pin to 6be21ac and added the date
settings): the same steps, from step 3. Rebuild the image, or point the install service at the new
<commit>; restart; check as in step 7. No new volume, no new variable to set (the date settings have
defaults), and the model cache is kept: the pinned model revision did not change. Step 2 is not needed
again for the server: the indexes the new version uses are created by the orchestrator's sync-metadata,
and until they exist date bounds behave as before.
Outbound connections of the rag toolset
Once the model cache is filled, the server makes no outbound connection besides its requests to Qdrant (checked behind a recording proxy that refuses everything: no request in the first minute):
ORT_DISABLE_TELEMETRY: the ONNX runtime installed by the[rag]extra sends usage events to its publisher (mobile.events.data.microsoft.com) and keeps a device id under$HOME/.cache/Microsoft/DeveloperToolsunless this variable is1. The server sets it to1in its own process before the runtime can be imported, and so do the image andcompose.example.yaml. A value you set yourself is kept (0allows the telemetry).HF_HUB_OFFLINE=1is recommended for the running service. With a complete cache the server askshuggingface.conothing; with an incomplete one it would try a download at every start, fail on a read-only volume, and leaverag_searchanswering[rag_unavailable] model_unavailable. The variable turns that attempt into an immediate, local error. Leave it unset for the fill of step 4.
Tools
Tool names carry their toolset prefix. All v1 tools are read-only (readOnlyHint). Only
vault_search_documents is paged: it returns next_cursor to pass back unchanged with the same filters.
vault_corpus_stats, vault_runs_status and vault_vocabulary only bound their lists with limit (no cursor). Every
limit defaults to MOF_MCP_DEFAULT_ROWS; a value outside [1, MOF_MCP_MAX_ROWS] is refused, not
clamped. String arguments doc_id, text, cursor and the corpus of vault_get_document and
vault_vocabulary are at most 200 characters.
Tool | Purpose | Key arguments |
| What this deployment offers: enabled toolsets, your tier, version, data freshness (last vault ingest). Call it first. Open to every authenticated caller. | none |
| Find official documents (metadata, not text). Start here: filter, then open one with |
|
| Every stored fact of a document: dates (with |
|
| Live-document counts grouped by one field, largest first (NULL is a real group). Grouping by |
|
| What the codes mean: each corpus's declared codes with their labels, rows |
|
| Is the pipeline healthy? Four lists, newest first unless stated: |
|
doc_type needs corpus. A doc_type code means something only within its corpus (central-bank A1
and company A1 are different document types). vault_search_documents with doc_type and no corpus,
and vault_corpus_stats grouped by doc_type without corpus, answer [invalid_argument] doc_type needs corpus: ... with vault-query's message, which lists each corpus's codes and labels. The tool descriptions
tell the model to ask the user which corpus when the conversation does not make it clear, or infer it.
Resource: vault://documents/{doc_id}, the metadata of the documents with that doc_id as a JSON list, one
per corpus holding it (same content as vault_get_document without corpus).
Changes for clients (vault-query 0.5.0, vault 12ffd11). vault_get_document and the resource return
a list (was one object); vault_get_document takes corpus; doc_type without corpus is refused (see
above); search and document rows carry date_precision, date_kind, entity_scheme, entity_value; new
tool vault_vocabulary.
The vault_* tools and the resource exist only when MOF_VAULT_DATABASE_URL is set; the [vault] extra
must then be installed, or the server refuses to start (MOF_VAULT_DATABASE_URL is set but the [vault] extra is not installed). Timestamps in results are UTC: the server's database session runs with
timezone=UTC, whatever the database or role default.
Minimum vault schema. This server needs a vault at or after 12ffd11 (vault-query 0.5.0, pinned at 0.5.1 eff1aec, which breaks search sort ties by doc_id, corpus: documents
keyed (corpus, doc_id), columns date_precision / date_kind / entity_scheme / entity_value, table
vocabulary; runs_sources.bad_content). Deploy the vault (and run its ingestion, which applies the
schema) before this server. Against an older schema, a tool that reads a missing column or table answers
[schema_outdated] the vault lacks a column or table this server reads (see README, Minimum vault schema),
not backend_unavailable; the server log names the missing column or table, and server_info reports
"freshness_error": "schema_outdated".
If the vault database is down, server_info still answers (version, tier, toolsets) with freshness
null and freshness_error set to the error's code (backend_unavailable, timeout, schema_outdated);
the server log names the exception class only.
Passage search (rag)
rag_search exists only when MOF_RAG_QDRANT_HOST, MOF_RAG_COLLECTION and MOF_RAG_MODEL_CACHE are set;
the [rag] extra must then be installed, or the server refuses to start (MOF_RAG_QDRANT_HOST is set but the [rag] extra is not installed). It searches the text of the embedded documents by meaning (one dense
search over the chunks, with rag-engine) and returns passages, best first. It does not write an answer:
the client's model reads the passages and cites them. Read tier.
Argument | Meaning |
| What to look for, in plain language, in any language; at most 2000 characters (the model reads the first 512 tokens). |
| JSON array of source codes, exact (case matters). The valid ones: |
| JSON array of document-type codes, exact. The valid ones: |
| JSON array of language codes as stored, e.g. |
| Date bounds, |
| JSON boolean, default |
| Number of passages; default |
The values of one array are alternatives (OR), the arguments combine (AND). An omitted argument does not restrict; an empty array is refused.
What the client's model is told. The tool description states how to call the tool, the default and
the maximum limit of this deployment, what a date bound does (with a bound, a document known only to the
month or the year matches any range overlapping its period, and documents without a date are left out
unless include_undated is true; with MOF_RAG_DATE_FILTER_MODE=legacy it says instead that such a
document is found only at the first day of its period), and the hit fields, date_precision and
date_kind included. It stays under 1800 characters before the notes. It is corpus-neutral: it names no source
and gives no meaning to any code, because such facts go stale when the collection changes. The codes
themselves are read from the collection (server_info, and every refusal lists them). What they mean is
the deployment's to say, in MOF_RAG_DESCRIPTION_NOTES: one line of text (at most 1500 characters),
appended to the description after About this collection:. Suggested value for the central-bank
collection:
MOF_RAG_DESCRIPTION_NOTES=Central-bank monetary-policy documents. source_codes: "ecb" European Central Bank, "us" Federal Reserve, "gb" Bank of England, "au" Reserve Bank of Australia, "ca" Bank of Canada, "jp" Bank of Japan. doc_types: "A1" rate-decision press release; "A2" policy statement (for the ECB: the press-conference page, with its questions and answers); "A3" minutes or accounts of the meeting; "B1" press-conference material (Federal Reserve: transcript; ECB: the combined decision and statement, without the Q&A); "E1" monetary policy report or staff projections; "F1" economic projections.Example call and result (text shortened):
{"query": "Why did the ECB raise interest rates in July 2022?", "source_codes": ["ecb"], "date_from": "2022-07-01", "limit": 1}{
"query": "Why did the ECB raise interest rates in July 2022?",
"filters": {"source_codes": ["ecb"], "doc_types": null, "languages": null, "date_from": "2022-07-01", "date_to": null, "include_undated": false},
"count": 1,
"hits": [
{
"rank": 1,
"score": 0.8189,
"text": "The Governing Council decided to raise the three key ECB interest rates by 50 basis points. ...",
"doc_id": "ecb/A1/2022-07-21",
"title": "Monetary policy decisions",
"date": "2022-07-21",
"date_precision": "day",
"date_kind": "meeting",
"source_code": "ecb",
"doc_type": "A1",
"language": "en",
"page": 1,
"chunk_number": 0,
"citation": "Monetary policy decisions (ecb A1, 2022-07-21), p. 1"
}
]
}Hits.
scoreis the cosine between the query and the passage (4 decimals; higher is closer). Several hits may come from one document; nothing is grouped.filtersechoes the filters as applied,include_undatedincluded. The point id and the rest of the stored payload are not returned.Date fields.
dateis the stored date,YYYY-MM-DD.date_precisionsays how much of it is known:day,monthoryear(a month or a year is stored as the first day of its period:2016-07-01withmonthis July 2016), ornullwhen unknown.date_kindsays what the date marks, as the producer labels it (meeting,publication,period), ornull. Both are read from the stored payload as they are:nullis normal for a collection whose payloads do not carry them yet (the production collection until the orchestrator'ssync-metadatahas run), and an unknown precision is read as a day.Pages.
pageis the page the passage starts on as a reader counts it: the first page is 1 (the collection stores pages from 0; the server adds one). It isnullfor a document without pages, and thecitationthen has no page part.citationis<title> (<source_code> <doc_type>, <date>), p. <page>, each missing part left out (thedoc_idstands for a missing title). The date is written at its precision:July 2016formonth,2016foryear(English month names), the stored date forday, for an unknown precision and for a date not writtenYYYY-MM-DD.Argument errors are written for the client's model, in terms of the JSON to send: a string where an array is expected, the array itself written as a string included (
source_codes must be a JSON array of strings, e.g. ["ecb"]; omit it for no restriction, the example being the caller's own value), an empty array (... omit the argument for no restriction), a date in another form (date_from must be "YYYY-MM-DD", e.g. "2016-03-10"), a boolean written otherwise (include_undated must be a JSON boolean, true or false without quotes, not "true"; omit it for false). Nothing is corrected silently.Unknown filter values are refused, never corrected. The server reads the distinct
source_code,doc_typeandlanguagevalues from the collection and keeps themMOF_RAG_CODES_TTL_Sseconds. A value that is not among them is[invalid_argument]listing the valid values (as JSON strings), with a hint for a near miss ("ECB": did you mean"ecb"?), instead of an empty result.With the keyword indexes, the values come from Qdrant's facet API (a few milliseconds), at start and then when a filtered call finds them older than the TTL.
Without them, one scroll of the collection reads the three fields. It always runs in the background (it starts when the server does): no search waits for it, the searches made meanwhile are checked against the values already known, and not checked while none is known yet.
Before a value is refused, the values are read once more (not more often than every
MOF_RAG_CODES_RETRY_Sseconds): a code ingested since the last read is accepted at once, not after the TTL.The values are dropped when the collection comes back after an outage (it may have been recreated). A field that holds no value at all (an empty collection) refuses nothing. If the values cannot be read, the last ones read stay in use, or nothing is checked when there is none (one warning in the log), and the read is tried again
MOF_RAG_CODES_RETRY_Sseconds later.
Limits and size. A
limitaboveMOF_RAG_MAX_LIMITis[limit_exceeded], never lowered. A result larger thanMOF_MCP_MAX_RESULT_CHARSis refused with[result_too_large], never cut; the message names the largestlimitthat fits. Passages are 200 to 400 words: the default 8 are a few thousand tokens.Start-up. The embedding model is loaded and the collection is checked when the server starts, not at the first call, and a model is never loaded or downloaded by a tool call. If Qdrant cannot be reached, refuses the key, or does not hold the collection, the server still starts (as it does when the vault database is down):
rag_searchanswers[rag_unavailable]with the reason, and works again by itself once a collection check passes (see the next point). If the model cannot be loaded (files missing with no way to download them, or a file that is not the pinned one), the server starts too, logs the cause as an error namingMOF_RAG_MODEL_CACHE, andrag_searchanswers[rag_unavailable]until the cache is fixed and the server restarted.Time budget, and what happens when Qdrant hangs. One call never takes longer than
MOF_RAG_CALL_TIMEOUT_S(15 s), its wait included.MOF_RAG_QDRANT_TIMEOUT(10 s) is the limit of one request to Qdrant, and a call makes several: the search, before it the read of the filter values when it is due, the collection check after a failure, and, for a call with a date bound inautomode, the read of the collection's payload schema when it is due (see Dates).A request that fails (no answer in time, connection refused, key refused, collection gone, server error) ends its call with
[rag_unavailable]and the reason: a call pays for one request timeout at most, never for two in a row (a failed read of the filter values is not followed by a search).A failed search refuses nobody else. It only makes the next call check the collection before its own search. With a healthy Qdrant (one slow request, one caller's timeout) that check takes a few milliseconds and the call is served; a search that succeeds meanwhile cancels the check. When the check passes and the search that follows fails again before any search is served (Qdrant answers the check and no search), that failure is remembered like a failed check: one call per retry period pays for a request timeout, the others are answered at once (the calls that arrive while that one search is still waiting pay for it too: under steady traffic, more than one). A search that is served clears that memory at once.
A failed collection check (at start, or the one that follows a failed search) is remembered
MOF_RAG_CHECK_RETRY_Sseconds (5): the calls made meanwhile get its reason at once, without a request, and so do the calls that arrive while a check is running. Then one call checks again. So with Qdrant frozen, a burst of 50 calls is answered within one request timeout (only the call that runs the check after a failed search waits longer, for that check or the end of its own budget), later calls within milliseconds, and the tool works again at mostMOF_RAG_CHECK_RETRY_Sseconds after Qdrant does.A search that Qdrant refuses as a request (HTTP 4xx, other than a refused key, a missing collection, 408 and 429) is the error of that call alone:
[rag_unavailable] search_refused, nobody else is refused andserver_infostaysready. The next call checks the collection before its search (a few milliseconds): when it is the collection that changed (recreated with another vector size, every search is refused), that check says so withcollection_mismatch. The usual cause is a collection in strict mode asked to filter on a field that has no payload index (a date bound without the datetime index ondate): the filter cannot be served by the collection as it is indexed. Step 2 of Deploying the rag toolset creates the indexes.At most
MOF_RAG_MAX_CONCURRENCYsearches (4) run at once, in threads of the toolset's own: the calls in excess wait without holding a thread, so the other toolsets andserver_infokeep answering whatever Qdrant does. A call whose budget ends answers[rag_unavailable]:busyif it never got a slot,timeoutif its search was still running. Such a search keeps its slot until its request to Qdrant ends: abandoned searches cannot pile up.
server_infoadds aragobject:status(ready, orunavailablewith areason),collection,model,engine_version,default_limit,max_limit, andsource_codes,doc_types,languages: the valid values of each filter as last read from the collection (at most 60 each;nullwhile not known). It reports the outcome of the last collection check (at start, then by the calls that had to run one), without a request to Qdrant: a search that failed does not change it, the check that follows does.Privacy. As for every tool, the audit line holds the tool name, the client, the outcome and the duration, never the arguments, and the tool's own log lines never contain the query. At the levels the CLI logs (INFO and above), no line written for a search holds the Qdrant host, the API key or a response body, the framework's and rag-engine's included:
every exception of a search is caught by the toolset and answered with a coded reason, so FastMCP never prints one. An error the toolset maps (an outage, a refusal, an answer that is not JSON, such as a proxy's HTML page sent with status 200:
qdrant_error) is logged by its class; any other is answeredinternal_errorand logged at ERROR by its class only, its text and traceback at DEBUG only, a level the CLI never turns on (a developer who sets it accepts them);the server routes every record of the
rag_engineloggers (present and future modules) through a filter. A record that carries an error (an exception among its arguments or attached to it) or whose text holds the configured host (a whole word, as configured or lowercased, alone or with a port: hostqdrantis found inhttp://qdrant:6333, not in a collectionqdrant-docs; the configured collection's name, quoted as the engine writes it, is not taken for the host unless it is the host) or the key (anywhere, even inside a longer word) is written with its logger, its level and a fixed message naming the error's class only; the engine's warning on a failed schema read also keeps its collection, the filter used meanwhile and the delay before the next try. Other engine lines (the collection and the filter in use) are written as they are. The error's text is dropped because it can hold the host, a TLS host name, a proxy's error page naming an upstream host or an internal address, or the engine's hint about its own key variable. What this changes in the process's logging (for an operator who embeds the server or configures logging): therag_enginelogger stops propagating and gets one handler that filters each record, then hands it to the root logger's handlers, or tologging.lastResort(stderr, WARNING and above) when there is none, as the standard library does. The change is process-wide and lasts as long as the process. A laterlogging.config.dictConfigthat namesrag_enginereplaces that handler, and the engine's records are then written as the engine writes them: leaverag_engineout of such a configuration, or build the rag toolset after it. The CLI configures logging before it builds the toolsets. The HTTP libraries under the Qdrant client are apart:httpxlogs one INFO line per request with the server's address, which is why the CLI raises its logger to WARNING, andhttpcorelogs the host and port of each connection at DEBUG only.
Concurrency. One embedder and one Qdrant client are shared by the process; inference runs one query at a time (about 20 ms for a short query on 4 cores) off the event loop.
Dates in rag_search
What a bound means. A document is dated by date and date_precision; rag-engine stores the period
it covers as date_start and date_end (the same day for day, the whole month for month, the whole
year for year). With intervals in use, a bound keeps a document when its period has at least one day in
common with the range: the minutes of a July 2016 meeting known only to the month are found by
2016-07-14..2016-07-14 and by any range touching July 2016; a document of the year 2015 by any range
touching 2015. A document dated to the day is found on that day, as before. A document without a date is
left out of every bounded search unless include_undated is true. Without intervals (legacy) a month or
a year document is found only at the first day of its period.
When results change. Intervals are used only once the collection's payloads carry date_start and
date_end and both fields have a datetime index. The orchestrator's sync-metadata writes the
intervals (with the corrected dates, precisions and kinds) and creates the two indexes; until it has run,
auto mode finds no index and every bound is applied to date, exactly as before this version, and
date_precision / date_kind are null in the hits. Within MOF_RAG_DATE_FILTER_REFRESH_S seconds after the
indexes appear, the running server uses them, without a restart. A collection whose indexes exist before
all its payloads have intervals loses nothing: a point without its interval yet is still found by its
date.
How a date bound is applied is rag-engine's date_filter_mode, set here by MOF_RAG_DATE_FILTER_MODE
and passed to the engine with every search, with MOF_RAG_DATE_FILTER_REFRESH_S and
MOF_RAG_DATE_FILTER_RETRY_S (the engine's own RAG_ENGINE_DATE_FILTER_* variables are never read).
Mode
auto(the default) follows the collection. A call with a date bound asks the collection whetherdate_startanddate_endboth have a datetime index (one read request, which the read-only key may send), and the answer is keptMOF_RAG_DATE_FILTER_REFRESH_Sseconds (300). Indexed: the bound is applied to the intervals; not indexed: to thedatefield, as before. A call without a date bound never asks. The read is also made once at start, after the collection check and the read of the filter values (not when either failed: then the first date-bounded call makes it), so the log says which filter is in use (a line of therag_engine.storelogger:... date filters in auto mode use the intervals, or... use the date field (legacy)), and it is made again by the first date-bounded call after the refresh delay: a collection upgraded while the server runs is followed without a restart.The read is part of the call. It runs in the call's own slot (one of
MOF_RAG_MAX_CONCURRENCY) and within its budget (MOF_RAG_CALL_TIMEOUT_S); when it ends after the budget, the search is not sent and the call has already answered[rag_unavailable] timeout.A failed read refuses no call and is not an outage. When the read fails or times out, the engine answers with the last answer it read, or with the
datefield when it never read one, logs one warning (loggerrag_engine.store, naming the error's class only: see Privacy above), and reads againMOF_RAG_DATE_FILTER_RETRY_Sseconds later (30) at the earliest; the calls made meanwhile ask nothing. The toolset does not remember that failure: no[rag_unavailable]follows from it,server_infostaysready, and only the search itself says whether Qdrant answers. So with Qdrant frozen, a date-bounded call may spend one request timeout on that read before its search, once per retry delay: its budget still bounds it. While no answer has ever been read (a cold start, or a start that skipped the read), the date-bounded calls that arrive during that first read wait for it, each in its slot: a burst of them can hold every one of theMOF_RAG_MAX_CONCURRENCYslots for one request timeout, once, and the calls behind them, with or without a date bound, wait as long (measured with a 3 s request timeout and 4 slots: 8 date-bounded calls answered in about 3 s, an undated call sent meanwhile in 2.8 s). Once an answer is known, or the read has failed, the other calls never wait for a read in progress.Modes
intervalandlegacynever read the collection: always the intervals, or always thedatefield.intervalon a collection in strict mode without the two indexes is refused by Qdrant ([rag_unavailable] search_refused, the error of that call alone).
Companies and datasets
The companies_* and datasets_* tools (read-only, over the published my-open-data store) exist only when
MOF_COMPANIES_CATALOG and MOF_COMPANIES_DATA_ROOT are set; the [companies] extra must then be installed
(from a checkout, pip install ".[vault,companies]", or from the git URL,
pip install "myopenfund-mcp[companies] @ git+https://github.com/MyOpenFund/myopenfund-mcp"; the extra pins two
git dependencies, so git must be available). The
store is read-only (as the lake_reader role); nothing is ever written. In a hardened container, DuckDB
downloads and loads its ducklake and postgres extensions under $HOME/.duckdb at each start: HOME must be
writable, a tmpfs holding it must allow exec (/tmp:exec), and the container needs outbound HTTPS to
extensions.duckdb.org. The process must also be able to read the store's lake/ files (my-open-data creates
them 0700 for its own uid). Configuration:
MOF_COMPANIES_CATALOG, MOF_COMPANIES_DATA_ROOT, MOF_COMPANIES_QUERY_TIMEOUT_S,
MOF_COMPANIES_MAX_COMPANIES, MOF_COMPANIES_MAX_CONCURRENCY, MOF_COMPANIES_Q4_RULE (see Configuration and limits).
Tool | What it does |
| Find companies by name (former names too), ticker, CIK or entity id; returns candidates. |
| Raw reported facts of up to |
| Standardised concepts and ratios per company and period, with their provenance. |
| The datasets the store publishes: name, version, kind, licence, row estimate. |
| Columns (type, allowed values, doc), natural key and licence of one dataset. |
| Rows of a dataset as known at |
| The same rows as CSV text to save or paste; refused, never cut, above |
Point in time. Company data is bitemporal:
as_of(a timestamp, default now; a value without an offset is read as UTC) returns what was publicly known at that moment, so a restatement filed later does not leak into an earlier view. Results echo theas_ofused. Datetimes are UTC.Concepts and ratios are company-corpus's. The server computes none: it calls company-corpus for the concept catalogue and the ratios. The one quarterly derivation, TTM, is company-corpus's too: by default (
MOF_COMPANIES_Q4_RULE=ytd9) a fourth quarter the company did not report on its own is FY minus the 9-month year-to-date, the rule of company-corpus's published outputs, computed from the store's own values, not by this server. The store holds the 9-month values (fundamentals3.1.0, frequencyytd9); a TTM window needing a 9-month value the company did not file is absent (no row), never computed another way.sum_of_quartersinstead takes FY minus Q1, Q2 and Q3 whenever those three quarters are in the store.frequency. Incompanies_fundamentals,annual,quarterlyandsemiannualalso return the balance-sheet values (frequencyinstant) dated at the ends of the included periods, as the ratios use them;instantalone returns balance-sheet values only. Incompanies_facts,frequencyfilters the filed column as it is (raw), includingytd9(the 9-month year-to-date, used only to derive an unreported fourth quarter;companies_fundamentalshas no 9-month periods).Sector unknown. There is no SIC classification yet:
sector_relevantis null on the sector-sensitive ratios and true on the others.CSV.
datasets_export_csvtakes the same arguments asdatasets_read_asof; decimals are written exactly (a column's decimals share the widest scale, so1.5can appear as1.500000). With no rows, the header alone ifcolumnsis given, else an empty string.Time budget, and a store read over SMB. One call, all its store reads together, gets
MOF_COMPANIES_QUERY_TIMEOUT_Sseconds (default 20) and then answers[timeout]. The default is sized for the NAS, where the server runs next to the store and readslake/from local disk. Read over SMB instead (measured from a Mac, 2026-11),companies_fundamentalstook 42 to 51 s cold and about 17 s warm, so the default fails cold calls. A deployment that reads the store over SMB (or another network share) should raiseMOF_COMPANIES_QUERY_TIMEOUT_S, e.g. to 90; the client's own tool-call timeout must then be longer than that too.
Errors
Tool errors are MCP tool errors whose message starts with a stable code, [code] message, so agents can
branch on the code and show the message.
Code | Meaning | What to do |
| A bad argument: | Fix the argument; pass |
| No document with that | Find ids with |
| The vault query or the company store read exceeded its time budget ( | Narrow the filters. |
| The vault database lacks a column or table the pinned vault-query reads: the vault is older than this server (see Minimum vault schema under Tools). | Deploy the vault (and run its ingestion) first; check the deployment. |
| The vault database or the company data store is unreachable (or refused the query). | Retry later; check the deployment. |
|
| Retry later for |
|
| Ask for at most the maximum the message names. |
| The result exceeds | Ask for a smaller |
| A company reference matches several companies. | Pick a candidate from the message and pass its CIK. |
| No company matches the reference. | Use |
| A concept key is not in the catalogue. | The message lists valid keys. |
| A ratio key is not in the catalogue. | The message lists valid keys. |
| No dataset with that name. | Names come from |
| A filter or column is not in the dataset. | Columns come from |
| More companies than | Split the request. |
Arguments that do not match a tool's input schema (wrong type, string too long, e.g. an over-long company
id) are rejected by the MCP framework before a tool runs, without a [code]. An unexpected internal failure reaches the client as a generic error
without details (they may hold connection strings); the server log has the rest. rag_search is the
exception: every error of its search is answered with a coded [rag_unavailable] reason, so nothing of
an exception reaches the framework (see Privacy in Passage search). Over HTTP, a missing or
unknown token is rejected with HTTP 401 before any tool runs.
Tiers and tokens
Two tiers:
read(read-only tools) andact(every tool; impliesread). An entry without a tier isact. v1 ships no act-only tool yet; the tiers are enforced all the same. A tool above the caller's tier is not listed to that caller and cannot be called.One token per client, each with its tier, in
MOF_MCP_TOKENSasclient:sha256hex[:tier], comma-separated. Client ids are 1-32 characters ofA-Z a-z 0-9 _ . -. The client id appears in the audit log line of every tool call (tool=... client=... outcome=... ms=..., on stderr; arguments are never logged).Make a token with
myopenfund-mcp hash-token <client> [--tier read|act](in a container:docker compose run --rm mcp myopenfund-mcp hash-token <client>). It generates a random 256-bit token, prints it on stderr, and prints theMOF_MCP_TOKENSentry alone on stdout. Give the token to that client only; the server stores only its SHA-256 digest. It never accepts a token you supply.Entropy: digests are unsalted SHA-256, which is safe only for high-entropy random tokens such as the generated ones. Never use a passphrase or a hand-picked token.
Revoke a client: remove its entry and restart. Configuration errors name the faulty entry by position, never by content, so a misplaced token is not echoed into logs.
Configuration and limits
Environment variables only (a .env file in a deployment); see .env.example. An unset
or empty variable takes its default; a bad value stops the server at start, naming the variable.
Variable | Default | Meaning |
|
|
|
|
| HTTP listen address. The Docker image sets |
|
| HTTP port (1-65535). |
|
| HTTP endpoint path; must start with |
| unset |
|
| unset | Vault Postgres URL, read-only role; unset = no vault toolset. Set |
|
| Postgres |
|
| Postgres connection timeout, in seconds (2-300). |
|
| Rows per page when the caller gives no |
|
| Largest |
|
| Largest tool result in characters (at least 1000); larger results are refused. The cap measures the result's text block (compact JSON); the protocol also carries the same data as structured content, so a response on the wire is roughly twice that size. |
|
| Error samples kept per row of |
|
| Each error text in |
| unset | my-open-data catalogue connection string as the read-only |
| unset | Folder holding |
|
| Seconds one companies tool call may spend on all its store reads before it answers |
|
| Most companies a single call may name (1-100). |
|
| Store reads running at once (1-16); a read abandoned at its time budget keeps its slot until it ends, so the next callers may also get |
|
| How TTM derives a fourth quarter the company did not report on its own: |
| unset | Qdrant host name or address, alone: a scheme, a path or a port ( |
|
| Qdrant HTTP port (1-65535). |
| unset | Qdrant API key; a read-only key is enough and recommended. Never logged, shown or put in an error. |
|
| Connect to Qdrant over TLS ( |
|
| Seconds one request to Qdrant may take (1-300, at most |
|
| Time budget of one |
|
| Searches running at once (1-64), in threads of the toolset's own. The calls in excess wait without holding a thread. |
|
| Seconds a failed collection check is remembered (1-3600): calls made meanwhile answer |
| unset | Collection searched (768-dimension cosine vectors of |
| unset | Directory holding the embedding model files (about 1.1 GB), as an absolute path. Required with the rag toolset, for every transport: the model is never kept in a temporary directory. Fill it once, then mount it read-only. The process needs about 2 GB of memory while the model loads: give a container at least 3 GB. |
| unset | Threads of the ONNX runtime (1-256). Unset = one per core of the host; in a container with a CPU limit, set it to the limit. |
|
| Passages |
|
| Largest |
|
| Seconds the collection's filter values (source codes, doc types, languages) are kept before being read again (1-86400). |
|
| Least seconds between two reads of the filter values that the TTL did not ask for: the read made before a value is refused, and the retry after a failed read (1-3600). |
| unset | One line of text appended to the description of |
|
| How a date bound of |
|
|
|
|
|
|
Read by compose.example.yaml only, not by the server: MOF_MCP_BIND_ADDR (host address the port is
published on, default 127.0.0.1), MOF_MCP_BIND_PORT (default 8000), MOF_VAULT_DOCKER_NETWORK (the
vault stack's Docker network to join).
Local models
The server works with any MCP client, including clients driving local models. No tool needs a hosted LLM: every v1 tool is deterministic and the client's model does the reasoning. Tools that will use an LLM later (such as an answer tool over RAG) are optional, always support a local backend, and are not mounted when no LLM is configured. Tool descriptions are directive and arguments are validated against the input schema, to help small models call them correctly.
Roadmap
v1 (this release):
server_infoand thevault_*toolset over the central-bank corpus, read-only; tiers, tokens, Docker image.v1.1:
rag_search(cited passage search over the embedded corpus, delivered); embedding as anactjob andjobs_*to follow long actions are still to come.v2:
companies_*(identity resolution, filings fetched on demand, reported fundamentals) anddatasets_*over the MyOpenFund data library.Later:
graph_*and more sources.
Development
python -m venv .venv
.venv/bin/pip install -e ".[vault,companies,rag,dev]"
.venv/bin/ruff check .
.venv/bin/python -m pytest -qThe default test run needs no database, network or model. Opt-in suites are excluded by default and run with an explicit marker:
pytest -m integration: against a real vault database, withMOF_MCP_IT_DATABASE_URLset.pytest -m integration tests/integration/test_real_store.py: against a real company store, withMOF_MCP_IT_COMPANIES_CATALOGandMOF_MCP_IT_COMPANIES_DATA_ROOTset (optional:MOF_MCP_IT_COMPANIES_TIMEOUT_S, default 120;MOF_MCP_IT_ASSERT_LATENCY=1to enforce the 5 s criterion, on the NAS only; add-sor-rPto see the printed fundamentals latency).pytest -m integration tests/integration/test_real_qdrant.py:rag_searchagainst a throwaway Qdrant (never a production one: the test creates and deletes collections), withMOF_MCP_IT_QDRANT_URLset (e.g.http://127.0.0.1:6333). The test creates, seeds (through rag-engine, with its model-freeFakeEmbedder) and deletes collections namedmof-mcp-it-*. Optional, for a Qdrant with keys:MOF_MCP_IT_QDRANT_API_KEY(can write) andMOF_MCP_IT_QDRANT_READ_ONLY_API_KEY(given to the server).pytest -m llm: a scripted session with a local model, withMOF_MCP_IT_OLLAMA_URLset.
Build the image with docker build -t myopenfund-mcp .; docker run --rm myopenfund-mcp myopenfund-mcp --help lists the commands.
License
MIT, see LICENSE.
Available Tools
1 toolserver_infoServer InfoARead-only
What this deployment offers: enabled toolsets, your tier, version, data freshness.
If the vault cannot be read, freshness is null and freshness_error says why; the rest still answers.
Inputs: no named parameters. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
There is only one tool, so there is no possibility of confusing it with another. Its purpose—returning deployment metadata—is clear.
With a single tool, there is no pattern to violate. The name `server_info` is clear snake_case and readable.
A one-tool surface is very thin for a server whose name suggests fund/vault operations. The sole tool only reports deployment metadata rather than exposing domain functionality.
The surface is severely incomplete for a fund-oriented MCP server: it offers no tools to read or manage vault/fund data. `server_info` is introspection only and leaves obvious domain operations missing.
Maintenance
Related MCP Connectors
Query SEC EDGAR filings, XBRL financials, and company data via MCP. STDIO or Streamable HTTP.
Guarded MCP server for agent-readable business truth, provenance, readiness, and discovery.
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
Streamable HTTP MCP gateway for NV oOS fleets — one API key, namespaced tools, quotas and policy.
Related MCP Servers
- AlicenseAqualityDmaintenanceA thin stdio gateway to Nodus's Streamable HTTP MCP server, exposing a curated allowlist of tools for the Research Workbench. It enables secure, bearer-authenticated interactions with Nodus without graph logic or caching.1MIT
- FlicenseNot gradedqualityCmaintenanceEnables MCP clients to call simple tools (add, echo), access a memo resource, and run a summarization prompt over stdio or streamable HTTP.-
- AlicenseNot gradedqualityBmaintenanceExposes two tools, ask and search, over both streamable HTTP and stdio transports, letting MCP clients pull grounded, inline-cited answers or ranked chunks from an indexed corpus of registered repositories and web pages. The HTTP endpoint is unauthenticated and pinned to the public visibility tier, while the stdio proxy carries the caller's API key and therefore their tier.MIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients to search, record, correct, and review the provenance and version history of memories, and to obtain answers composed from guarded context in which private values are replaced by placeholders and resolved locally on the device. Exposes these capabilities through dependency-free tools over stdio.MIT