XMPP MCP Server

A Model Context Protocol (MCP) server resource permitting MCP clients to access the federated XMPP network and send and receive messages, perform information queries and publish their presence. Before messages and queries can be made, the MCP client should first request the presence subscription of the contact to whom messages are queries should be sent.

MCP Server Interface

This MCP Server is accessible on this endpoint: https://lab.tagroot.io/MCP/Xmpp

Scopes supported:

The following subsections list MCP Server interfaces that are available on this resource. The MCP protocol is built on top of the JSON-RPC protocol. You find JSON-RPC interface below.

MCP Server Tools

Following subsections list MCP Server Tools that can be used to interact with the MCP Server.

Accept Presence Subscription

Accepts a presence subscription request from another user.

Properties
Can Modify: Yes
Can Destroy: No
Is Idempotent: No
Open World Access: Yes

AcceptPresenceSubscription(From)

Authentication
Required: Yes
Privileges Required: OAUTH.Scope.MCP.XMPP.Tools.Presence.Accept
Authentication Mechanisms: Bearer JWT (128+ bit Encryption), Basic (128+ bit Encryption), Digest-MD5 (128+ bit Encryption), Digest-SHA-256 (128+ bit Encryption), Digest-SHA-3-256 (128+ bit Encryption), Session
Arguments
Name Type Use Default Value Description
From String Required - Bare JID of the sender of the presence subscription request to accept.
Return Value
Type Description
GenericResponse Results of operation.

Add to Roster

Adds a contact to the roster of the XMPP account associated with the MCP Client.

Properties
Can Modify: Yes
Can Destroy: No
Is Idempotent: No
Open World Access: Yes

AddToRoster(BareJid, NickName, Groups)

Authentication
Required: Yes
Privileges Required: OAUTH.Scope.MCP.XMPP.Tools.Roster.Add
Authentication Mechanisms: Bearer JWT (128+ bit Encryption), Basic (128+ bit Encryption), Digest-MD5 (128+ bit Encryption), Digest-SHA-256 (128+ bit Encryption), Digest-SHA-3-256 (128+ bit Encryption), Session
Arguments
Name Type Use Default Value Description
BareJid String Required - Bare JID of the contact to add to roster.
NickName String Optional null Optional nick name of the contact to add to roster.
Groups Array of String Optional null Optional groups to which the contact should be added.
Return Value
Type Description
GenericResponse Results of operation.

Decline Presence Subscription

Declines a presence subscription request from another user.

Properties
Can Modify: Yes
Can Destroy: No
Is Idempotent: No
Open World Access: Yes

DeclinePresenceSubscription(From)

Authentication
Required: Yes
Privileges Required: OAUTH.Scope.MCP.XMPP.Tools.Presence.Decline
Authentication Mechanisms: Bearer JWT (128+ bit Encryption), Basic (128+ bit Encryption), Digest-MD5 (128+ bit Encryption), Digest-SHA-256 (128+ bit Encryption), Digest-SHA-3-256 (128+ bit Encryption), Session
Arguments
Name Type Use Default Value Description
From String Required - Bare JID of the sender of the presence subscription request to decline.
Return Value
Type Description
GenericResponse Results of operation.

Get Message

Gets a message that has been received over XMPP.

Properties
Can Modify: Yes
Can Destroy: Yes
Is Idempotent: No
Open World Access: Yes

GetMessage(MessageId, Remove)

Authentication
Required: Yes
Privileges Required: OAUTH.Scope.MCP.XMPP.Tools.Message.Get
Authentication Mechanisms: Bearer JWT (128+ bit Encryption), Basic (128+ bit Encryption), Digest-MD5 (128+ bit Encryption), Digest-SHA-256 (128+ bit Encryption), Digest-SHA-3-256 (128+ bit Encryption), Session
Arguments
Name Type Use Default Value Description
MessageId String Required - The ID of the message to retrieve. Can be the identifier itself, or the message resource URI.
Remove Boolean Optional false Determines if the message should be removed from the list of received messages or not.
Return Value
Type Description
MessageResponse Message, if found.

Pop Message

