Context7 Extension
Watch the demo
This tutorial covers how to add the Context7 MCP Server as a Goose extension to pull up-to-date, version-specific code and docs so Goose can vibe code with real context, not hallucinated or outdated answers.
- Goose Desktop
- Goose CLI
Command
npx -y @upstash/context7-mcp
Configuration
Note that you'll need Node.js installed on your system to run this command, as it uses npx
.
- Goose Desktop
- Goose CLI
- Launch the installer
- Press
Yes
to confirm the installation - Click
Save Configuration
- Scroll to the top and click
Exit
from the upper left corner
- Run the
configure
command:
goose configure
- Choose to add a
Command-line Extension
.
┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension (Connect to a new extension)
│
◆ What type of extension would you like to add?
│ ○ Built-in Extension
│ ● Command-line Extension (Run a local command or script)
│ ○ Remote Extension
└
- Give your extension a name.
┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension (Connect to a new extension)
│
◇ What type of extension would you like to add?
│ Command-line Extension
◆ What would you like to call this extension?
│ context7
└
- Enter the command to run when this extension is used.
┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension (Connect to a new extension)
│
◇ What type of extension would you like to add?
│ Command-line Extension
│
◇ What would you like to call this extension?
│ context7
│
◆ What command should be run?
│ npx -y @upstash/context7-mcp
└
- Enter the number of seconds Goose should wait for actions to complete before timing out. Default is
300
seconds.
┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension (Connect to a new extension)
│
◇ What type of extension would you like to add?
│ Command-line Extension
│
◇ What would you like to call this extension?
│ context7
│
◇ What command should be run?
│ npx -y @upstash/context7-mcp
│
◆ Please set the timeout for this tool (in secs):
│ 300
└
- Choose to add a description. If you select
Yes
, you’ll be prompted to enter a description for the extension.
┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension (Connect to a new extension)
│
◇ What type of extension would you like to add?
│ Command-line Extension
│
◇ What would you like to call this extension?
│ context7
│
◇ What command should be run?
│ npx -y @upstash/context7-mcp
│
◇ Please set the timeout for this tool (in secs):
│ 300
│
◆ Would you like to add a description?
│ No
└
- Choose No when asked to add environment variables
┌ goose-configure
│
◇ What would you like to configure?
│ Add Extension (Connect to a new extension)
│
◇ What type of extension would you like to add?
│ Command-line Extension
│
◇ What would you like to call this extension?
│ context7
│
◇ What command should be run?
│ npx -y @upstash/context7-mcp
│
◇ Please set the timeout for this tool (in secs):
│ 300
│
◇ Would you like to add a description?
│ No
│
◆ Would you like to add environment variables?
│ No
└ Added context7 extension
Example Usage
In this example, Goose uses Context7 to pull real-time docs, compare tools, and scaffold a modern app using only the latest, official implementation patterns.
- Goose Desktop
- Goose CLI
- Open a new session in Goose Desktop
- Open a terminal and start a new Goose session:
goose session
Goose Prompt
I need help building a modern web application. Could you:
- Use Context7 to analyze and compare:
- Next.js App Router vs Pages Router
- Prisma vs other ORMs
- Different authentication approaches
- State management solutions
- For each technology chosen:
- Show the latest official implementation patterns
- Provide type definitions and interfaces
- Share relevant code snippets from documentation
- Explain best practices and common pitfalls
- Help implement:
- Project structure following official guidelines
- Database schema and type safety
- Authentication flow with proper security
- API routes with error handling
- Performance optimizations
Please reference specific documentation sections and explain why certain approaches are recommended over others.
Goose Output
- Technology Analysis Next.js App Router vs Pages Router First, let's get the latest Next.js documentation:
-------- Resolve-library-id -------
Let's get detailed documentation about Next.js, focusing on routing:
------ Get-library-docs ---------
Let me analyze the Next.js documentation and break down the key differences between the App Router and Pages Router:
------ code structure comparison -----
Let's get information about Prisma and other ORMs:
------- Resolve-library-id ----------
Let's get Prisma's documentation:
------ Get-library-docs ----------
Key Decisions and Best Practices:
- App Router vs Pages Router:
Chose App Router for: Server Components by default (better performance) Built-in data fetching with streaming Simpler API routes with Route Handlers Better TypeScript integration
- Prisma as ORM:
Benefits: Type-safe database queries Auto-generated client Schema migrations Rich query API Using Prisma Accelerate for better performance
- Authentication:
NextAuth.js for: Built-in security features Multiple authentication providers Session management JWT handling
- Performance Optimizations:
Server Components for reduced JavaScript Route Handlers for API endpoints Prisma Accelerate for database performance Type safety across the stack
Would you like me to explain any part in more detail or help you implement specific features?