Loading video...

Video Failed to Load

Go Home

We've updated the Massive MCP server from 53 tools down to just 4. This results in significantly less context overhead on every request. What your agent does now: -> Searches for any Massive endpoint by natural language -> Read its full docs automatically -> Call the API and store...

3,893,184 views • 6 months ago •via X (Twitter)

29 Comments

Massive's profile picture
Massive6 months ago

Why we rewrote the server The original Massive MCP server exposed one tool per API endpoint. That made sense early on, but as the platform grew, the tool count hit 53. This is extremely inefficient, because every tool definition (name, description, input schema) gets injected into the model's context window on every single request. Anthropic's engineering team documented this in their Advanced Tool Use guide: in a real-world setup with ~58 tools across five MCP servers, tool definitions alone consumed roughly 55,000 tokens before the conversation even started. They observed internal setups where tool definitions hit 134,000 tokens. That's context window space that could be holding your actual conversation, your data, your analysis.

Massive's profile picture
Massive6 months ago

Our 53-tool server had the same problem. Each Massive endpoint had its own tool with a full parameter schema. Some of the heavier tools, like our Benzinga earnings endpoint, carried upwards of 45 parameters each with types, descriptions, and filter variants. Across all 53 tools, the server exposed roughly 450 parameters total. Based on Anthropic's published benchmarks for similar tool sets, we estimate this loaded somewhere in the range of 15,000 tokens per session, just for tool definitions. That's tokens you're paying for on every request, and context space the model can't use for reasoning about your actual question.

Massive's profile picture
Massive6 months ago

The rewrite compresses everything into four composable tools with 11 total parameters. Based on the same benchmarks, total tool definition overhead drops to roughly 1,000-1,500 tokens. That's an estimated reduction of over 90%. But the token savings are only half the story. Anthropic's research also showed that tool selection accuracy degrades as tool count increases. With 50+ tools, the model has to read through dozens of schemas to pick the right one. Their testing showed that Opus 4 improved from 49% to 74% tool selection accuracy when using search-based discovery instead of a flat tool list. Fewer, well-designed tools means the model picks the right action more reliably. The new architecture also solves the maintenance problem. When we shipped a new endpoint under the old design, we had to add a new tool definition, update the server, and push a new version. Now, the server indexes endpoints dynamically from our documentation at startup. New endpoints are discoverable the next time the server restarts. No code changes, no version bumps.

Massive's profile picture
Massive6 months ago

The four tools Here's what the new server exposes: search_endpoints Search for API endpoints and built-in financial functions by natural language query. The server indexes every Massive REST endpoint at startup using BM25 ranking over the documentation served at get_endpoint_docs Once the agent identifies a relevant endpoint from the search results, it fetches the full parameter documentation: path parameters, query parameters, types, defaults, and constraints. This is the equivalent of the agent reading the docs page for a specific endpoint, except it happens programmatically and only for what's needed. call_api Call any Massive REST API endpoint. The agent constructs the request from the parameter docs it just read, and the server handles authentication, pagination hints, and response parsing. The key feature here is the store_as parameter: pass a table name and the response gets stored as an in-memory DataFrame. You can also pass an apply parameter to run built-in financial functions on the results inline, without a separate tool call. query_data Run SQL against stored DataFrames using an embedded SQLite engine. This supports everything you'd expect: JOINs, CTEs, window functions, aggregations. It also supports utility commands like SHOW TABLES, DESCRIBE <table>, and DROP TABLE.

Massive's profile picture
Massive6 months ago

How the search index works At startup, the server fetches the llms.txt index from Massive's documentation site. This index lists every REST endpoint with its name, URL pattern, and a short description. The server tokenizes these entries and builds a BM25 index in memory. When the agent calls search_endpoints with a natural language query, the server ranks every endpoint by relevance and returns the top matches. Because the index is rebuilt on each startup, any new endpoints that Massive ships are immediately discoverable without updating the MCP server itself. This is the core architectural decision that makes the four-tool design work. The agent doesn't need to know about every endpoint in advance. It searches, finds what's relevant, reads the docs for just that endpoint, and calls it. Context usage stays minimal. If you've read Anthropic's documentation on tool search patterns, this will look familiar. Their recommended approach for scaling beyond a handful of tools is to replace static tool catalogs with search-based discovery. We've baked that pattern directly into the server itself, so you don't have to implement it in your client.

