Skip to content

Context7 Platform -- Up-to-date docs for AI agents

docs: add new integrations for Factory AI, Mastra, and Tembo with corresponding setup instructions and images (#2428)

Enes Gules09d05bca29d8
diff --git a/docs/docs.json b/docs/docs.json
index e5e96fb6..667956c4 100644
--- a/docs/docs.json
+++ b/docs/docs.json
@@ -140,7 +140,10 @@
"group": "Integrations",
"pages": [
"integrations/github-actions",
- "integrations/code-rabbit"
+ "integrations/code-rabbit",
+ "integrations/factory-ai",
+ "integrations/tembo",
+ "integrations/mastra"
]
},
{
diff --git a/docs/images/integrations/tembo/integrations-page.png b/docs/images/integrations/tembo/integrations-page.png
new file mode 100644
index 00000000..0b440c00
Binary files /dev/null and b/docs/images/integrations/tembo/integrations-page.png differ
diff --git a/docs/images/integrations/tembo/server-connected.png b/docs/images/integrations/tembo/server-connected.png
new file mode 100644
index 00000000..2c9a6d36
Binary files /dev/null and b/docs/images/integrations/tembo/server-connected.png differ
diff --git a/docs/integrations/factory-ai.mdx b/docs/integrations/factory-ai.mdx
new file mode 100644
index 00000000..4d34370f
--- /dev/null
+++ b/docs/integrations/factory-ai.mdx
@@ -0,0 +1,50 @@
+---
+title: Factory AI
+sidebarTitle: Factory AI
+description: AI-native software development platform with Droids
+---
+
+[Factory AI](https://factory.ai) is a coding agent platform that uses "Droids" to handle development tasks. By connecting Context7 as an MCP server, Factory Droids can access up-to-date library documentation during coding tasks.
+
+For more details on how Factory AI handles MCP, see the [Factory AI MCP documentation](https://docs.factory.ai/cli/configuration/mcp).
+
+## Setup
+
+There are multiple ways to add Context7 as an MCP server in Factory AI. Replace `YOUR_API_KEY` with your API key from the [Context7 dashboard](https://context7.com/dashboard).
+
+### Using the CLI
+
+```bash
+droid mcp add context7 https://mcp.context7.com/mcp --type http --header "CONTEXT7_API_KEY: YOUR_API_KEY"
+```
+
+### Using the MCP Manager
+
+Run the `/mcp` command inside Factory and add Context7 from the interface.
+
+### Using a Configuration File
+
+Add Context7 directly to your `.factory/mcp.json` (project-level) or `~/.factory/mcp.json` (user-level):
+
+```json
+{
+ "mcpServers": {
+ "context7": {
+ "type": "http",
+ "url": "https://mcp.context7.com/mcp",
+ "headers": {
+ "CONTEXT7_API_KEY": "YOUR_API_KEY"
+ }
+ }
+ }
+}
+```
+
+## How It Works
+
+Once connected, Factory Droids will query Context7 for relevant library documentation during coding tasks. This helps Droids:
+
+- Use correct API signatures and patterns from the latest documentation
+- Avoid deprecated methods or outdated usage patterns
+- Generate implementations aligned with library best practices
+- Produce higher-quality code with fewer revision cycles
diff --git a/docs/integrations/mastra.mdx b/docs/integrations/mastra.mdx
new file mode 100644
index 00000000..afba5868
--- /dev/null
+++ b/docs/integrations/mastra.mdx
@@ -0,0 +1,68 @@
+---
+title: Mastra
+sidebarTitle: Mastra
+description: TypeScript framework for building AI agents
+---
+
+[Mastra](https://mastra.ai) is a TypeScript framework for building AI agents. It provides first-class MCP support through its `MCPClient` class. By connecting Context7 as an MCP server, your Mastra agents can access up-to-date library documentation, enabling them to generate accurate code and answer technical questions with current API references.
+
+For more details on how Mastra handles MCP, see the [Mastra MCP documentation](https://mastra.ai/docs/mcp/overview).
+
+## Setup
+
+<Steps>
+ <Step title="Install the MCP Package">
+ Add the Mastra MCP package to your project:
+
+ ```bash
+ npm install @mastra/mcp@latest
+ ```
+ </Step>
+ <Step title="Create an MCP Client">
+ Configure an `MCPClient` that connects to Context7:
+
+ ```typescript
+ import { MCPClient } from "@mastra/mcp";
+
+ const context7 = new MCPClient({
+ id: "context7",
+ servers: {
+ context7: {
+ url: new URL("https://mcp.context7.com/mcp"),
+ requestInit: {
+ headers: {
+ CONTEXT7_API_KEY: process.env.CONTEXT7_API_KEY!,
+ },
+ },
+ },
+ },
+ });
+ ```
+
+ Set `CONTEXT7_API_KEY` in your environment with your API key from the [Context7 dashboard](https://context7.com/dashboard).
+ </Step>
+ <Step title="Connect to Your Agent">
+ Pass the Context7 tools to your Mastra agent:
+
+ ```typescript
+ import { Agent } from "@mastra/core/agent";
+
+ const agent = new Agent({
+ id: "coding-assistant",
+ name: "Coding Assistant",
+ instructions: "You are a helpful coding assistant with access to up-to-date library documentation via Context7.",
+ model: "anthropic/claude-sonnet-4-6",
+ tools: await context7.listTools(),
+ });
+ ```
+ </Step>
+</Steps>
+
+## How It Works
+
+Once connected, your Mastra agents will query Context7 for relevant library documentation. This helps agents:
+
+- Answer technical questions with accurate, up-to-date API references
+- Generate code that follows current library patterns and best practices
+- Avoid hallucinating outdated or incorrect API usage
+- Provide version-specific guidance for any supported library
diff --git a/docs/integrations/tembo.mdx b/docs/integrations/tembo.mdx
new file mode 100644
index 00000000..c8481a98
--- /dev/null
+++ b/docs/integrations/tembo.mdx
@@ -0,0 +1,36 @@
+---
+title: Tembo
+sidebarTitle: Tembo
+description: Orchestration layer for AI-powered engineering workflows
+---
+
+[Tembo](https://tembo.io) is a platform for orchestrating AI coding agents across repositories and integrations. Context7 is available as a built-in MCP integration in Tembo, giving agents access to up-to-date library documentation.
+
+For more details on how Tembo handles MCP, see the [Tembo MCP documentation](https://docs.tembo.io/integrations/mcp).
+
+## Setup
+
+<Steps>
+ <Step title="Navigate to Integrations">
+ Go to the **Integrations** page in your Tembo dashboard. You'll see Context7 listed under **MCP Servers**.
+
+ ![Integrations page](/images/integrations/tembo/integrations-page.png)
+ </Step>
+ <Step title="Install Context7">
+ Click the **Install** button on the **Context7** card.
+ </Step>
+ <Step title="Verify Connection">
+ After installation, Context7 will appear under your **Installed** integrations.
+
+ ![Server connected](/images/integrations/tembo/server-connected.png)
+ </Step>
+</Steps>
+
+## How It Works
+
+Once connected, Tembo agents will query Context7 for relevant library documentation during tasks. This helps agents:
+
+- Generate correct implementations based on the latest API references
+- Identify deprecated patterns during automated code reviews
+- Produce PRs that follow current library best practices
+- Reduce back-and-forth by getting it right the first time