Choose between the Metorial SDK, the REST API and plain MCP
Use the SDK when it has an adapter for your framework, plain MCP when your framework has its own MCP client, and the REST API from any other language.
Use the Metorial SDK when it has an adapter for your model SDK or framework. It creates the session, formats the tools and runs the calls. Use a plain MCP connection when your framework brings its own MCP client. Use the REST API from languages other than TypeScript and Python, and to manage resources. All three work on the same sessions and authenticate with the same secret API key, so you can combine them.
What you'll learn
- Which path fits which stack
- What each path does for you and what it leaves to you
- The first command or call for each path
Before you start
- Install the CLI and sign in
- A secret API key in
METORIAL_API_KEY
Pick a path
| You are building with | Use | Guide |
|---|---|---|
| Vercel AI SDK, or the OpenAI, Anthropic, Google or Mistral SDK | SDK adapter | Provider runtime |
| LangChain or LangGraph, in TypeScript or Python | SDK adapter | LangChain and LangGraph |
| OpenAI Agents SDK, LlamaIndex, CrewAI, Google ADK, Pydantic AI or AutoGen, in Python | SDK adapter | Frameworks |
| OpenAI Agents SDK in TypeScript, Claude Agent SDK or Mastra | SDK for the session, then the framework's MCP client | Claude Agent SDK, Mastra |
| Any other MCP client | REST API for the session, then MCP | Connect any MCP client |
| Go, Java, Ruby or another language | REST API | Getting started with the API |
| An AI client such as Claude, Cursor or ChatGPT, used by a person | A portal's Magic MCP URL, no code | Supported clients |
Compare the three
| SDK | Plain MCP | REST API | |
|---|---|---|---|
| Packages | metorial on npm and PyPI, plus an adapter package in TypeScript | Any MCP client library | None |
| Creates the session | Yes, in metorial.connect() | No. Create it with the SDK, the REST API or the CLI | Yes, POST /sessions |
| Formats tools for the model | Yes | Your MCP client or framework does | You do |
| Runs tool calls | Yes, through the adapter | Your MCP client does, with tools/call | You do |
| Auth | Secret API key | Secret API key or the session's client_secret, as a Bearer token | Secret API key as a Bearer token |
| Per-user OAuth | providerAuthConfigId in a provider entry | Set when the session is created | provider_auth_config_id in a provider entry |
| Languages | TypeScript and Python | Any | Any |
Start each path
The SDK path is one call. Every framework guide has a complete program.
For plain MCP, create a session and point your client at its connection_url with the API key as a Bearer token:
For the REST API, send the same request yourself:
Next steps
- Developer quickstart: the SDK from install to first tool call
- Connect any MCP client: the session endpoint, headers and tokens
- Notes for AI code generators: current package names and the mistakes to avoid
- API reference: every REST endpoint