Skip to content

Commit 9f8d54b

Browse files
docs(client): add MCP Server setup documentation
1 parent c6f0508 commit 9f8d54b

25 files changed

Lines changed: 653 additions & 75 deletions

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 188
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-c37843d1525e87f47a292bf11a6fdcc277157556da21c923cc1b4a4473147ef0.yml
3-
openapi_spec_hash: 29a8c4637c8a00339aa0095a929a6096
4-
config_hash: 8799cfd589579f105ef8696a6d664c71
1+
configured_endpoints: 189
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-e88a4837037207e9591d48d534bd61acca57ca6e7c59ec0d4fdcf6e05288cc6d.yml
3+
openapi_spec_hash: fd8bbc173d1b6dafd117fb1a3a3d446c
4+
config_hash: f227b67dc32a8917717490e63f855d42

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ The Lithic Python library provides convenient access to the Lithic REST API from
77
application. The library includes type definitions for all request params and response fields,
88
and offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).
99

10+
## MCP Server
11+
12+
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.
13+
14+
[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=lithic-mcp&config=eyJuYW1lIjoibGl0aGljLW1jcCIsInRyYW5zcG9ydCI6Imh0dHAiLCJ1cmwiOiJodHRwczovL2xpdGhpYy5zdGxtY3AuY29tIiwiaGVhZGVycyI6eyJ4LWxpdGhpYy1hcGkta2V5IjoiTXkgTGl0aGljIEFQSSBLZXkifX0)
15+
[![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%22http%22%2C%22url%22%3A%22https%3A%2F%2Flithic.stlmcp.com%22%2C%22headers%22%3A%7B%22x-lithic-api-key%22%3A%22My%20Lithic%20API%20Key%22%7D%7D)
16+
17+
> Note: You may need to set environment variables in your MCP client.
18+
1019
## Documentation
1120

1221
The REST API documentation can be found on [docs.lithic.com](https://docs.lithic.com). The full API of this library can be found in [api.md](api.md).

api.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ Types:
9696
from lithic.types.auth_rules import (
9797
AuthRule,
9898
AuthRuleCondition,
99+
AuthRuleVersion,
99100
BacktestStats,
100101
Conditional3DSActionParameters,
101102
ConditionalACHActionParameters,
@@ -114,6 +115,7 @@ from lithic.types.auth_rules import (
114115
VelocityLimitParams,
115116
VelocityLimitPeriod,
116117
V2ListResultsResponse,
118+
V2ListVersionsResponse,
117119
V2RetrieveFeaturesResponse,
118120
V2RetrieveReportResponse,
119121
)
@@ -128,6 +130,7 @@ Methods:
128130
- <code title="delete /v2/auth_rules/{auth_rule_token}">client.auth_rules.v2.<a href="./src/lithic/resources/auth_rules/v2/v2.py">delete</a>(auth_rule_token) -> None</code>
129131
- <code title="post /v2/auth_rules/{auth_rule_token}/draft">client.auth_rules.v2.<a href="./src/lithic/resources/auth_rules/v2/v2.py">draft</a>(auth_rule_token, \*\*<a href="src/lithic/types/auth_rules/v2_draft_params.py">params</a>) -> <a href="./src/lithic/types/auth_rules/auth_rule.py">AuthRule</a></code>
130132
- <code title="get /v2/auth_rules/results">client.auth_rules.v2.<a href="./src/lithic/resources/auth_rules/v2/v2.py">list_results</a>(\*\*<a href="src/lithic/types/auth_rules/v2_list_results_params.py">params</a>) -> <a href="./src/lithic/types/auth_rules/v2_list_results_response.py">SyncCursorPage[V2ListResultsResponse]</a></code>
133+
- <code title="get /v2/auth_rules/{auth_rule_token}/versions">client.auth_rules.v2.<a href="./src/lithic/resources/auth_rules/v2/v2.py">list_versions</a>(auth_rule_token) -> <a href="./src/lithic/types/auth_rules/v2_list_versions_response.py">V2ListVersionsResponse</a></code>
131134
- <code title="post /v2/auth_rules/{auth_rule_token}/promote">client.auth_rules.v2.<a href="./src/lithic/resources/auth_rules/v2/v2.py">promote</a>(auth_rule_token) -> <a href="./src/lithic/types/auth_rules/auth_rule.py">AuthRule</a></code>
132135
- <code title="get /v2/auth_rules/{auth_rule_token}/features">client.auth_rules.v2.<a href="./src/lithic/resources/auth_rules/v2/v2.py">retrieve_features</a>(auth_rule_token, \*\*<a href="src/lithic/types/auth_rules/v2_retrieve_features_params.py">params</a>) -> <a href="./src/lithic/types/auth_rules/v2_retrieve_features_response.py">V2RetrieveFeaturesResponse</a></code>
133136
- <code title="get /v2/auth_rules/{auth_rule_token}/report">client.auth_rules.v2.<a href="./src/lithic/resources/auth_rules/v2/v2.py">retrieve_report</a>(auth_rule_token, \*\*<a href="src/lithic/types/auth_rules/v2_retrieve_report_params.py">params</a>) -> <a href="./src/lithic/types/auth_rules/v2_retrieve_report_response.py">V2RetrieveReportResponse</a></code>

src/lithic/resources/account_activity.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ def list(
5151
business_account_token: str | Omit = omit,
5252
category: Literal[
5353
"ACH",
54+
"WIRE",
5455
"BALANCE_OR_FUNDING",
5556
"FEE",
5657
"REWARD",
@@ -222,6 +223,7 @@ def list(
222223
business_account_token: str | Omit = omit,
223224
category: Literal[
224225
"ACH",
226+
"WIRE",
225227
"BALANCE_OR_FUNDING",
226228
"FEE",
227229
"REWARD",

src/lithic/resources/auth_rules/v2/v2.py

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
from ....types.auth_rules.auth_rule import AuthRule
3838
from ....types.auth_rules.event_stream import EventStream
3939
from ....types.auth_rules.v2_list_results_response import V2ListResultsResponse
40+
from ....types.auth_rules.v2_list_versions_response import V2ListVersionsResponse
4041
from ....types.auth_rules.v2_retrieve_report_response import V2RetrieveReportResponse
4142
from ....types.auth_rules.v2_retrieve_features_response import V2RetrieveFeaturesResponse
4243

@@ -738,6 +739,40 @@ def list_results(
738739
model=cast(Any, V2ListResultsResponse), # Union types cannot be passed in as arguments in the type system
739740
)
740741

742+
def list_versions(
743+
self,
744+
auth_rule_token: str,
745+
*,
746+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
747+
# The extra values given here take precedence over values defined on the client or passed to this method.
748+
extra_headers: Headers | None = None,
749+
extra_query: Query | None = None,
750+
extra_body: Body | None = None,
751+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
752+
) -> V2ListVersionsResponse:
753+
"""
754+
Returns all versions of an auth rule, sorted by version number descending
755+
(newest first).
756+
757+
Args:
758+
extra_headers: Send extra headers
759+
760+
extra_query: Add additional query parameters to the request
761+
762+
extra_body: Add additional JSON properties to the request
763+
764+
timeout: Override the client-level default timeout for this request, in seconds
765+
"""
766+
if not auth_rule_token:
767+
raise ValueError(f"Expected a non-empty value for `auth_rule_token` but received {auth_rule_token!r}")
768+
return self._get(
769+
f"/v2/auth_rules/{auth_rule_token}/versions",
770+
options=make_request_options(
771+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
772+
),
773+
cast_to=V2ListVersionsResponse,
774+
)
775+
741776
def promote(
742777
self,
743778
auth_rule_token: str,
@@ -1582,6 +1617,40 @@ def list_results(
15821617
model=cast(Any, V2ListResultsResponse), # Union types cannot be passed in as arguments in the type system
15831618
)
15841619

1620+
async def list_versions(
1621+
self,
1622+
auth_rule_token: str,
1623+
*,
1624+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1625+
# The extra values given here take precedence over values defined on the client or passed to this method.
1626+
extra_headers: Headers | None = None,
1627+
extra_query: Query | None = None,
1628+
extra_body: Body | None = None,
1629+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
1630+
) -> V2ListVersionsResponse:
1631+
"""
1632+
Returns all versions of an auth rule, sorted by version number descending
1633+
(newest first).
1634+
1635+
Args:
1636+
extra_headers: Send extra headers
1637+
1638+
extra_query: Add additional query parameters to the request
1639+
1640+
extra_body: Add additional JSON properties to the request
1641+
1642+
timeout: Override the client-level default timeout for this request, in seconds
1643+
"""
1644+
if not auth_rule_token:
1645+
raise ValueError(f"Expected a non-empty value for `auth_rule_token` but received {auth_rule_token!r}")
1646+
return await self._get(
1647+
f"/v2/auth_rules/{auth_rule_token}/versions",
1648+
options=make_request_options(
1649+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
1650+
),
1651+
cast_to=V2ListVersionsResponse,
1652+
)
1653+
15851654
async def promote(
15861655
self,
15871656
auth_rule_token: str,
@@ -1756,6 +1825,9 @@ def __init__(self, v2: V2) -> None:
17561825
self.list_results = _legacy_response.to_raw_response_wrapper(
17571826
v2.list_results,
17581827
)
1828+
self.list_versions = _legacy_response.to_raw_response_wrapper(
1829+
v2.list_versions,
1830+
)
17591831
self.promote = _legacy_response.to_raw_response_wrapper(
17601832
v2.promote,
17611833
)
@@ -1796,6 +1868,9 @@ def __init__(self, v2: AsyncV2) -> None:
17961868
self.list_results = _legacy_response.async_to_raw_response_wrapper(
17971869
v2.list_results,
17981870
)
1871+
self.list_versions = _legacy_response.async_to_raw_response_wrapper(
1872+
v2.list_versions,
1873+
)
17991874
self.promote = _legacy_response.async_to_raw_response_wrapper(
18001875
v2.promote,
18011876
)
@@ -1836,6 +1911,9 @@ def __init__(self, v2: V2) -> None:
18361911
self.list_results = to_streamed_response_wrapper(
18371912
v2.list_results,
18381913
)
1914+
self.list_versions = to_streamed_response_wrapper(
1915+
v2.list_versions,
1916+
)
18391917
self.promote = to_streamed_response_wrapper(
18401918
v2.promote,
18411919
)
@@ -1876,6 +1954,9 @@ def __init__(self, v2: AsyncV2) -> None:
18761954
self.list_results = async_to_streamed_response_wrapper(
18771955
v2.list_results,
18781956
)
1957+
self.list_versions = async_to_streamed_response_wrapper(
1958+
v2.list_versions,
1959+
)
18791960
self.promote = async_to_streamed_response_wrapper(
18801961
v2.promote,
18811962
)

0 commit comments

Comments
 (0)