Elemental

by AttoAgents

MCP Client
  • agent-framework

Elemental is a multi-agent framework designed with a focus on the modularity of agent workflow stages. It enables the creation and management of single-agent or multi-agent systems with ease. The core functionality revolves around dynamically planning how to solve assigned tasks

About

What is Elemental?

Elemental provides an interface to bring tools provided by Model Context Protocol (MCP) servers into a unified toolbox for use by an agent. It allows MCP tools to be registered and called alongside native tools.

How to use Elemental?

Define MCP servers in the .env file using the mcpServers variable as a JSON string with server name, command, args, and env. Register MCP tools by name using the pattern MCP|server_name|tool_name or use MCP|server_name| to include all tools from a server. Tools are then available in the toolbox for agent use.

Key features of Elemental

- Integrates MCP server tools with native tools in a single toolbox.
- MCP tools require naming convention MCP|server_name|tool_name.
- Supports registering all tools from a server with a wildcard (
).
- Tools are described and called using the same mechanism as native tools.
- MCP server definitions are stored in a .env file as a JSON string.

Use cases of Elemental

FAQ from Elemental

How do I define MCP servers in Elemental?

Define them in the .env file with the mcpServers variable as a JSON string, e.g., mcpServers='{"Github": {"command": "npx", "args": ["-y","@modelcontextprotocol/server-github"], "env": {"GITHUB_PERSONAL_ACCESS_TOKEN": "<YOUR_TOKEN>"}}}'.

How do I register MCP tools?

Register them by name using the pattern MCP|server_name|tool_name (e.g., MCP|Github|list_issues) via box.register_tool_by_name().

Can I use all tools from an MCP server at once?

Yes, use MCP|server_name|* to include all tools provided by that server.

Can MCP tools be used with any language model?

Yes, tools are included in the description and called using the same mechanism as native tools and may be used with any language model.

What naming convention must MCP tools follow?

The name must be MCP|server_name|tool_name, where MCP indicates it comes from an MCP server, server_name matches the key in mcpServers, and tool_name is the individual tool name.

Details

Author
AttoAgents
Category
agent-framework
Repository
attoagents/elemental

Tool usage in Elemental

Elemental provides an interface to bring tools provided by Model Context Protocol (MCP) server. The tools are registered in the toolbox and can be used by the agent. The tools are brought to the ToolBox object with the same interface, however, definition of MCP servers must be present in the environment.

The MCP servers can be defined in the .env file in the mcpServers variable. Using Github MCP server as an example, the mcpServers entry could be

mcpServers='{"Github": {"command": "npx", "args": ["-y","@modelcontextprotocol/server-github"], "env": {"GITHUB_PERSONAL_ACCESS_TOKEN": "<YOUR_TOKEN>"}}}'

The mcpServers variable should be a JSON string with name of the server as a key and three variables command, args, and env present for the key. More than one server may be defined.

The MCP tools in Elemental require following particular naming convention to bring them together with native tools. The name of the tool must be MCP|server_name|tool_name, where MCP indicates that the tool needs to come from an MCP server, server_name will indicate the correct entry in the mcpServers definition to use for this server, tool_name is the name of the individual tool in the given server.

Example below illustrates how to bring MCP defined tools together with native tools

box = ToolBox()

box.register_tool_by_name("PythonRunner")
box.register_tool_by_name("Calculator")

box.register_tool_by_name("MCP|Github|list_issues")
box.register_tool_by_name("MCP|Github|search_repositories")

description = box.describe()

If you want to include all tools provided by a given MCP server, you may use MCP|server_name| instead of listing individual tools. The above toolbox specification would change to:

box = ToolBox()

box.register_tool_by_name("PythonRunner")
box.register_tool_by_name("Calculator")

box.register_tool_by_name("MCP|Github|")

description = box.describe()

Tools are included in the description and called using the same mechanism as the native tools and may be used with any language model.