The Maton Agent Toolkit connects popular agent frameworks to the Maton MCP server through function calling. The toolkit connects to https://mcp.maton.ai, discovers the available tools, and exposes them in each framework's native tool format.
It ships in two packages:
- TypeScript —
@maton/agent-toolkit: LangChain, Vercel AI SDK, OpenAI, MCP. - Python —
maton-agent-toolkit: OpenAI Agents SDK, LangChain, CrewAI, Strands.
Installation
npm install @maton/agent-toolkituv pip install maton-agent-toolkitUsage
Python
from maton_agent_toolkit.openai.toolkit import create_maton_agent_toolkit
from agents import Agent
async def main():
toolkit = await create_maton_agent_toolkit(api_key="YOUR_MATON_API_KEY")
maton_agent = Agent(
name="Maton Agent",
instructions="You are an expert at automating apps with Maton",
tools=toolkit.get_tools(),
)
# ... use agent ...
await toolkit.close() # Clean up when doneTypeScript
import {createMatonAgentToolkit} from '@maton/agent-toolkit/ai-sdk';
const toolkit = await createMatonAgentToolkit({
apiKey: process.env.MATON_API_KEY!,
configuration: {},
});
const tools = toolkit.getTools();
// ... use tools with generateText / streamText ...
await toolkit.close();import {createMatonAgentToolkit} from '@maton/agent-toolkit/langchain';
const toolkit = await createMatonAgentToolkit({
apiKey: process.env.MATON_API_KEY!,
configuration: {},
});
const tools = toolkit.getTools();
// ... pass tools to your LangChain agent ...
await toolkit.close();import {createMatonAgentToolkit} from '@maton/agent-toolkit/openai';
const toolkit = await createMatonAgentToolkit({
apiKey: process.env.MATON_API_KEY!,
configuration: {},
});
const tools = toolkit.getTools();
// ... pass tools to chat.completions.create ...
// then handle tool calls:
// const toolMessage = await toolkit.handleToolCall(toolCall);
await toolkit.close();import {createMatonAgentToolkit} from '@maton/agent-toolkit/modelcontextprotocol';
const server = await createMatonAgentToolkit({
apiKey: process.env.MATON_API_KEY!,
configuration: {},
});
// `server` is an McpServer instance ready to connect to a transport.Specifying connection
Provide a default connection that all requests route through (sent as the Maton-Connection header). If omitted, Maton uses the newest active connection for the target app.
const toolkit = await createMatonAgentToolkit({
apiKey: process.env.MATON_API_KEY!,
configuration: {
context: {
connection: 'conn_123',
},
},
});toolkit = await create_maton_agent_toolkit(
api_key="YOUR_MATON_API_KEY",
configuration={
"context": {
"connection": "conn_123"
}
},
)