Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions packages/mcp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ WORKDIR /app

# Install only production dependencies
COPY package.json ./
RUN npm install --production
RUN npm install --omit dev

# Copy built artifacts
COPY --from=builder /app/dist ./dist

# Expose no specific port since this is stdio MCP server
# Used for streamable HTTP transport
EXPOSE 3000

# Default command
CMD ["node", "dist/index.js"]
ENTRYPOINT ["node", "dist/index.js"]
13 changes: 13 additions & 0 deletions packages/mcp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,19 @@ The Sourcebot MCP server gives your LLM agents the ability to fetch code context
For a more detailed guide, checkout [the docs](https://docs.sourcebot.dev/docs/features/mcp-server).


## Transport

The server supports two transports, selected via the `--transport` CLI flag:

- **`stdio`** (default) – Standard input/output. Used when the MCP client spawns the server as a subprocess (e.g. Cursor, Claude Desktop).
- **`http`** – [Streamable HTTP](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports) over a single `/mcp` endpoint. Use this for remote or containerized deployments.

For HTTP transport:

- Run with `--transport http`.
- Optionally set the port with `--port <port>` (default: `3000`).
- Optionally set the host with `--host <address>` (default: `127.0.0.1`; use `0.0.0.0` for containerized deployments).

## Available Tools

### search_code
Expand Down
Loading