---
title: "Connecting AI agents over MCP"
url: https://phatdev.net/en/docs/phatdev-portfolio/mcp
lang: en
updated: 2026-10-21
alternate:
  vi: https://phatdev.net/docs/phatdev-portfolio/mcp
markdown: https://phatdev.net/en/docs/phatdev-portfolio/mcp.md
---

# Connecting AI agents over MCP

Part of the doc set: [phatdev.net](https://phatdev.net/en/docs/phatdev-portfolio.md)

> The /api/mcp endpoint, 12 tools, the Server Card, Markdown (.md) versions, WebMCP and how to connect.

## Endpoint
`https://phatdev.net/api/mcp` follows the **Model Context Protocol** standard, using the stateless **Streamable HTTP** transport: send JSON-RPC 2.0 with POST and receive `application/json`. It is read-only, needs no key, and is limited to 120 requests per minute per IP (adjustable in the admin). Call GET to see a short description of the server.

## Tools
Every tool is read-only (`readOnlyHint`) and returns only content already public on phatdev.net. An administrator can switch individual tools off.

| Tool | Parameters | Returns |
|---|---|---|
| `search_site` | `query`, `lang`, `type`, `limit` | A combined search across projects, blog and docs: url, Markdown link and an excerpt |
| `get_page` | `url` | The Markdown of one phatdev.net page (other hosts are blocked) |
| `get_profile` | `lang` | Profile, role, contact channels |
| `list_skills` | `lang` | Skills by group with the projects that used them |
| `get_contact` | `lang` | Public contact channels (email, phone, Telegram, Zalo, GitHub, LinkedIn, Facebook) and working hours 12:00-02:00 (Vietnam time) |
| `list_projects` | `lang` | The project list, slugs and links |
| `get_project` | `slug`, `lang` | A project analysis article (Markdown) |
| `list_posts` | `lang`, `category`, `query`, `limit` | The list of bilingual blog posts |
| `get_post` | `slug`, `lang` | The blog post content (Markdown) with its references |
| `list_docs` | `plugin` (optional), `lang` | The list of plugins or documentation articles; `lang=en` lists only articles that have an English version (urls point to `/en/docs`) |
| `get_doc` | `plugin`, `slug`, `lang` | The content of a documentation article; `lang=en` returns the English version and reports an error for an untranslated article (use `lang=vi`) |
| `search_docs` | `query`, `plugin`, `lang` | Search results within the documentation; `lang=en` searches only the translated articles |

The `lang` parameter accepts `vi` (the default) or `en`. For `search_site` alone, leaving `lang` empty searches both Vietnamese and English.

On `initialize`, the server also returns an `instructions` field that guides the agent: search with `search_site`, read a whole page with `get_page`, and introduce the owner with `get_profile`, `list_skills` and `get_contact`.

## Adding it to Claude / an MCP client
For a client that supports MCP over HTTP, declare a remote-type server pointing at the URL above, for example:

```json
{
  "mcpServers": {
    "phatdev": { "type": "http", "url": "https://phatdev.net/api/mcp" }
  }
}
```

## Trying it with curl
```bash
curl -s https://phatdev.net/api/mcp \
  -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search_site","arguments":{"query":"recovery point"}}}'
```

## Server discovery (Server Card)
So that clients can find the endpoint without manual configuration, the site publishes a Server Card following MCP's SEP-2127 proposal (a new standard that may change):

- `https://phatdev.net/api/mcp/server-card` (recommended location: the endpoint address + `/server-card`)
- `https://phatdev.net/.well-known/mcp/server-card.json` and `https://phatdev.net/.well-known/mcp-server-card` (same content, for older clients)
- `https://phatdev.net/.well-known/ai-catalog.json` (a domain-level catalog pointing to the Server Card)
- `https://phatdev.net/.well-known/mcp` (a manifest listing endpoints, a proposed format that is not yet a standard)

The card records the server name, version, the `streamable-http` endpoint and the supported protocol versions; phatdev.net's extra information (authentication: none, the tool list) is in `_meta`. The `/vi`, `/en`, `/llms.txt` and `/api/mcp` pages also send the header `Link: <https://phatdev.net/api/mcp/server-card>; rel="mcp-server-card"` (the site's own proposed signaling method, not in the spec).

## Markdown version of each page
Every content page has a clean Markdown version (with front-matter: title, original URL, language, updated date, link to the other-language version):

- Add `.md` to the URL: `https://phatdev.net/vi.md`, `/en.md`, `/vi/projects.md`, `/vi/projects/<slug>.md`, `/vi/blog.md`, `/vi/blog/<slug>.md`, `/docs.md`, `/docs/<plugin>/<slug>.md`, `/en/docs/<plugin>/<slug>.md` (translated articles only), `/sl-migrations.md`.
- Or send the header `Accept: text/markdown` to a regular page URL: the server returns Markdown instead of HTML.
- `https://phatdev.net/llms.txt` is the index for agents; all public content is combined by language in two files: `https://phatdev.net/llms-full-vi.txt` (Vietnamese) and `https://phatdev.net/llms-full-en.txt` (English, with only the translated documentation articles), each holding the profile, projects, blog and documentation of that language. `https://phatdev.net/llms-full.txt` is a short index that points to these two files.

A `.md` response carries the header `Link: <HTML page URL>; rel="canonical"`, so Google consolidates it into the original page. `.md` downloads are not counted in viewer statistics and are recorded only in the API figures.

## WebMCP (agents browsing in the browser)
If the agent's browser supports WebMCP (an experimental feature: Chrome 149 has an origin trial, or enable the flag `chrome://flags/#enable-webmcp-testing`), each page registers tools through `document.modelContext` so the agent can act directly on the page:

| Tool | What it does | Read-only |
|---|---|---|
| `search_site` | Search projects, blog, docs | Yes |
| `get_current_page_markdown` | Get the Markdown of the page that is open | Yes |
| `list_posts` | List blog posts | Yes |
| `open_page` | Go to another page on the site (/admin and /api are blocked) | No |
| `set_language` | Switch language vi/en | No |
| `set_theme` | Switch light/dark appearance | No |
| `prefill_contact_form` | Opens the multi-step project request form and pre-fills the work type, product type, features, AI options, budget, timeline, description and contact details | No |

`prefill_contact_form` only opens the (multi-step) project request form on the page and pre-fills the fields you pass; any field you don't pass is left empty for the user to choose. The user must review it and click Submit themselves. No tool sends messages or writes data on the user's behalf. A browser without WebMCP support loads nothing extra.

## Notes
- Send `initialize` first if the client requires it; the server supports protocol versions 2025-06-18, 2025-03-26 and 2024-11-05.
- GET with `Accept: text/event-stream` returns 405 because the server does not open an SSE stream.
