Bỏ qua để đến nội dung

Cursor, VS Code và các client khác

Mọi client MCP hỗ trợ transport Streamable HTTP đều có thể dùng Meetingize. Các client triển khai xác thực MCP (khám phá OAuth 2.1) kết nối chỉ với URL; các client khác có thể gửi khóa API Meetingize dưới dạng bearer token.

~/.cursor/mcp.json (mọi dự án) hoặc .cursor/mcp.json (một dự án):

{
"mcpServers": {
"meetingize": {
"url": "https://app.meetingize.com/api/mcp"
}
}
}

Cursor hiển thị nút Login cho máy chủ và mở màn hình đồng ý của Meetingize. Với khóa API:

{
"mcpServers": {
"meetingize": {
"url": "https://app.meetingize.com/api/mcp",
"headers": { "Authorization": "Bearer ${env:MEETINGIZE_API_KEY}" }
}
}
}

.vscode/mcp.json:

{
"servers": {
"meetingize": { "type": "http", "url": "https://app.meetingize.com/api/mcp" }
}
}

Inspector chính thức tiện để khám phá các công cụ:

Terminal window
npx @modelcontextprotocol/inspector

Chọn transport Streamable HTTP, URL https://app.meetingize.com/api/mcp, sau đó chạy quy trình OAuth từ inspector hoặc thêm header Authorization: Bearer mtgz_.... Chế độ dòng lệnh:

Terminal window
npx @modelcontextprotocol/inspector --cli https://app.meetingize.com/api/mcp --transport http \
--header "Authorization: Bearer $MEETINGIZE_API_KEY" --method tools/list
import asyncio, os
from mcp import ClientSession
from mcp.client.streamable_http import streamablehttp_client
async def main():
headers = {"Authorization": f"Bearer {os.environ['MEETINGIZE_API_KEY']}"}
async with streamablehttp_client("https://app.meetingize.com/api/mcp", headers=headers) as (read, write, _):
async with ClientSession(read, write) as session:
await session.initialize()
result = await session.call_tool("search_meetings", {"query": "budget", "limit": 5})
print(result.content[0].text)
asyncio.run(main())

Máy chủ không lưu trạng thái: không có session id, mỗi yêu cầu là một thông điệp JSON-RPC được gửi đến URL kèm một bearer token.

Terminal window
curl -s https://app.meetingize.com/api/mcp \
-H "Authorization: Bearer $MEETINGIZE_API_KEY" \
-H "Content-Type: application/json" -H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search_meetings","arguments":{"query":"budget"}}}'

Khi không có token, máy chủ trả lời 401 với một header WWW-Authenticate trỏ đến protected resource metadata của nó, đó là cách các client hỗ trợ OAuth biết cách đăng nhập. GET trên endpoint trả lời 405 (không có luồng do máy chủ khởi tạo).