Gets the first message that has been received over XMPP, and then removes it from the resource list.

Properties
Can Modify: Yes
Can Destroy: Yes
Is Idempotent: No
Open World Access: Yes

PopMessage()

Authentication
Required: Yes
Privileges Required: OAUTH.Scope.MCP.XMPP.Tools.Message.Get
Authentication Mechanisms: Bearer JWT (128+ bit Encryption), Basic (128+ bit Encryption), Digest-MD5 (128+ bit Encryption), Digest-SHA-256 (128+ bit Encryption), Digest-SHA-3-256 (128+ bit Encryption), Session
Return Value
Type Description
MessageResponse Message, if found.

Remove from Roster

Removes a contact from the roster of the XMPP account associated with the MCP Client.

Properties
Can Modify: Yes
Can Destroy: Yes
Is Idempotent: No
Open World Access: Yes

RemoveFromRoster(BareJid)

Authentication
Required: Yes
Privileges Required: OAUTH.Scope.MCP.XMPP.Tools.Roster.Remove
Authentication Mechanisms: Bearer JWT (128+ bit Encryption), Basic (128+ bit Encryption), Digest-MD5 (128+ bit Encryption), Digest-SHA-256 (128+ bit Encryption), Digest-SHA-3-256 (128+ bit Encryption), Session
Arguments
Name Type Use Default Value Description
BareJid String Required - Bare JID of the contact to remove from roster.
Return Value
Type Description
GenericResponse Results of operation.

Request Presence Subscription

Requests a presence subscription to another user's presence.

Properties
Can Modify: Yes
Can Destroy: No
Is Idempotent: Yes
Open World Access: Yes

RequestPresenceSubscription(To)

Authentication
Required: Yes
Privileges Required: OAUTH.Scope.MCP.XMPP.Tools.Presence.Subscribe
Authentication Mechanisms: Bearer JWT (128+ bit Encryption), Basic (128+ bit Encryption), Digest-MD5 (128+ bit Encryption), Digest-SHA-256 (128+ bit Encryption), Digest-SHA-3-256 (128+ bit Encryption), Session
Arguments
Name Type Use Default Value Description
To String Required - Bare JID of the user to whom send a presence subscription request.
Return Value
Type Description
GenericResponse Results of operation.

Request Presence Unsubscription

Requests a presence unsubscription from another user's presence.

Properties
Can Modify: Yes
Can Destroy: Yes
Is Idempotent: Yes
Open World Access: Yes

RequestPresenceUnsubscription(To)

Authentication
Required: Yes
Privileges Required: OAUTH.Scope.MCP.XMPP.Tools.Presence.Unsubscribe
Authentication Mechanisms: Bearer JWT (128+ bit Encryption), Basic (128+ bit Encryption), Digest-MD5 (128+ bit Encryption), Digest-SHA-256 (128+ bit Encryption), Digest-SHA-3-256 (128+ bit Encryption), Session
Arguments
Name Type Use Default Value Description
To String Required - Bare JID of the user to whom send a presence subscription request.
Return Value
Type Description
GenericResponse Results of operation.

Send Chat Message

Sends a Chat Message to a recipient using XMPP.

Properties
Can Modify: Yes
Can Destroy: No
Is Idempotent: No
Open World Access: Yes

SendChatMessage(To, Message, IsMarkdown, Language)

Authentication
Required: Yes
Privileges Required: OAUTH.Scope.MCP.XMPP.Tools.Message.Send
Authentication Mechanisms: Bearer JWT (128+ bit Encryption), Basic (128+ bit Encryption), Digest-MD5 (128+ bit Encryption), Digest-SHA-256 (128+ bit Encryption), Digest-SHA-3-256 (128+ bit Encryption), Session
Arguments
Name Type Use Default Value Description
To String Required - Bare JID of the recipient of the message.
Message String Required - Message content. Can be either plain text, or Markdown.
IsMarkdown Boolean Optional false Indicates if the message is in Markdown format (true), or plain text (false).
Language String Optional null Optional ISO-639 code of language used in the message, if any.
Return Value
Type Description
GenericResponse Results of operation.

