Skip to content

Commit 4bda069

Browse files
chore(internal): configure MCP Server hosting
1 parent 19ac828 commit 4bda069

File tree

5 files changed

+143
-6
lines changed

5 files changed

+143
-6
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 176
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-4ecc06edca2cfad4eaf11573611e89823fda5f56370bac5cd02a498a6b277d09.yml
33
openapi_spec_hash: 8f4a30bec4348cbde85b1e65bef9189a
4-
config_hash: 751a4cc75aa0276b40cc2c7879b24dea
4+
config_hash: 654d63a7fa4221244d9fcb292c5bd581

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ The REST API documentation can be found on [docs.lithic.com](https://docs.lithic
1010

1111
Use the Lithic MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.
1212

13-
[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=lithic-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsImxpdGhpYy1tY3AiXX0)
14-
[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22lithic-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22lithic-mcp%22%5D%7D)
13+
[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=lithic-mcp&config=eyJuYW1lIjoibGl0aGljLW1jcCIsInRyYW5zcG9ydCI6InNzZSIsInVybCI6Imh0dHBzOi8vbGl0aGljLnN0bG1jcC5jb20vc3NlIn0)
14+
[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22lithic-mcp%22%2C%22type%22%3A%22sse%22%2C%22url%22%3A%22https%3A%2F%2Flithic.stlmcp.com%2Fsse%22%7D)
1515

1616
> Note: You may need to set environment variables in your MCP client.
1717

packages/mcp-server/.dockerignore

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Dependencies
2+
node_modules/
3+
**/node_modules/
4+
5+
# Build outputs
6+
dist/
7+
**/dist/
8+
build/
9+
**/build/
10+
11+
# Git
12+
.git/
13+
.gitignore
14+
15+
# CI/CD
16+
.github/
17+
.gitlab-ci.yml
18+
.travis.yml
19+
20+
# IDE
21+
.vscode/
22+
.idea/
23+
*.swp
24+
*.swo
25+
*~
26+
27+
# OS
28+
.DS_Store
29+
Thumbs.db
30+
31+
# Documentation
32+
*.md
33+
docs/
34+
LICENSE
35+
36+
# Testing
37+
test/
38+
tests/
39+
__tests__/
40+
*.test.js
41+
*.spec.js
42+
coverage/
43+
.nyc_output/
44+
45+
# Logs
46+
*.log
47+
npm-debug.log*
48+
yarn-debug.log*
49+
yarn-error.log*
50+
51+
# Environment
52+
.env
53+
.env.*
54+
55+
# Temporary files
56+
*.tmp
57+
*.temp
58+
.cache/
59+
60+
# Examples and scripts
61+
examples/
62+
bin/
63+
64+
# Other packages (we only need mcp-server)
65+
packages/*/
66+
!packages/mcp-server/

packages/mcp-server/Dockerfile

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Dockerfile for Lithic MCP Server
2+
#
3+
# This Dockerfile builds a Docker image for the MCP Server.
4+
#
5+
# To build the image locally:
6+
# docker build -f packages/mcp-server/Dockerfile -t lithic-mcp:local .
7+
#
8+
# To run the image:
9+
# docker run -i lithic-mcp:local [OPTIONS]
10+
#
11+
# Common options:
12+
# --tool=<name> Include specific tools
13+
# --resource=<name> Include tools for specific resources
14+
# --operation=read|write Filter by operation type
15+
# --client=<type> Set client compatibility (e.g., claude, cursor)
16+
# --transport=<type> Set transport type (stdio or http)
17+
#
18+
# For a full list of options:
19+
# docker run -i lithic-mcp:local --help
20+
#
21+
# Note: The MCP server uses stdio transport by default. Docker's -i flag
22+
# enables interactive mode, allowing the container to communicate over stdin/stdout.
23+
24+
# Build stage
25+
FROM node:20-alpine AS builder
26+
27+
# Install bash for build script
28+
RUN apk add --no-cache bash openssl
29+
30+
# Set working directory
31+
WORKDIR /build
32+
33+
# Copy entire repository
34+
COPY . .
35+
36+
# Install all dependencies and build everything
37+
RUN yarn install --frozen-lockfile && \
38+
yarn build
39+
40+
# Production stage
41+
FROM node:20-alpine
42+
43+
# Add non-root user
44+
RUN addgroup -g 1001 -S nodejs && adduser -S nodejs -u 1001
45+
46+
# Set working directory
47+
WORKDIR /app
48+
49+
# Copy the built mcp-server dist directory
50+
COPY --from=builder /build/packages/mcp-server/dist ./
51+
52+
# Copy node_modules from mcp-server (includes all production deps)
53+
COPY --from=builder /build/packages/mcp-server/node_modules ./node_modules
54+
55+
# Copy the built lithic into node_modules
56+
COPY --from=builder /build/dist ./node_modules/lithic
57+
58+
# Change ownership to nodejs user
59+
RUN chown -R nodejs:nodejs /app
60+
61+
# Switch to non-root user
62+
USER nodejs
63+
64+
# The MCP server uses stdio transport by default
65+
# No exposed ports needed for stdio communication
66+
67+
# Set the entrypoint to the MCP server
68+
ENTRYPOINT ["node", "index.js"]
69+
70+
# Allow passing arguments to the MCP server
71+
CMD []

packages/mcp-server/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,22 +41,22 @@ For clients with a configuration JSON, it might look something like this:
4141
If you use Cursor, you can install the MCP server by using the button below. You will need to set your environment variables
4242
in Cursor's `mcp.json`, which can be found in Cursor Settings > Tools & MCP > New MCP Server.
4343

44-
[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=lithic-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsImxpdGhpYy1tY3AiXSwiZW52Ijp7IkxJVEhJQ19BUElfS0VZIjoiU2V0IHlvdXIgTElUSElDX0FQSV9LRVkgaGVyZS4iLCJMSVRISUNfV0VCSE9PS19TRUNSRVQiOiJTZXQgeW91ciBMSVRISUNfV0VCSE9PS19TRUNSRVQgaGVyZS4ifX0)
44+
[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=lithic-mcp&config=eyJuYW1lIjoibGl0aGljLW1jcCIsInRyYW5zcG9ydCI6InNzZSIsInVybCI6Imh0dHBzOi8vbGl0aGljLnN0bG1jcC5jb20vc3NlIiwiZW52Ijp7IkxJVEhJQ19BUElfS0VZIjoiU2V0IHlvdXIgTElUSElDX0FQSV9LRVkgaGVyZS4iLCJMSVRISUNfV0VCSE9PS19TRUNSRVQiOiJTZXQgeW91ciBMSVRISUNfV0VCSE9PS19TRUNSRVQgaGVyZS4ifX0)
4545

4646
### VS Code
4747

4848
If you use MCP, you can install the MCP server by clicking the link below. You will need to set your environment variables
4949
in VS Code's `mcp.json`, which can be found via Command Palette > MCP: Open User Configuration.
5050

51-
[Open VS Code](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22lithic-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22lithic-mcp%22%5D%2C%22env%22%3A%7B%22LITHIC_API_KEY%22%3A%22Set%20your%20LITHIC_API_KEY%20here.%22%2C%22LITHIC_WEBHOOK_SECRET%22%3A%22Set%20your%20LITHIC_WEBHOOK_SECRET%20here.%22%7D%7D)
51+
[Open VS Code](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22lithic-mcp%22%2C%22type%22%3A%22sse%22%2C%22url%22%3A%22https%3A%2F%2Flithic.stlmcp.com%2Fsse%22%2C%22env%22%3A%7B%22LITHIC_API_KEY%22%3A%22Set%20your%20LITHIC_API_KEY%20here.%22%2C%22LITHIC_WEBHOOK_SECRET%22%3A%22Set%20your%20LITHIC_WEBHOOK_SECRET%20here.%22%7D%7D)
5252

5353
### Claude Code
5454

5555
If you use Claude Code, you can install the MCP server by running the command below in your terminal. You will need to set your
5656
environment variables in Claude Code's `.claude.json`, which can be found in your home directory.
5757

5858
```
59-
claude mcp add lithic_mcp_api --env LITHIC_API_KEY="Your LITHIC_API_KEY here." LITHIC_WEBHOOK_SECRET="Your LITHIC_WEBHOOK_SECRET here." -- npx -y lithic-mcp
59+
claude mcp add lithic_mcp_api --env LITHIC_API_KEY="Your LITHIC_API_KEY here." LITHIC_WEBHOOK_SECRET="Your LITHIC_WEBHOOK_SECRET here." --transport sse https://lithic.stlmcp.com/sse
6060
```
6161

6262
## Code Mode

0 commit comments

Comments
 (0)