@mjquinlan2000/lawmatics-mcp 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +58 -48
- package/dist/server.js +701 -683
- package/dist/server.js.map +1 -1
- package/package.json +5 -3
package/README.md
CHANGED
|
@@ -1,41 +1,39 @@
|
|
|
1
1
|
# @mjquinlan2000/lawmatics-mcp
|
|
2
2
|
|
|
3
|
-
MCP server for the [Lawmatics](https://www.lawmatics.com/) legal CRM API. Exposes Lawmatics' REST API as MCP tools so AI assistants (Claude Desktop, etc.) can read data from Lawmatics accounts.
|
|
3
|
+
MCP server for the [Lawmatics](https://www.lawmatics.com/) legal CRM API. Exposes Lawmatics' REST API as read-only MCP tools so AI assistants (Claude Desktop, etc.) can read data from Lawmatics accounts.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Quick Start
|
|
6
6
|
|
|
7
7
|
```sh
|
|
8
|
-
|
|
9
|
-
# or run directly
|
|
10
|
-
npx @mjquinlan2000/lawmatics-mcp
|
|
8
|
+
LM_ACCESS_TOKEN=your_token npx @mjquinlan2000/lawmatics-mcp
|
|
11
9
|
```
|
|
12
10
|
|
|
13
|
-
##
|
|
11
|
+
## Authentication
|
|
14
12
|
|
|
15
|
-
### 1
|
|
13
|
+
### Option 1: Access token (simplest)
|
|
16
14
|
|
|
17
|
-
|
|
15
|
+
If you already have a Lawmatics access token, set it as an environment variable:
|
|
18
16
|
|
|
19
|
-
|
|
17
|
+
```sh
|
|
18
|
+
export LM_ACCESS_TOKEN=your_token
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Option 2: OAuth flow
|
|
22
|
+
|
|
23
|
+
If you have OAuth2 client credentials, you can use the built-in auth CLI to obtain tokens:
|
|
20
24
|
|
|
21
25
|
```sh
|
|
22
26
|
export LM_CLIENT_ID=your_client_id
|
|
23
27
|
export LM_CLIENT_SECRET=your_client_secret
|
|
24
28
|
export LM_REDIRECT_URI=http://127.0.0.1:8081/callback
|
|
25
|
-
```
|
|
26
29
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
```sh
|
|
30
|
-
# OAuth2 authorization (opens browser)
|
|
31
|
-
yarn auth
|
|
30
|
+
# Opens a browser for OAuth2 authorization
|
|
31
|
+
npx @mjquinlan2000/lawmatics-mcp auth
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
Tokens are
|
|
35
|
-
|
|
36
|
-
Alternatively, set `LM_ACCESS_TOKEN` directly to skip the OAuth flow.
|
|
34
|
+
Tokens are saved to `~/.config/lawmatics-mcp/tokens.json`.
|
|
37
35
|
|
|
38
|
-
> **Note:** Lawmatics does not support refresh tokens. When a token expires, run `
|
|
36
|
+
> **Note:** Lawmatics does not support refresh tokens. When a token expires, you must re-run the `auth` command.
|
|
39
37
|
|
|
40
38
|
## MCP Client Configuration
|
|
41
39
|
|
|
@@ -48,25 +46,7 @@ Add to your MCP client config (e.g. Claude Desktop `claude_desktop_config.json`)
|
|
|
48
46
|
"command": "npx",
|
|
49
47
|
"args": ["@mjquinlan2000/lawmatics-mcp"],
|
|
50
48
|
"env": {
|
|
51
|
-
"
|
|
52
|
-
"LM_CLIENT_SECRET": "your_client_secret"
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
For local development with `tsx`:
|
|
60
|
-
|
|
61
|
-
```json
|
|
62
|
-
{
|
|
63
|
-
"mcpServers": {
|
|
64
|
-
"lawmatics": {
|
|
65
|
-
"command": "tsx",
|
|
66
|
-
"args": ["src/server.ts"],
|
|
67
|
-
"env": {
|
|
68
|
-
"LM_CLIENT_ID": "${LM_CLIENT_ID}",
|
|
69
|
-
"LM_CLIENT_SECRET": "${LM_CLIENT_SECRET}"
|
|
49
|
+
"LM_ACCESS_TOKEN": "your_token"
|
|
70
50
|
}
|
|
71
51
|
}
|
|
72
52
|
}
|
|
@@ -115,22 +95,52 @@ The server registers 86 read-only tools covering all Lawmatics GET endpoints. Re
|
|
|
115
95
|
| Activities | `list_activities`, `get_activity` |
|
|
116
96
|
| Users | `list_users`, `get_user`, `get_me` |
|
|
117
97
|
|
|
118
|
-
## Development
|
|
98
|
+
## Local Development
|
|
119
99
|
|
|
120
100
|
```sh
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
yarn
|
|
124
|
-
yarn
|
|
125
|
-
|
|
101
|
+
git clone https://github.com/mjquinlan2000/node-mcps.git
|
|
102
|
+
cd node-mcps
|
|
103
|
+
yarn install
|
|
104
|
+
yarn build
|
|
105
|
+
|
|
106
|
+
# Run the server locally
|
|
107
|
+
yarn workspace @mjquinlan2000/lawmatics-mcp start
|
|
108
|
+
|
|
109
|
+
# Run tests
|
|
110
|
+
yarn workspace @mjquinlan2000/lawmatics-mcp test
|
|
111
|
+
yarn workspace @mjquinlan2000/lawmatics-mcp test:watch
|
|
112
|
+
|
|
113
|
+
# Regenerate typed client from API spec
|
|
114
|
+
yarn workspace @mjquinlan2000/lawmatics-mcp generate
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
For local dev with an MCP client, use `tsx` directly:
|
|
118
|
+
|
|
119
|
+
```json
|
|
120
|
+
{
|
|
121
|
+
"mcpServers": {
|
|
122
|
+
"lawmatics": {
|
|
123
|
+
"command": "tsx",
|
|
124
|
+
"args": ["/path/to/node-mcps/lawmatics-mcp/src/server.ts"],
|
|
125
|
+
"env": {
|
|
126
|
+
"LM_ACCESS_TOKEN": "your_token"
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
126
131
|
```
|
|
127
132
|
|
|
128
133
|
## Project Structure
|
|
129
134
|
|
|
130
135
|
```
|
|
131
136
|
src/
|
|
132
|
-
├── server.ts
|
|
133
|
-
├──
|
|
134
|
-
├──
|
|
135
|
-
|
|
137
|
+
├── server.ts # Entry point — CLI dispatch (server vs auth)
|
|
138
|
+
├── create-server.ts # MCP server setup — registers all tools
|
|
139
|
+
├── tool-handler.ts # Generic tool handler factory
|
|
140
|
+
├── helpers.ts # Utility functions
|
|
141
|
+
├── auth.ts # OAuth2 config (delegates to shared oauth utility)
|
|
142
|
+
├── lm.ts # Configures generated HTTP client with base URL + auth
|
|
143
|
+
├── client/ # Auto-generated typed API client (do not edit)
|
|
144
|
+
├── *.test.ts # Tests
|
|
145
|
+
└── ...
|
|
136
146
|
```
|