跳转到内容

Cursor、VS Code 及其他客户端

任何支持 Streamable HTTP 传输的 MCP 客户端都可以使用 Meetingize。实现了 MCP 授权(OAuth 2.1 发现)的客户端仅凭 URL 即可连接;其他客户端可以将 Meetingize API 密钥作为 bearer 令牌发送。

~/.cursor/mcp.json(所有项目)或 .cursor/mcp.json(单个项目):

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

Cursor 会为该服务器显示一个 Login 按钮,并打开 Meetingize 同意页面。使用 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 便于探索这些工具:

Terminal window
npx @modelcontextprotocol/inspector

选择传输方式 Streamable HTTP,URL 为 https://app.meetingize.com/api/mcp,然后可以在 inspector 中运行 OAuth 流程,或添加标头 Authorization: Bearer mtgz_...。命令行模式:

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())

该服务器是无状态的:没有会话 id,每个请求都是携带 bearer 令牌发送到该 URL 的 JSON-RPC 消息。

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"}}}'

没有令牌时,服务器会返回 401,并带有指向其 受保护资源元数据的 WWW-Authenticate 标头,支持 OAuth 的客户端正是据此发现如何登录。对该端点发送 GET 会返回 405(没有服务器发起的流)。