Assistants as MCP servers (agent tokens)
Any agent that speaks the Model Context Protocol can connect to one of your assistants and use what you allow — like a bot token, but for agents. Examples are Claude Code, Cursor, Claude Desktop, or your own agent. Every conversation the agent starts is an ordinary room in your app, so you can read along and step in.
Make a token
Open the assistant → Connect → New key → kind Agent (MCP), and choose what it may do:
| Permission | Tools the agent sees |
|---|---|
| Ask | ask (send a message, get the assistant's reply) and read_conversation |
| Its tools | each of the assistant's app tools, as app_<name> (called signed, exactly as the assistant would) |
These limits apply on top:
- The tool groups you switch off on the key (for example web search, or the app's tools) are off for the agent too.
- The key's per-minute limit applies.
- Revoking the key ends access at once.
The assistant still works with its own instructions, Library and models: the token never lends the agent your provider keys.
The token (vxm_…) is shown once. The Connect tab also shows the commands to set it up.
Connect
Claude Code:
claude mcp add --transport http support-vela https://cloud.vexyline.com/v1/mcp \
--header "Authorization: Bearer vxm_…"
claude mcp list # support-vela: connected
Any client that reads an mcpServers file (Claude Desktop, Cursor and others):
{
"mcpServers": {
"support-vela": {
"type": "http",
"url": "https://cloud.vexyline.com/v1/mcp",
"headers": { "Authorization": "Bearer vxm_…" }
}
}
}
The tools
ask:
- Input:
{ "message": "…", "conversation": "c_…" (optional) }. - It answers with the reply text and
structuredContent: { conversation, reply, seq }. - Pass
conversationback to continue the same thread. - If the assistant takes longer than about two minutes, or a person took over,
replyisnull; read it later withread_conversation.
read_conversation:
- Input:
{ "conversation": "c_…", "after": 0 }. - It returns the messages, oldest first:
user(the agent),assistant, andagent(a person from your team).
app_<name>: the input is the tool's own JSON Schema. Your server receives the usual signed call,
with conversation.id = agent:<key id> and no user, so your server knows it is an agent and not
a customer.
The protocol
- Streamable HTTP:
POST /v1/mcp, JSON-RPC 2.0, protocol version2025-06-18. - Methods:
initialize,tools/list,tools/call,ping. - Answers are plain JSON. There is no server-initiated stream, so
GETanswers 405. - Every request carries the bearer token, including
initialize. A wrong or revoked token gets401withWWW-Authenticate: Bearer.
curl -s https://cloud.vexyline.com/v1/mcp -H "Authorization: Bearer vxm_…" -H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | jq '.result.tools[].name'
Safety
- Give an agent Ask only, unless it really needs the assistant's tools.
- Make one token per agent or per person, so you can revoke one without the others.
- Agent conversations are rooms: anyone you share the server with sees them.