Update Roster Item

Updates a contact in the roster of the XMPP account associated with the MCP Client.

Properties
Can Modify: Yes
Can Destroy: Yes
Is Idempotent: Yes
Open World Access: Yes

UpdateRosterItem(BareJid, NickName, Groups)

Authentication
Required: Yes
Privileges Required: OAUTH.Scope.MCP.XMPP.Tools.Roster.Update
Authentication Mechanisms: Bearer JWT (128+ bit Encryption), Basic (128+ bit Encryption), Digest-MD5 (128+ bit Encryption), Digest-SHA-256 (128+ bit Encryption), Digest-SHA-3-256 (128+ bit Encryption), Session
Arguments
Name Type Use Default Value Description
BareJid String Required - Bare JID of the contact to update in roster.
NickName String Optional null Optional nick name of the contact to update in roster.
Groups Array of String Optional null Optional groups to which the contact should belong.
Return Value
Type Description
GenericResponse Results of operation.

MCP Server Resources

This MCP Server supports MCP Server Resources.

There are different types of resources published by the XMPP MCP Server. The type of resource is identified by the URI scheme of each resource.

The xmpp URI scheme represents a contact in the account-specific roster. Read the resource to gain information about what groups the contact belongs to, and the status of presence subscriptions, as well as nick names and last published presence information.

Note: Rosters are account-specific. When working with XMPP each MCP Client gets associated with an XMPP account. The roster belongs to the XMPP account. Different MCP Clients have their separate rosters. Resources can be shared between MCP clients however, as they only point to the different contacts. When different clients read the resources however, different responses are expected.

The mid URI scheme represents a message stanza that has been received. Read the resource, pop the message from the queue, and read it. Once the message has been read, it will be removed from the resource list. If the MCP client needs to store it, it can use file persistence to store the contents of the resource.

Note: Messages are not persisted by the MCP Server. It is the responsability of the MCP Client to read incoming messages and store them if necessary.

JSON-RPC Interface

This JSON-RPC Web Service is accessible on this endpoint: https://lab.tagroot.io/MCP/Xmpp

The following subsections list JSON-RPC methods that are available on this resource.

initialize(ProtocolVersion, Capabilities, ClientInfo)

MCP initialize method. Called by client to initialize connection and exchange information about capabilities.

Authentication
Required: No
Arguments
Name Type Use Default Value Description
ProtocolVersion String Required - Protocol Version
Capabilities Dictionary Required - Client capabilities
ClientInfo Dictionary Required - Client information
Return Value
Type Description
Dictionary Server capabilities and information.

notifications/initialized()

Notification that the client has completed its initialization.

Authentication
Required: No

prompts/get(Name, Arguments, _Meta)

Gets an MCP server prompt.

Authentication
Required: No
Arguments
Name Type Use Default Value Description
Name String Required - Name of the prompt to call.
Arguments Dictionary Required - Arguments for the prompt.
_Meta Object Optional null Associated meta-data, if available.
Return Value
Type Description
Dictionary Dictionary containing the prompt.

prompts/list(Cursor)

Lists available MCP server prompts.

Authentication
Required: No
Arguments
Name Type Use Default Value Description
Cursor String Optional null Cursor for pagination.
Return Value
Type Description
Dictionary Dictionary containing the list of prompts.

resources/list(Cursor)

Lists available MCP server resources.

Authentication
Required: Yes
Privileges Required: OAUTH.Scope.MCP.XMPP.Resources.List
Authentication Mechanisms: Bearer JWT (128+ bit Encryption), Basic (128+ bit Encryption), Digest-MD5 (128+ bit Encryption), Digest-SHA-256 (128+ bit Encryption), Digest-SHA-3-256 (128+ bit Encryption), Session
Arguments
Name Type Use Default Value Description
Cursor String Optional null
Return Value
Type Description
Dictionary

resources/read(Uri, _Meta)

Reads an MCP server resource.

