# Fern MCP

> Fern manages and expands your entire documentation ecosystem. Connect this MCP to let your agent chat with specific knowledge domains using AI completion, index new websites automatically, or pull user analytics. It's how you make sure your docs stay searchable and up-to-date for any employee.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Tags:** documentation, api-docs, ai-search, indexing, developer-experience

## Description

This connector lets your agent manage the life cycle of technical documentation. Instead of manually running separate jobs to check if content is indexed or if a feature is working, you simply tell your AI client what you need done. You can trigger new crawling jobs to include updated guides or instantly get answers from specific sections using advanced chat completion. Plus, it gives you insight into how users actually interact with the material by retrieving recent queries and providing secure access tokens for external applications. Because Vinkius hosts this MCP, your agent connects once and gains control over the entire documentation process, letting you manage everything from analytics to content publishing.

## Tools

### get_jwt
Generates a secure JSON Web Token (JWT) using your API key for authorized access.

### get_recent_queries
Retrieves analytics data, including the most recent questions asked by users against documentation domains.

### get_search_key
Provides Algolia search credentials needed to connect external applications to your content index.

### index_website
Initiates a new crawling job, making the entire specified website searchable for the Ask Fern AI assistant.

### post_chat_completion
Sends a question to the Ask Fern AI assistant and receives an answer based on your documentation content.

### whoami
Checks and reports the current user's authentication status and basic details.

## Prompt Examples

**Prompt:** 
```
Ask Fern: 'What is the rate limit?' for the domain 'docs.example.com'
```

**Response:** 
```
I've sent your question to Ask Fern for the 'docs.example.com' domain. The assistant responds: 'The current rate limit is 100 requests per minute for the free tier and 5000 for enterprise users.'
```

**Prompt:** 
```
Start indexing the website https://docs.example.com for the 'main' domain.
```

**Response:** 
```
I've triggered a new indexing job for 'https://docs.example.com' under the 'main' domain. You can check the status in your Fern dashboard.
```

**Prompt:** 
```
Show me the recent queries for the 'api-docs' domain.
```

**Response:** 
```
Retrieving analytics for 'api-docs'... Recent questions include: 'How to use webhooks?', 'Authentication error 401', and 'SDK installation guide'.
```

## Capabilities

### Chatting with Knowledge Bases
Your agent answers complex questions by querying specific, defined sections of your documentation.

### Updating Documentation Indexing
You trigger new crawling jobs to make entire websites or directories searchable for the AI assistant.

### Checking User Status
Your agent verifies a user's current authentication status and basic profile details.

### Retrieving Usage Analytics
You pull reports showing what questions users have asked recently, helping you spot content gaps.

### Generating Secure Access Keys
The MCP creates necessary JWTs and Algolia search credentials for secure application access.

## Use Cases

### New guides were just published and nobody can find them.
A Technical Writer needs to make sure a whole new section of API docs is searchable immediately. Instead of waiting for a nightly crawl, they use their agent to run `index_website` on the new subdirectory, ensuring instant visibility.

### Support tickets are piling up because users can't figure out basic setup.
A Product Manager wants to find the top three confusing topics. They use their agent to call `get_recent_queries`, immediately getting a list of common failures, allowing them to write preventative content.

### An external partner application needs read-only access to API docs.
A Developer uses the MCP to execute `get_jwt` and `get_search_key`. This securely provides credentials that only work for the specific documentation scope, keeping user data protected.

### The team needs an instant answer about a niche configuration setting.
A Support Engineer asks their agent to run `post_chat_completion` with a complex question. The tool queries the correct domain and returns an accurate, sourced answer immediately.

## Benefits

- You stop guessing if content is indexed. Use the `index_website` tool to force a full crawl, guaranteeing new guides are immediately available for search and AI querying.
- Instead of manually checking logs or dashboards for user questions, you run `get_recent_queries`. This gives instant visibility into pain points—the exact topics your users need help with right now.
- The `post_chat_completion` tool allows agents to answer complex support questions by reading across multiple documentation domains in one go. It makes 'Ask Fern' a true knowledge expert.
- You gain control over security and access using `get_jwt` and `get_search_key`. This lets you programmatically manage who sees what, which is critical for enterprise applications.
- The `whoami` tool verifies user permissions on demand. You can build workflows that check authentication before letting the agent touch sensitive documentation sections.

## How It Works

The bottom line is you control complex, multi-step documentation operations using simple commands from your favorite AI client.

1. Subscribe to this MCP on Vinkius, providing your unique Fern API Key and required tokens.
2. Your agent authenticates with the connection details and confirms it can run documentation management tasks.
3. You invoke a tool through your preferred AI client to perform actions like indexing or chatting.

## Frequently Asked Questions

**How do I use the Fern MCP to make sure my new website content is searchable?**
You run the `index_website` tool through your agent, specifying the full URL you want indexed. The system handles triggering the crawl and updating the search index for AI access.

**What data does get_recent_queries provide about my users?**
This tool pulls raw analytics showing a list of recent questions asked by your user base, allowing you to identify gaps in your documentation or confusing topics immediately.

**Can I use the Fern MCP for secure application integration?**
Yes. You can execute `get_jwt` and `get_search_key`. These tools generate the necessary access tokens and Algolia keys needed to connect external applications securely.

**How does post_chat_completion work with different knowledge sections?**
You simply instruct your agent via the tool prompt, specifying which documentation domains it should use. The assistant then synthesizes a single answer from all provided contexts.

**Is whoami useful for verifying my API client's status?**
Yes. Running `whoami` checks your current authentication status and user details, which is useful for building internal workflows that require identity validation before running other tools.