Massive's profile picture
Massive6 months ago

Built-in financial functions The server ships with 13 built-in financial functions that can be applied to API results or SQL query outputs via the apply parameter. These run server-side, so the agent doesn't need to write Python or import libraries. Options Greeks (Black-Scholes) bs_price, bs_delta, bs_gamma, bs_theta, bs_vega, bs_rho These compute standard Black-Scholes values. Useful when you're working with raw options chain data and need Greeks that aren't included in the snapshot, or when you want to recalculate under different assumptions. Returns analysis simple_return, log_return, cumulative_return, sharpe_ratio, sortino_ratio Run these against stored price series to get return metrics without exporting the data or writing calculation code. Technical indicators sma (simple moving average), ema (exponential moving average) Apply these directly to OHLCV data stored from aggregate bar queries. The pattern looks like this in practice: call the API to fetch daily bars, store them as a table, then run a SQL query with apply: "sma(close, 20)" to get a 20-day moving average column appended to your results.

Massive's profile picture
Massive6 months ago

What a typical session looks like Once the server is connected, you interact with Massive's API entirely through natural language. Here's what a typical workflow looks like from the agent's perspective: 1. You ask: "Get me the last 30 days of daily AAPL data." with a query like "AAPL daily aggregate bars" and gets back the stocks aggregates endpoint as the top result. 2. The agent calls search_endpoints to read the parameter schema for that endpoint: path parameters (ticker, multiplier, timespan, from, to), query parameters (sort, limit, adjusted). 3. The agent calls get_endpoint_docs to save the results. 4. The agent calls call_api with the correct path and parameters, and passes store_as: "aapl_daily" 5. You follow up: "What was the average volume on up days vs down days?" 6. The agent calls query_data and uses SQL to retrieve results. No manual endpoint lookup. No URL construction. No context window filled with 53 tool schemas. The agent discovers what it needs, fetches only the relevant documentation, and keeps your conversation focused on the analysis.

Massive's profile picture
Massive6 months ago

The MCP server is open source and under active development. If you run into issues or want to request a feature, open an issue on the repo: We're particularly interested in feedback on the built-in financial functions. If there are calculations you find yourself running repeatedly after fetching data, those are good candidates for new apply functions. To get started, pick whichever client you prefer, plug in your API key, and ask your agent for the data you need. It'll figure out the rest.

Massive's profile picture
Massive6 months ago

You can also find it in the connectors section of Claude Desktop.

Massive's profile picture
Massive6 months ago

Disclaimer This content is for educational purposes only. Nothing in this post constitutes investment advice or a recommendation to buy or sell any securities or other financial instruments. Massive is a market data provider, not a broker-dealer, exchange, or investment adviser. Market data accessed through Massive may originate from third-party exchanges and data providers or may be derived or calculated by Massive; in either case, it is subject to the applicable terms of your Massive subscription agreement. The data and code samples provided by Massive are offered on an "as-is" basis without any warranty of accuracy, completeness, or timeliness. You are solely responsible for your use of the data provided by Massive and for compliance with all applicable terms and conditions, laws, and data licensing requirements.

Massive's profile picture
Massive6 months ago

You can start using the Massive MCP server for free by signing up for an API key over on

Jimmy Ashcot's profile picture
Jimmy Ashcot5 months ago

ngl cutting 53 tools down to 4 is the real refactor

Sofie Lake 🌷 🌼's profile picture
Sofie Lake 🌷 🌼2 months ago

what happens when the NL search hallucinates a non-existent endpoint

sophie who?'s profile picture
sophie who?2 months ago

this is genuinely the kind of efficiency i want in my life

Sofie 🌸 🌙 💜's profile picture
Sofie 🌸 🌙 💜2 months ago

so you traded 53 tools for 4 and a search bar - how often does it hallucinate the wrong endpoint

Interesting as f...'s profile picture
Interesting as f...2 months ago

So the server went on a schema diet and came back with SQL superpowers?

sophie's profile picture
sophie2 months ago

curious how you handle rate limits when you’re funneling all those calls through a single NL search step

Sofia Lily 🌛 💜's profile picture
Sofia Lily 🌛 💜2 months ago

so you replaced 53 tools with NL search - what's the latency penalty for the translation step

𖥧 sophie ✧'s profile picture
𖥧 sophie ✧2 months ago

