Connecting via MCP (Model Context Protocol)
Unishift ships a built-in Model Context Protocol (MCP) server as part of the API Gateway. The server lets external AI assistants and development environments (Cursor, Claude Desktop, Claude Code, Windsurf, VS Code) connect directly to the platform microservices.
Connection uses a Personal Access Token. All requests run strictly in the context of the user's permissions (available spaces, documents, tasks, commands) and are recorded in the audit log.
1. Getting a user token
A personal Bearer token is used to connect an MCP client securely.
Via the Unishift web UI
- Open the Unishift web client.
- In the top-right corner click the profile avatar and go to User settings.
- In the side menu open the API keys section (access tokens).
- Click Create token.
- Fill in the parameters:
- Name: a readable client name (for example,
Cursor IDE,Claude Desktop Workstation). - Note (optional): purpose or host.
- Expiration (TTL): pick an interval (7 days, 30 days, 90 days, 1 year).
- Name: a readable client name (for example,
- Click Create and copy the generated token.
The token is shown once
Save the copied value immediately. For security, the full key is never shown again in plain text.
Via the API
A token can also be issued programmatically:
curl -X POST http://localhost:8090/api/v1/auth/tokens \
-H "Authorization: Bearer <SESSION_OR_ADMIN_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"name": "Cursor IDE Token",
"note": "MCP integration",
"ttl_seconds": 2592000
}'The response returns the created JWT in the data.token field.
2. MCP endpoints and transports
The Gateway provides several transports:
| Transport | URL / Endpoint | Purpose |
|---|---|---|
| Streamable HTTP (recommended) | http://localhost:8090/mcp | Cursor IDE, modern MCP clients with HTTP support |
| Server-Sent Events (SSE) | http://localhost:8090/mcp/sse | SSE-capable clients (messages: POST /mcp/messages) |
| Stdio (CLI) | gateway mcp | Local CLI transport over standard input/output |
Ports in Docker
When the stack runs via Docker Compose, replace port 8090 with 18090 (or the external port of your installation domain: https://unishift.your-domain.com/mcp).
3. Client configuration
Cursor IDE
Add the configuration to .cursor/mcp.json in the project root or in the global Cursor settings file:
{
"mcpServers": {
"unishift": {
"url": "http://localhost:8090/mcp",
"headers": {
"Authorization": "Bearer <YOUR_USER_TOKEN>"
}
}
}
}To use the SSE transport, point to the /mcp/sse endpoint:
{
"mcpServers": {
"unishift-sse": {
"url": "http://localhost:8090/mcp/sse",
"headers": {
"Authorization": "Bearer <YOUR_USER_TOKEN>"
}
}
}
}Claude Desktop
In the claude_desktop_config.json file:
{
"mcpServers": {
"unishift": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"http://localhost:8090/mcp",
"--header",
"Authorization: Bearer <YOUR_USER_TOKEN>"
]
}
}
}Claude Code CLI
To connect from the Claude Code terminal:
claude mcp add unishift http://localhost:8090/mcp --header "Authorization: Bearer <YOUR_USER_TOKEN>"4. Available tools
After connecting, an AI agent gets access to the platform toolset:
rag_search
Semantic and full-text search over the corporate RAG knowledge base (documents, guidelines, notes, technical specifications, task context) with filtering by space or across all spaces available to the user.
- Input parameters:
query(string, required): search query or question (task keys are supported, e.g.PA-123).space_id(string, optional): space identifier (UUID,space-<uuid>or a human-readable name such asBackendorCore Team). If omitted — the search covers all spaces the user has access to.scopes(array of strings, optional): exact list of RAG scopes (e.g.["space-c1f7b889-..."]). When passed, overridesspace_id.limit(integer, optional): maximum number of fragments (default5, max20).token(string, optional): explicit Bearer token (for clients running over the stdio transport without an HTTP Authorization header).
- Result: a list of relevant text fragments with the source name (
Source: "...") and metadata.
list_spaces
Returns all workspaces the current user has access to (including id, name, description and a ready RAG scope identifier).
- Input parameters:
query(string, optional): filter spaces by name or id substring.
- Result: an array of spaces with
id,name,description,scope(space-<uuid>).
list_services
Returns the registered platform microservices, their base URLs and health probe statuses.
- Input parameters:
check_health(boolean, optional): whether to poll live health probes.
- Returned services:
spaces,documents,task-tracker,command-manager,storage,flow-manager,scheduler,env-manager,spark-grid,ai-router,notifications, etc.
get_service_api
Fetches the current OpenAPI / Swagger specification of a chosen service directly from the running instance.
- Input parameters:
service_name(string, required): the service name (e.g.task-tracker,documents,spaces).filter(string, optional): filter paths by substring (e.g.tasks,export,search).
- Result: the list of available routes, parameter schemas and request/response bodies. Lets the model adapt dynamically to the current API version without hardcoded contracts.
call_service_api
Performs a real HTTP request (GET, POST, PUT, DELETE, PATCH) to any platform service through the Gateway.
- Input parameters:
service_name(string, required): the target microservice.method(string, required):GET,POST,PUT,DELETE,PATCH.path(string, required): the method path starting with/(e.g./api/v1/spaces).query_params(object, optional): URL query parameters.headers(object, optional): extra headers (e.g.X-Space-ID).body(any, optional): the JSON request body.
5. Practical use cases
Connecting Unishift via MCP turns the agent inside an IDE into a full participant of the team's workflows.
Case 1: Working with tracker tasks right in the codebase
A developer works on a feature in the IDE and phrases the request:
"Look at the description of task TASK-428 in Unishift, implement the required validations in the controller and move the task to Review with a comment linking the changed files."
What the AI agent does:
- Calls
call_service_api(GET /api/v1/tasks/...ontask-tracker) and receives the full task description, acceptance criteria and the comment thread. - Studies the codebase, writes the required code and tests.
- Calls
call_service_api(PATCH /api/v1/tasks/:id), sets the status toIn Review, and adds a comment listing the affected files and how to verify them.
Case 2: Finding guidelines and syncing documentation (RAG & Documents)
"Find the API versioning rules in the Backend space knowledge base and create a new page describing our payments service."
What the AI agent does:
- Calls
rag_searchwith{"query": "API versioning rules", "space_id": "Backend"}and gets exact excerpts from architecture guidelines (ADRs) and company standards with cited sources. - Designs the documentation according to the found standards.
- Saves the finished article directly into the knowledge base section via
call_service_api(POST /api/v1/documents).
Case 3: Running and checking commands on isolated runners (Command Manager)
"Run a test migration pass for the billing service on the dev runner and show the output."
What the AI agent does:
- Queries the list of registered commands in
command-managerviacall_service_api. - Starts the command execution on a runner (
POST /api/v1/executions). - Reads the execution logs and summarizes whether the migration succeeded — without opening a terminal or configuring SSH access.
Case 4: Triggering end-to-end automation pipelines (Flow Manager)
"Launch the test-stand build pipeline after the latest commits."
What the AI agent does:
- Finds the required graph in
flow-manager. - Starts the flow execution with the branch's input parameters.
- Tracks node completion and reports the result.
Case 5: Safe environment audit (Env Manager)
"Check whether the backend-services space defines keys for S3 and NATS."
What the AI agent does:
- Queries the key registry in
env-managerfor the project workspace. - Verifies the required variables without exposing the secret values themselves.
Case 6: End-to-end release preparation
"Collect all ready tasks from the tracker for release 2.4.0, compose the release notes, save them to the documentation and notify the team chat."
What the AI agent does:
- Queries tasks with the
Ready for Releasestatus intask-tracker. - Builds a structured change list (Features, Fixes, Breaking Changes).
- Creates a page in
documentsunderReleases / 2.4.0. - Sends a notification with the link via the
notificationsservice.
6. Security and audit
- Least privilege: the token is limited by the user's role (
admin/user) and the spaces available to them. - Action audit: every
call_service_apicall leaves an event in the system logs and NATS with the user id (X-User-ID), IP address and the affected resource. - Instant revocation: if a token is suspected compromised, it can be revoked immediately in the web UI under API keys, without resetting the main password.