beeai

A guide for using the BeeAI Framework, a tool for building AI-agent applications in Python or TypeScript, with tools from MCP servers.

In plain words
What is it for?
Installing BeeAI and MCP packages, configuring authentication and server addresses, and connecting BeeAI agents to ContextForge tools.
Why use it?
It shows how BeeAI agents can discover and use remote tools through a local or network connection to an MCP server.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/ibm/mcp-context-forge/beeai
Clone the repo
git clone --depth 1 https://github.com/IBM/mcp-context-forge
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,379 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.02379
Opus 5 $0.00000 $0.01189
Sonnet 5 $0.00000 $0.00476
Haiku 4.5 $0.00000 $0.00238

Measured 2d ago against content hash 034ca83d7d05, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

beeai scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

fetch(url, {
Origin

Copies of this mod

1 near-identical copy found in the catalogue:

  • beeai — 100% identical, 0 lines differ
docs/docs/using/agents/beeai.md · 322 lines

How it starts

The opening of the file, as written. The whole thing — 322 lines — stays where its author put it; the contents beside it link to each section on GitHub.

BeeAI Framework Integration with ContextForge

BeeAI Framework is a dual-language framework for building agentic applications in Python and TypeScript. It can use tools exposed by any MCP server through BeeAI's MCPTool, which discovers remote tools from an MCP client and makes them available to BeeAI agents.

ContextForge can be used in two common ways:

  • Start mcpgateway-wrapper as a local stdio MCP server for clients that spawn subprocesses.
  • Connect BeeAI directly to ContextForge over Streamable HTTP, or to a legacy SSE endpoint when required.

🛠 Installation

Install the Python packages when building BeeAI agents in Python:

pip install "beeai-framework[mcp]" mcp-contextforge-gateway

Install the TypeScript packages when building BeeAI agents in Node.js:

npm install beeai-framework @modelcontextprotocol/sdk zod

Prepare the ContextForge connection values used in the examples:

export MCPGATEWAY_BEARER_TOKEN="<gateway-token>"
export MCP_AUTH="Bearer ${MCPGATEWAY_BEARER_TOKEN}" # pragma: allowlist secret

# Virtual server endpoint used by mcpgateway-wrapper.
export MCP_SERVER_URL="http://localhost:4444/servers/UUID_OF_SERVER_1/mcp"

# Direct MCP endpoints used by HTTP/SSE clients.
export MCP_GATEWAY_MCP_URL="http://localhost:4444/mcp"
export MCP_GATEWAY_SSE_URL="http://localhost:4444/sse"

See mcpgateway-wrapper for details on generating tokens and choosing the correct virtual server URL.


🔗 Python: stdio via mcpgateway-wrapper

Use the wrapper when you want BeeAI to spawn ContextForge as a local stdio MCP server while the wrapper forwards calls to the gateway.

import asyncio
import os

from mcp import StdioServerParameters, stdio_client

from beeai_framework.agents.requirement import RequirementAgent
from beeai_framework.backend import ChatModel
from beeai_framework.tools.mcp import MCPTool

server_params = StdioServerParameters(
    command="python3",
    args=["-m", "mcpgateway.wrapper"],
    env={
        "MCP_SERVER_URL": os.environ["MCP_SERVER_URL"],
        "MCP_AUTH": os.environ["MCP_AUTH"],
        "MCP_WRAPPER_LOG_LEVEL": "OFF",
    },
)


async def main() -> None:
    client = stdio_client(server_params)
    tools = await MCPTool.from_client(client)

    agent = RequirementAgent(
        llm=ChatModel.from_name(os.getenv("BEEAI_CHAT_MODEL", "ollama:granite4:micro")),
        tools=tools,
    )

    response = await agent.run("List the tools available through ContextForge.")
    print(response.last_message.text)


if __name__ == "__main__":
    asyncio.run(main())

Read the full file on GitHub · 322 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 322 lines · 0 tokens per session scan A 034ca83d7d05

Subscribe to this mod's changes

beeai is an agent published in the GitHub repository IBM/mcp-context-forge (4,399 stars, last pushed today), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 2,379 tokens. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.