curious if the natural language search handles edge cases or if it just punts when it's ambiguous

ブリン's profile picture
ブリン2 months ago

Trimming 53 tools down to 4 is like @0xndra and @Lawliw switching from a cluttered toolbox to a Swiss Army knife for better focus.

Sofie 💫 🌷's profile picture
Sofie 💫 🌷2 months ago

4 tools and an NL search - curious how you handle the false positives when the model misinterprets a query

sos 🦋's profile picture
sos 🦋2 months ago

gotta ask - embeddings or regex for the nl search?

♡ sofi ⋆'s profile picture
♡ sofi ⋆2 months ago

fascinating. can it handle rate limit errors gracefully or does it just hang

Sofia 💗's profile picture
Sofia 💗2 months ago

NL search is the bottleneck now - what's your precision rate

✿ sof ♡'s profile picture
✿ sof ♡2 months ago

Interesting perspective

Sophia Dove 💙's profile picture
Sophia Dove 💙2 months ago

4 tools is a flex but what’s the fallback when the NL search hallucinates an endpoint

sophia ⋆'s profile picture
sophia ⋆2 months ago

does it cache the docs or fetch fresh each time

ೃ⁀➷ sof ࿔˚⋆'s profile picture
ೃ⁀➷ sof ࿔˚⋆2 months ago

does it handle edge cases well

Alyssa 🦉's profile picture
Alyssa 🦉2 months ago

unexpected moment but I’m entertained

Related Videos

HERMES AGENT WITHOUT TOOLS IS A CHATBOT. WITH THEM IT BUILDS 3D TOWERS IN BLENDER, CHECKS STOCK PRICES, AND DRIVES VS CODE. tonbi JUST DROPPED THE FULL GUIDE. module 6 of his 10-part Hermes masterclass. best breakdown of the tool layer anyone has published. what you need to know: TOOLS vs SKILLS vs MCP skills = instructions (markdown, loaded into context) tools = callable functions (Python, agent emits call, Hermes executes) MCP = adapters to external systems (Blender, Stripe, Linear, Notion) every tool has three parts: → the function (does the real work) → the schema (what the model sees to decide when to call it) → the registry (makes the tool exist in the agent) the model never runs the function directly. it emits a structured request (tool name + JSON args). Hermes executes and returns the result. if the tool fails, the error goes back as JSON. the agent recovers instead of crashing. TOOL SETS CONTROL THE SURFACE hermes chat --tool-sets web # only web tools loaded. no files, no terminal. hermes chat --tool-sets safe # read-only: web search, vision, image gen. # no file writes. no terminal. no code execution. mid-session: /tools enable video /tools disable terminal or toggle in the dashboard: hermes dashboard → Skills → Tool Sets MCP SERVERS two transport types: STDIO (local subprocess) or HTTP (remote endpoint). add a server: hermes mcp # or ask: "add the MCP server for Blender" filter tools with include/exclude per server. keep only what you trust. security: → OAuth 2.1 PKCE (no long-lived tokens in config) → package scanning via api.osv. dev before launch → all MCP calls go through approval gates HERMES AS MCP SERVER hermes mcp serve exposes 10 tools via FastMCP. connect VS Code Copilot or Cursor to your running Hermes instance. BUILD YOUR OWN TOOL He built a stock price tool live: → Python function calling Finnhub API → schema with name, description, parameters → registered in tool_sets.py → agent calls it automatically when relevant any repeating API call in your workflow can become a native tool. full Hermes architecture deep-dive in the article 👇

YanXbt

32,680 views • 4 months ago

Your agents can't keep up with real-time data. Especially when it's scattered across dozens of sources. Most teams waste weeks building custom connectors for every database, API, and data warehouse. Then they build ETL pipelines to sync everything. By the time your agent retrieves the data, it's already outdated. Picture this: Your Postgres database updated 5 minutes ago. Your MongoDB collection changed 2 minutes ago. Your agent is still pulling from yesterday's snapshot. This is why most production RAG systems fail. There's a better approach: MindsDB is an open-source AI platform with a federated data engine that lets you query multiple data sources in real-time using SQL - without moving any data. Here's what makes it different: ↳ Your data stays in place. No ETL pipelines or data duplication ↳ Query Postgres, MongoDB, REST APIs, and more using consistent SQL ↳ JOIN across different sources in real-time with a unified interface ↳ Works with both structured and un-structured data And here's the best part: You don't even need to write SQL. Just describe what you want in plain English, and MindsDB converts it to SQL automatically. The system does all the heavy lifting. The breakthrough for AI agents is simple: When data updates at the source, your agent gets fresh results immediately. No sync delays. No stale embeddings. No custom code for each integration. You can literally write a SQL query that joins a Postgres table with a MongoDB collection and gets live results. This is what production AI applications need but rarely get. In this video, I give you a complete walkthrough of what we just discussed and how to actually do it. Make sure you watch this till the end. I've shared the link to MindsDB's GitHub repo in the next tweet!

