Skip to main content

Module mcp

Module mcp 

Source
Expand description

Model Context Protocol server: lets an engineer’s AI assistant (Claude Code, Claude Desktop, any MCP client) work with the PDM data.

Transport: Streamable HTTP without server-sent events – POST /api/v1/mcp with one JSON-RPC 2.0 message (or a batch) answers with application/json; notifications get 202 Accepted. The server is stateless: no session id, every request carries the bearer token of the user (a personal access token), so every tool runs with that user’s rights through the same services::* functions as the REST API. teamcraft mcp (see main.rs) bridges stdio clients to this endpoint.

Tools are read-mostly (search, structure, changes, change requests, simulations, worklist, analyses). The few writes only prepare work – a draft change order, a new change request, a comment – and never submit, approve, release, triage or decide: those decisions stay with people.

Modules§

tools
The MCP tools and prompts of TeamCraft.

Enums§

Message
What a single JSON-RPC message asks for.

Constants§

INSTRUCTIONS
Told to every client at initialize.
LOCAL_AGENTS_OFF
Told to a local agent the desktop app started (marked with LOCAL_AGENT_HEADER) when TEAMCRAFT_LOCAL_AGENTS=off.
MCP_OFF
Told to every other MCP client when TEAMCRAFT_LOCAL_AGENTS=off.
PROTOCOL_VERSION
Newest protocol revision spoken; offered when a client asks for another.
SUPPORTED_VERSIONS

Functions§

classify
Classifies one message (pure, no I/O).
handle
One JSON-RPC message in, at most one out (notifications get none). log is the request for the read log (channel MCP).
http
POST /api/v1/mcp.
http_get
GET /api/v1/mcp: this server opens no event stream.
local_agent_refusal
Why a call must be refused under the local-agent policy, None = serve it.
negotiate
The protocol revision answered to the one a client asks for.