---
name: azion-search-azion-docs-with-the-mcp-server
description: >-
  Ask a coding agent connected to the Azion docs MCP server to search the Azion documentation, code samples, CLI commands, and Terraform provider docs.
---

# Search Azion docs with the MCP server

You can search the Azion documentation, Azion code samples, and the references of the [Azion CLI](/en/documentation/devtools/cli/) and the [Azion Terraform Provider](/en/documentation/devtools/terraform/) by asking a coding agent connected to the docs server of the [Azion MCP servers](/en/documentation/devtools/mcp/). The docs server has one search tool per source, and each tool returns the documents closest to your question. For the inputs of every tool, refer to [Tools and resources](/en/documentation/devtools/mcp/tools/).

---

## Prerequisites

- A coding agent connected to the docs server, `https://docs-mcp.azion.com/mcp`. To connect one, refer to [MCP server quickstart](/en/documentation/devtools/mcp/quickstart/).

---

## Search with your agent

Each search tool reads one source. The table pairs four of them with a question each one answers and the kind of document it returns. For the tool that searches the Azion API reference, refer to [Tools and resources](/en/documentation/devtools/mcp/tools/#docs-server-tools).

| Question                               | Tool                         | Documents it returns                          |
| -------------------------------------- | ---------------------------- | --------------------------------------------- |
| "How do I configure DDoS protection?"  | `search_azion_docs_and_site` | Pages of the Azion documentation and website  |
| "Show me Next.js deployment examples"  | `search_azion_code_samples`  | Code samples and code libraries               |
| "What CLI commands manage functions?"  | `search_azion_cli_commands`  | References of the Azion CLI commands          |
| "How do I create Terraform resources?" | `search_azion_terraform`     | Documentation of the Azion Terraform Provider |

To search with your agent:

1. **Ask your agent a question**

   Name the product and the task in the question, as the questions in the table do.

2. **Read the documents the tool returns**

   The tool returns one text item that holds a JSON object with a `results` array of documents. Each document carries `title`, `content`, and `source`, which names the page or file the document comes from, plus the `similarity`, `search_type`, and `relevance_score` of the match.

3. **(Optional) Set the number of documents**

   A search tool returns five documents by default. To get a different number, ask the agent to set `docsAmount`.

Your agent has the documents closest to the question, and the `source` of each one points to the full page or file. If the documents do not match the question, refer to [A search returns documents that do not match the query](/en/documentation/devtools/mcp/troubleshooting/#a-search-returns-documents-that-do-not-match-the-query).

---

## Get relevant results

Four practices help the search tools return the documents you need:

- **Be specific**: give context about your project type and your requirements.
- **Refine the question**: start with a simple question and add detail gradually.
- **Combine tools**: use several MCP tools together to complete a task.
- **Save what works**: keep the configurations that work, and reuse them.

---

## Next steps

- [Tools and resources](/en/documentation/devtools/mcp/tools.md): The inputs of every search tool and the fields of each document it returns.
- [Troubleshoot the MCP server](/en/documentation/devtools/mcp/troubleshooting.md): What to check when a search returns documents that do not match the query.
- [Create Rules Engine rules with the MCP server](/en/documentation/guides/application-development/getting-started/generate-rules-engine-rules-with-mcp.md): Preview a rule with dry\_run through the build server, then create it in your application.
- [Generate GraphQL queries with the MCP server](/en/documentation/guides/platform/observability/generate-graphql-queries-with-mcp.md): Ask your agent for a query that reads the metrics or events of your account.
