
If you are building AI agents, you have likely hit the ‘ten-server wall.’ As you add more Model Context Protocol (MCP) servers to your agent’s toolkit, the tool manifest expands until it consumes your entire context window. This leads to a frustrating cycle where the model starts forgetting its primary instructions because it is too busy reading metadata about every available tool.
This problem is particularly evident when trying to scale agent orchestration across multiple services. You need a way to provide tools on demand rather than dumping them all into the prompt at once.
The Solution: Lazy Discovery via Heku
Heku changes the paradigm by acting as a single, intelligent gateway. Instead of a bloated manifest, heku uses lazy discovery to serve tools only when they are needed. The manifest stays lean—usually just a few hundred tokens—regardless of whether you have ten or two hundred configurations loaded.
You can explore the implementation and contribute to the heku repository on GitHub to see how this architecture functions under the hood. By shifting from ‘code-heavy servers’ to ‘JSON-driven configs,’ heku removes the ceiling on agent capability.
Key Architectural Advantages
- Lazy discovery: Tools are surfaced on demand, preventing context exhaustion.
- Configs, not code: Define endpoints and parameters in simple JSON files without building custom servers.
- Self-managing: The server can actually author its own configs by reading API documentation.
- Response stripping: Automatically trims large arrays or base64 blobs to keep the model’s focus sharp.
Implementing Your First Connector

Setting up a new tool is incredibly lightweight. For instance, if you want to connect your agent to GitHub’s API endpoint, you don’t need to write a Python wrapper; you just define the structure in a JSON config.
Here is an example of how a GitHub configuration looks within a heku setup:
{
"id": "github-http",
"name": "GitHub API",
"description": "Manage GitHub repos, issues, and pull requests",
"connector": {
"type": "http",
"base_url": "https://api.github.com",
"auth": { "type": "bearer", "token_env": "GITHUB_TOKEN" }
},
"tools": [
{
"name": "list_repos",
"description": "List repositories for the authenticated user",
"method": "GET",
"path": "/user/repos",
"params": [
{ "name": "per_page", "type": "number", "required": false, "location": "query", "description": "Results per page" }
]
}
]
}
Once your config is ready, you can launch the server instantly using Node.js:
npx @rapidthoughtlabs/heku start
A Versatile Connector Ecosystem

Heku is designed to bridge the gap between different protocols. Whether you are dealing with modern GraphQL architectures or legacy SQL databases, heku provides a unified interface.
| Connector Type | Status | What it Wraps |
|---|---|---|
| http | Standard | REST APIs |
| graphql | Standard | GraphQL APIs (Auto-discovery) |
| grpc | Standard | gRPC services |
| mcp | Standard | Existing MCP servers |
| sql | Experimental | Postgres / MySQL / SQLite |
This flexibility is essential when you are managing complex AI contexts that require data from disparate sources. By using heku, your agents can interact with everything from a local filesystem to a remote MongoDB instance through a single, streamlined protocol.
Results: Scalable, Lean, and Intelligent
By implementing heku, you move away from the brittle ‘prompt spaghetti’ of the past. Your agents become more reliable because they are no longer overwhelmed by irrelevant metadata. The result is an agent that maintains high precision even as its toolset grows into the hundreds.
Ready to optimize your MCP setup? Run npx @rapidthoughtlabs/heku start today and connect to the hosted console at console.rapidthoughtlabs.space to begin browsing and testing your new tools immediately.

