Latest Posts

Call Any MCP Tool Over HTTP

Blue abstract modular grid pattern
Blue abstract modular grid pattern

The context problem

MCP gives LLMs direct access to tools and data, but everything a tool returns has to pass through the model's context window. For most tasks that's fine — a JSON response here, a file listing there. It breaks down when the data gets big: a 50,000-row database dump, a diff of every file across two branches, translating a whole application. At that point the task either fails outright or burns an unreasonable number of tokens moving data through the model that the model never actually needed to read.

Tools as HTTP endpoints

Gatana's MCP HTTP API exposes every one of your MCP tools as a REST endpoint, described by an OpenAPI spec. Instead of pushing raw data through the context window, the LLM writes code that calls the tools over HTTP, processes the results locally, and reports back only what matters.

# Discover every tool, with full input/output schemas
curl https://YOUR_ORG.gatana.ai/api/mcp-httpapi/openapi.json \
  -H "Authorization: Bearer $TOKEN" | jq

# Call any tool as a simple POST
curl https://YOUR_ORG.gatana.ai/api/mcp-httpapi/github_pull_request_read \
  -X POST \
  -d method=get \
  -d owner=gatana-ai \
  -d repo=gatana-js \
  -d pullNumber=1 \
  -H "Authorization: Bearer $TOKEN"
# Discover every tool, with full input/output schemas
curl https://YOUR_ORG.gatana.ai/api/mcp-httpapi/openapi.json \
  -H "Authorization: Bearer $TOKEN" | jq

# Call any tool as a simple POST
curl https://YOUR_ORG.gatana.ai/api/mcp-httpapi/github_pull_request_read \
  -X POST \
  -d method=get \
  -d owner=gatana-ai \
  -d repo=gatana-js \
  -d pullNumber=1 \
  -H "Authorization: Bearer $TOKEN"
# Discover every tool, with full input/output schemas
curl https://YOUR_ORG.gatana.ai/api/mcp-httpapi/openapi.json \
  -H "Authorization: Bearer $TOKEN" | jq

# Call any tool as a simple POST
curl https://YOUR_ORG.gatana.ai/api/mcp-httpapi/github_pull_request_read \
  -X POST \
  -d method=get \
  -d owner=gatana-ai \
  -d repo=gatana-js \
  -d pullNumber=1 \
  -H "Authorization: Bearer $TOKEN"

Authorization works the same as regular MCP access — the tokens you already have are valid here too.

What this gets you

The right language for the job. Because the tools are just HTTP endpoints, the code that orchestrates them can be anything: TypeScript for JSON wrangling, Python with Pandas for a large data dump, whatever fits. You're not limited to what runs inside an MCP client.

A lean context window. The model sees the code it wrote and the final result. The heavy part — paginating through thousands of responses, filtering, aggregating — happens outside the context, wherever the code runs.

Code you can actually work with. Scripts can run in parallel, pipe results into each other, and be inspected or unit-tested like any other code. Debugging a data pipeline this way is a lot cheaper than trial-and-error through a prompt.

No server-side runtime. There's nothing to configure on Gatana's side beyond the token. The code runs wherever you run it — a laptop, a CI runner, a Lambda function.

Long-running calls

If a tool takes a while to respond, set the Accept header to text/event-stream. Gatana sends a keepalive ping every 15 seconds and closes the stream with the result, so slow tools don't hit connection timeouts.

An example from practice

One team used this to translate their entire application into multiple languages. Through standard MCP the task was a non-starter — too many strings and files to fit through the context window. Instead, Claude wrote a TypeScript pipeline that called their translation tools through the HTTP endpoints and processed everything locally. The job finished on the first attempt, using a fraction of the tokens the direct approach would have needed.

Getting started

  1. Generate a token — use the generate_token tool from Gatana's built-in server, or create a Personal Access Token from the dashboard.

  2. Fetch the OpenAPI specGET /api/mcp-httpapi/openapi.json returns every tool with full JSON Schema inputs and outputs.

  3. Call your toolsPOST /api/mcp-httpapi/tools/{tool_name} with a JSON body matching the schema.

  4. Let the LLM orchestrate — feed it the spec and ask it to write the code.


Want the full reference? See the HTTP MCP + OpenAPI documentation for endpoint details, pagination patterns, and SSE streaming examples.


What is Gatana?

Gatana is the market-leading AI/agent connectivity platform. It is flexible, configurable, powerful and useful for anyone from an individual to a large organization. It allows each team to centralize and manage all their agentic connectivity needs, be it MCP or HTTP or any other protocol, across any number of teams, contexts and separate departments.