Skip to content
Binary file added docs/showcase/img/1-open-settings-json.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/showcase/img/2-add-mcp-config.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/showcase/img/3-start-mcp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/showcase/img/4-started-mcp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/showcase/img/5-launch-chat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/showcase/img/6-select-agent.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/showcase/img/7-query-chat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/showcase/img/8-prompt-for-mcp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/showcase/img/9-mcp-response.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
105 changes: 105 additions & 0 deletions docs/showcase/mcp/ask-ai-to-ide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
---
title: Integrate BNBChain Ask AI into your IDE
---

# Quick‑Start Tutorial

Follow these steps to wire any IDE that supports the **Model Context Protocol (MCP)** to BNB Chain’s Ask AI knowledge base **and start querying documentation right away**.

> **Time required:** ≈ 2 minutes
> **Prerequisites:**
> • IDE with an MCP client (e.g. VS Code MCP extension, Cursor ≥ 0.23.0, JetBrains plugin)

---

## 1 Add the Ask AI MCP server

1. Open your IDE’s **Settings / Preferences** and find the **MCP** section.
2. Choose **Add MCP server** (wording may vary).
3. Paste the JSON block below and save.

```jsonc
{
"mcpServers": {
"bnbchain-askai-mcp": {
"url": "https://mcp.inkeep.com/bnbchainorg/mcp",
"id": "cm9qsf01p00bss6016ry68oil"
}
}
}
```

4. Reload the IDE window if the MCP client does not restart automatically.

A **Connected** status should now appear next to *bnbchain‑askai‑mcp*.

---

## 2 What the MCP can do

The Ask AI MCP lets you **query** BNB Chain’s public documentation corpus in natural language and receive the most relevant passages, with source links, inside your editor.
It is *read‑only* – no blockchain transactions are executed.

---

## 3 Run queries inside your IDE

Below are three common ways to interact with the Ask AI MCP once it is connected.

### 3.1 Chat Panels (Copilot, Cursor Chat, etc.)

1. Open your IDE’s AI/Chat pane (Copilot Chat, Cursor side‑chat, JetBrains AI Assistant…).
2. Locate the **agent / provider selector** at the top of the chat window.
3. Choose **bnbchain‑askai‑mcp**.
4. Ask questions in plain English – e.g. *“Summarise BEP‑20.”*

> **Want a detailed step-by-step walkthrough for VS Code?** Check out the companion guide: [Ask AI in VS Code](ask-ai-vs-code-guide.md) – complete with annotated screenshots.

### 3.2 Command Palette / Command Menu

| IDE | How to open | Steps |
| ------------- | ----------------------------------------------------------- | ------------------------------------------------------------------------------ |
| **VS Code** | <kbd>Ctrl/Cmd + Shift + P</kbd> | Type **“MCP: Run Query”** → pick **bnbchain‑askai‑mcp** → enter your question. |
| **Cursor** | <kbd>Cmd + K</kbd> (mac) or <kbd>Ctrl + K</kbd> (win/linux) | Select **Ask MCP…** → choose **bnbchain‑askai‑mcp** → ask away. |
| **JetBrains** | <kbd>Shift + Shift</kbd> then “MCP Query” | Pick **bnbchain‑askai‑mcp** and type a question. |

### 3.3 Terminal / cURL (optional)

For quick tests outside the IDE you can hit the endpoint directly:

```bash
curl -s -X POST \
-H "Content-Type: application/json" \
-d '{"query":"What is BEP‑20?"}' \
https://mcp.inkeep.com/bnbchainorg/mcp
```

You’ll receive a JSON response containing an `answer` field and `sources` array.

---

## 4 Example queries

```text
What is the gas limit on BSC blocks?

Summarise BEP‑336 in two sentences.

List all fee tiers supported by opBNB.

Explain the purpose of Greenfield buckets.
```

---

## 5 Troubleshooting

| Symptom | Fix |
| -------------------------- | ---------------------------------------------------------------- |
| **400/401 response codes** | Verify the JSON snippet (no trailing commas). |
| **Long latency (> 10 s)** | Disable any *Throttle Streaming* or similar setting in your IDE. |
| **No answer returned** | Make sure you chose **bnbchain‑askai‑mcp** and asked a question. |

Need more help? Ping us in **#ai‑tooling** on the BNB Chain Discord.