Akshay 🚀

65,672 views • 11 months ago

New course: MCP: Build Rich-Context AI Apps with Anthropic. Learn to build AI apps that access tools, data, and prompts using the Model Context Protocol in this short course, created in partnership with Anthropic Anthropic and taught by Elie Schoppik Elie Schoppik, its Head of Technical Education. Connecting AI applications to external systems that bring rich context to LLM-based applications has often meant writing custom integrations for each use case. MCP is an open protocol that standardizes how LLMs access tools, data, and prompts from external sources, and simplifies how you provide context to your LLM-based applications. For example, you can provide context via third-party tools that let your LLM make API calls to search the web, access data from local docs, retrieve code from a GitHub repo, and so on. MCP, developed by Anthropic, is based on a client-server architecture that defines the communication details between an MCP client, hosted inside the AI application, and an MCP server that exposes tools, resources, and prompt templates. The server can be a subprocess launched by the client that runs locally or an independent process running remotely. In this hands-on course, you'll learn the core architecture behind MCP. You’ll create an MCP-compatible chatbot, build and deploy an MCP server, and connect the chatbot to your MCP server and other open-source servers. Here’s what you’ll do: - Understand why MCP makes AI development less fragmented and standardizes connections between AI applications and external data sources - Learn the core components of the client-server architecture of MCP and the underlying communication mechanism - Build a chatbot with custom tools for searching academic papers, and transform it into an MCP-compatible application - Build a local MCP server that exposes tools, resources, and prompt templates using FastMCP, and test it using MCP Inspector - Create an MCP client inside your chatbot to dynamically connect to your server - Connect your chatbot to reference servers built by Anthropic’s MCP team, such as filesystem, which implements filesystem operations, and fetch, which extracts contents from the web as markdown - Configure Claude Desktop to connect to your server and others, and explore how it abstracts away the low-level logic of MCP clients - Deploy your MCP server remotely and test it with the Inspector or other MCP-compatible applications - Learn about the roadmap for future MCP development, such as multi-agent architecture, MCP registry API, server discovery, authorization, and authentication MCP is an exciting and important technology that lets you build rich-context AI applications that connect to a growing ecosystem of MCP servers, with minimal integration work. Please sign up here!

Andrew Ng

142,256 views • 1 year ago

Google open-sourced MCP Toolbox for Databases. I gave it access to everything else. For context, Google's MCP Toolbox for Databases is an open-source server that lets AI agents securely query structured databases like PostgreSQL and MySQL through the MCP protocol However, most enterprise knowledge doesn't actually live in databases. It's scattered across emails, Slack threads, GitHub repos, Salesforce records, customer reviews, and internal docs. So Agents can't see any of it, which means they're working with a fraction of the context they need. I fixed that using MindsDB. It acts as a universal SQL layer that sits on top of all your data sources: structured, semi-structured, and unstructured. This means you can query Salesforce, Gmail, GitHub, S3 files, Jira, and 200+ more sources using SQL syntax. The clever part is how it connects to the MCP Toolbox. MindsDB exposes everything through MySQL, so from the Agent's perspective, it's just running SQL and getting context back. It doesn't know or care that the data came from five different sources behind the scenes. This setup unlocks some powerful capabilities: → One SQL interface for dozens of enterprise sources → Cross-datasource joins (combine GitHub and CRM data in a single query) → Built-in ML capabilities for working with unstructured data → Simple MCP tools that now have massively expanded reach In the video below, the Agent queries GitHub data and a customer review database in one SQL query. So what used to require ETL pipelines and weeks of engineering effort now happens instantly. At the end of the day, AI agents are only as useful as the data they can access. This gives them a lot more to work with. I have shared the GitHub repo in the replies, where you can find more details about this.

Akshay 🚀

40,562 views • 7 months ago