Authentication
Required: Yes
Privileges Required: OAUTH.Scope.MCP.XMPP.Resources.Read
Authentication Mechanisms: Bearer JWT (128+ bit Encryption), Basic (128+ bit Encryption), Digest-MD5 (128+ bit Encryption), Digest-SHA-256 (128+ bit Encryption), Digest-SHA-3-256 (128+ bit Encryption), Session
Arguments
Name Type Use Default Value Description
Uri URI Required -
_Meta Object Optional null
Return Value
Type Description
Dictionary

resources/subscribe(Uri)

Subscribes to an MCP server resource.

Authentication
Required: Yes
Privileges Required: OAUTH.Scope.MCP.XMPP.Resources.List
Authentication Mechanisms: Bearer JWT (128+ bit Encryption), Basic (128+ bit Encryption), Digest-MD5 (128+ bit Encryption), Digest-SHA-256 (128+ bit Encryption), Digest-SHA-3-256 (128+ bit Encryption), Session
Arguments
Name Type Use Default Value Description
Uri URI Required -

resources/unsubscribe(Uri)

Unsubscribes from an MCP server resource.

Authentication
Required: Yes
Privileges Required: OAUTH.Scope.MCP.XMPP.Resources.List
Authentication Mechanisms: Bearer JWT (128+ bit Encryption), Basic (128+ bit Encryption), Digest-MD5 (128+ bit Encryption), Digest-SHA-256 (128+ bit Encryption), Digest-SHA-3-256 (128+ bit Encryption), Session
Arguments
Name Type Use Default Value Description
Uri URI Required -

tools/call(Name, Arguments, Task, _Meta)

Calls an MCP server tool.

Authentication
Required: No
Arguments
Name Type Use Default Value Description
Name String Required - Name of the tool to call.
Arguments Dictionary Required - Arguments for the tool.
Task Object Optional null

If specified, the caller is requesting task-augmented execution for this request. The request will return a CreateTaskResult immediately, and the actual result can be retrieved later via tasks/result.

Task augmentation is subject to capability negotiation - receivers MUST declare support for task augmentation of specific request types in their capabilities.

_Meta Object Optional null Associated meta-data, if available.
Return Value
Type Description
Dictionary Dictionary containing the result of the tool call.

tools/list(Cursor)

Lists available MCP server tools.

Authentication
Required: No
Arguments
Name Type Use Default Value Description
Cursor String Optional null Cursor for pagination.
Return Value
Type Description
Dictionary Dictionary containing the list of tools.

Types

This Web Service encodes named types as JSON dictionary objects. The following subsections list the named typed and their corresponding properties.

GenericResponse

Properties
Name Type Description
Success Boolean Indicates if the operation was successful.
Message String Message associated with the response.

MessageResponse

Properties
Name Type Description
Success Boolean Indicates if the operation was successful.
Message String Message associated with the response.
From String Full JID of sender of message.
FromBareJid String Bare JID of sender of message.
To String Full JID of recipient of message.
Body String Plain text body of message.
Type Nullable MessageType

Type of message. Possible values:

  • "Chat" - The message is sent in the context of a one-to-one chat session.
  • "Error" - The message is generated by an entity that experiences an error when processing a message
  • "GroupChat" - The message is sent in the context of a multi-user chat environment
  • "Headline" - The message provides an alert, a notification, or other transient information to which no reply is expected
  • "Normal" - The message is a standalone message whose purpose is defined by its XML contents.
Subject String Subject of message, if available.
ThreadID String Thread ID of message, if available.
ParentThreadID String Parent thread ID of message, if available.
ContentXml String XML content embedded in message, if available.
ErrorMessage Nullable Boolean If the message retrieved is an error message.
ErrorMessageCode Nullable 32-bit signed integer Error code of error message, if available. (∞,∞)
ErrorMessageType Nullable ErrorType

Error type of error message, if available. Possible values:

  • "None" - No error
  • "Auth" - Retry after providing credentials
  • "Cancel" - Do not retry (the error cannot be remedied)
  • "Continue" - Proceed (the condition was only a warning)
  • "Modify" - Retry after changing the data sent
  • "Wait" - Retry after waiting (the error is temporary)
  • "Undefined" - Undefined error type
ErrorMessageText String Error text of error message, if available.