Open an issue in the [docs repo](https://github.com/bnb-chain/docs-site/issues) if your favourite editor is missing.
105 changes: 105 additions & 0 deletions docs/showcase/mcp/ask-ai-vs-code-guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
---
title: Ask AI in Visual Studio Code
---

Step‑by‑step walkthrough to query BNB Chain documentation from within VS Code using the Model Context Protocol (MCP).

## 1 Install the MCP Client extension

1. Open the **Extensions** view.
2. Search for **“MCP Client”** and hit **Install**.

![VS Code Extensions view with MCP Client selected](/docs/showcase/img/1-open-settings-json.png)

The extension adds MCP support to VS Code, letting you connect to external knowledge bases such as **BNB Chain Ask AI**.

---

## 2 Add the Ask AI server

1. Open **Settings** → **Preferences** → **Settings (JSON)**.
*Tip ▶* press <kbd>Ctrl/⌘ +,</kbd> then click the **`{}`** icon in the upper‑right corner.
2. Inside the JSON, locate (or create) the **`"mcpServers"`** section and paste the snippet below as a sibling property.

```jsonc
"mcpServers": {
"bnbchain-askai-mcp": {
"url": "https://mcp.inkeep.com/bnbchainorg/mcp",
"id": "cm9qsf01p00bss6016ry68oil"
}
}
```

![Settings JSON with the Ask AI block added](/docs/showcase/img/2-add-mcp-config.png)

3. Save the file. The MCP client should automatically reload; if not, restart the VS Code window.

---

## 3 Start the MCP server

Hover the new server block and click **▶ Start**.

![Start badge before connection](/docs/showcase/img/3-start-mcp.png)

When the badge flips to **✓ Running**, VS Code is now connected to **BNB Chain Ask AI**.

![Server block indicating ✓ Running](/docs/showcase/img/4-started-mcp.png)

---

## 4 Open the Chat panel

From the menu bar choose **View → Chat** or press <kbd>Ctrl + Alt + I</kbd>. A chat window docks to the side of the editor.

![Opening the Chat view from the View menu](/docs/showcase/img/5-launch-chat.png)

---

## 5 Pick the **bnbchain‑askai‑mcp** agent

At the bottom of the chat input you’ll find two dropdowns:

* **Mode** (Ask / Edit / Agent)
* **Provider** (list of LLMs & MCP servers)

Set **Mode** to **Agent**, then pick **bnbchain‑askai‑mcp** from the Provider list.

![Dropdown showing Agent selected and bnbchain-askai-mcp highlighted](/docs/showcase/img/6-select-agent.png)

---

## 6 Ask your first question

1. Type a natural‑language query such as:

```text
What is BNB Greenfield?
```

![Chat input with sample question typed](/docs/showcase/img/7-query-chat.png)

2. Press <kbd>Enter</kbd>. VS Code presents a confirmation card recommending the **bnbchain‑askai‑mcp** tool.

![Confirmation card asking to continue with the recommended MCP](/docs/showcase/img/8-prompt-for-mcp.png)

3. Click **Continue** (or just press <kbd>Enter</kbd> again). Ask AI streams back a concise answer plus source links you can click to jump to the original docs.

![Answer streamed in the chat panel](/docs/showcase/img/9-mcp-response.png)

---

## 7 Bonus: Command Palette quick‑queries

Prefer keyboard? Hit <kbd>Ctrl/⌘ + Shift + P</kbd>, run **“MCP: Run Query”**, choose **bnbchain‑askai‑mcp**, and enter your question.

This opens a transient results panel without leaving your current editor tab.

---

### Need help?

* Reach out on the BNB Chain Discord.
* File an issue in the [docs repo](https://github.com/bnb-chain/bnb-chain.github.io/issues).

Happy building! 🎉
2 changes: 2 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,8 @@ nav:
- Roadmap: ./bnb-greenfield/roadmap/roadmap.md
- Feature Lists: ./bnb-greenfield/roadmap/features.md
- Showcases:
- AI: ./showcase/mcp/index.md
- Integrating AskAI: ./showcase/mcp/ask-ai-to-ide.md
- Name Service and Attestation:
- Decentralized Identity: ./showcase/identity/did.md
- Decentralized Name Service:
Expand Down
Loading