Metorial

Tools & Infrastructure 💻 TypeScript ⚖️ Other 🟢 Actively maintained
3.4k stars

Metorial is an open-source identity and access layer for AI agents, providing consistent authentication, permissions, and observability when agents connect to external systems. It solves the problem of ad-hoc integration wiring by offering a control plane with 1200+ integrations, auth management, RBAC, and audit logs. It is for developers and security teams building agentic AI applications that need secure, standardized access to SaaS tools and enterprise systems.

✨ Key features

  • 1200+ integrations across SaaS, enterprise, data sources, and MCP servers
  • Auth and token lifecycle management for OAuth, API keys, service accounts
  • RBAC, SAML SSO, and IAM built in
  • Scoped permissions per agent, workflow, team, or environment
  • Audit logs and traceability for agent actions
  • Shared access patterns across teams and projects

🎯 Use cases

  • Connect AI agents to Slack, GitHub, Google Calendar, or SAP with OAuth
  • Expose integrations as tools to agent frameworks like Claude Code, Codex, Cursor
  • Centralize access control and auditing for agent actions across an organization
  • Reuse connections across projects, environments, and people
  • Self-host the Metorial Platform for full control

📦 Installation

🧰 Requirements: Requires an API key from Metorial (hosted or self-hosted) and Node.js or Python environment. No OS specified.

JavaScript / TypeScript

npm install metorial @metorial/ai-sdk @ai-sdk/anthropic ai

Python

pip install metorial pydantic-ai python-dotenv

🚀 Usage

JavaScript / TypeScript

import { Metorial } from 'metorial';
import { metorialAiSdk } from '@metorial/ai-sdk';
import { anthropic } from '@ai-sdk/anthropic';
import { stepCountIs, streamText } from 'ai';

let metorial = new Metorial({ apiKey: process.env.METORIAL_API_KEY! });

let deployment = await metorial.providerDeployments.create({
  name: 'Metorial Search',
  providerId: 'metorial-search'
});

let session = await metorial.connect({
  adapter: metorialAiSdk(),
  providers: [{ providerDeploymentId: deployment.id }]
});

let result = streamText({
  model: anthropic('claude-sonnet-4-20250514'),
  prompt:
    'Search the web for the latest news about AI agents and summarize the top 3 stories.',
  stopWhen: stepCountIs(10),
  tools: session.tools()
});

for await (let part of result.textStream) {
  process.stdout.write(part);
}

❓ FAQ

How do I get an API key?

The README uses process.env.METORIAL_API_KEY, but does not explain how to obtain one. You likely need to sign up on the hosted platform or self-host.

Can I use Metorial with Python?

Yes, there is a Python SDK and examples for PydanticAI, LangChain, LangGraph, OpenAI Agents, LlamaIndex, AutoGen, CrewAI, Google ADK, and Haystack.

Does Metorial support OAuth?

Yes, it provides setup sessions to handle OAuth flows for services like Slack, GitHub, Google Calendar, and SAP, and then reuses the auth config.

Can I self-host Metorial?

Yes, the Metorial Platform is open source and can be self-hosted to run your own instance.

📊 Repository

Stars★ 3,352
Forks🍴 363
Open issues🐛 2
Last commit🕒 Sep 4, 2026
Created📅 Apr 2025
Language💻 TypeScript
License⚖️ Other

🤖 Overview, features, install steps and FAQ were generated from the project's README on Sep 4, 2026. Always check the original source before running commands.