MCP Server
MCP provides an easy way to integrate SerenityGPT functionality within MCP clients such as Cursor, VS Code, or your own MCP client.
This page shows how to run SerenityGPT’s MCP server and connect an MCP-capable client. After setup, you’ll have Serenity tools available directly in your MCP client.
Currently, the serenity_docs_answer
tool is exposed via MCP.
Prerequisites
- A running SerenityGPT backend.
- Docker/Docker Compose on the host where you’ll run the MCP server.
- An MCP client.
Start the MCP server
Add the following lines to your docker-compose.yaml
:
mcp-server:
<<: *common
container_name: mcp-server
command: python manage.py run_mcp_server --host HOST --port PORT --sse-path /mcp/
Parameters
--host
— Interface to bind on (e.g.,0.0.0.0
to accept remote connections, or127.0.0.1
for local only).--port
— Port for the MCP server (e.g.,8765
).--sse-path
— Path where the SSE endpoint is served (default shown:/mcp/
).
Example minimal overrides
Start (or restart) Compose:
Point your client to the MCP server
Cursor (example)
In Cursor go to Settings → Tools & Integrations, click New MCP Server, and paste:
{
"mcpServers": {
"sse-server-askme": {
"url": "HOST:PORT/mcp/",
"transport": "sse",
"headers": {
"Authorization": "Bearer SERENITY_TOKEN_FOR_THE_RELEVANT_TENANT"
}
}
}
}
Replace:
HOST:PORT
with your MCP server host/port (e.g.,http://localhost:8765
orhttps://mcp.example.com
depending on your setup/client requirements).SERENITY_TOKEN_FOR_THE_RELEVANT_TENANT
with your actual Serenity tenant token.
Use the Serenity tools
Once connected, Serenity tools become available in your client.
Currently only the serenity_docs_answer
tool is available.
You can invoke the tools by prefacing your question with:
Example
ask serenity: Show me the docs for connecting Confluence and how to restrict access by space.