@mjquinlan2000/practicepanther-mcp 0.1.2 → 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 CHANGED
@@ -1,42 +1,42 @@
1
1
  # @mjquinlan2000/practicepanther-mcp
2
2
 
3
- MCP server for the [PracticePanther](https://www.practicepanther.com/) legal practice management API. Exposes PracticePanther's REST API as MCP tools so AI assistants (Claude Desktop, etc.) can read data from PracticePanther accounts.
3
+ MCP server for the [PracticePanther](https://www.practicepanther.com/) legal practice management API. Exposes PracticePanther's REST API as read-only MCP tools so AI assistants (Claude Desktop, etc.) can read data from PracticePanther accounts.
4
4
 
5
- ## Installation
5
+ ## Quick Start
6
6
 
7
7
  ```sh
8
- npm install @mjquinlan2000/practicepanther-mcp
9
- # or run directly
10
- npx @mjquinlan2000/practicepanther-mcp
8
+ PP_ACCESS_TOKEN=your_token npx @mjquinlan2000/practicepanther-mcp
11
9
  ```
12
10
 
13
- ## Setup
11
+ ## Authentication
14
12
 
15
- ### 1. Obtain API credentials
13
+ ### Option 1: Access token (simplest)
16
14
 
17
- Register an OAuth2 application in PracticePanther to get a client ID and secret.
15
+ If you already have a PracticePanther access token, set it as an environment variable:
18
16
 
19
- ### 2. Set environment variables
17
+ ```sh
18
+ export PP_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 PP_CLIENT_ID=your_client_id
23
27
  export PP_CLIENT_SECRET=your_client_secret
24
28
  export PP_REDIRECT_URI=http://127.0.0.1:8080/callback
25
- ```
26
-
27
- ### 3. Authenticate
28
29
 
29
- ```sh
30
- # Initial OAuth2 authorization (opens browser)
31
- yarn auth
30
+ # Opens a browser for OAuth2 authorization
31
+ npx @mjquinlan2000/practicepanther-mcp auth
32
32
 
33
33
  # Refresh an expired token
34
- yarn auth:refresh
34
+ npx @mjquinlan2000/practicepanther-mcp auth refresh
35
35
  ```
36
36
 
37
- Tokens are persisted to `~/.config/practicepanther-mcp/tokens.json` and auto-refresh when the server runs.
37
+ Tokens are saved to `~/.config/practicepanther-mcp/tokens.json`.
38
38
 
39
- Alternatively, set `PP_ACCESS_TOKEN` directly to skip the OAuth flow.
39
+ PracticePanther supports refresh tokens — if `PP_CLIENT_ID` and `PP_CLIENT_SECRET` are set at runtime, the server will auto-refresh expired tokens.
40
40
 
41
41
  ## MCP Client Configuration
42
42
 
@@ -49,25 +49,24 @@ Add to your MCP client config (e.g. Claude Desktop `claude_desktop_config.json`)
49
49
  "command": "npx",
50
50
  "args": ["@mjquinlan2000/practicepanther-mcp"],
51
51
  "env": {
52
- "PP_CLIENT_ID": "your_client_id",
53
- "PP_CLIENT_SECRET": "your_client_secret"
52
+ "PP_ACCESS_TOKEN": "your_token"
54
53
  }
55
54
  }
56
55
  }
57
56
  }
58
57
  ```
59
58
 
60
- For local development with `tsx`:
59
+ To use OAuth with auto-refresh instead, pass the client credentials:
61
60
 
62
61
  ```json
63
62
  {
64
63
  "mcpServers": {
65
64
  "practicepanther": {
66
- "command": "tsx",
67
- "args": ["src/server.ts"],
65
+ "command": "npx",
66
+ "args": ["@mjquinlan2000/practicepanther-mcp"],
68
67
  "env": {
69
- "PP_CLIENT_ID": "${PP_CLIENT_ID}",
70
- "PP_CLIENT_SECRET": "${PP_CLIENT_SECRET}"
68
+ "PP_CLIENT_ID": "your_client_id",
69
+ "PP_CLIENT_SECRET": "your_client_secret"
71
70
  }
72
71
  }
73
72
  }
@@ -76,7 +75,7 @@ For local development with `tsx`:
76
75
 
77
76
  ## Available Tools
78
77
 
79
- The server registers tools for the following PracticePanther entities. Each entity has a `get_<entity>` (by ID) and `list_<entities>` tool unless noted otherwise.
78
+ The server registers read-only tools for the following PracticePanther entities. Each entity has a `get_<entity>` (by ID) and `list_<entities>` tool unless noted otherwise.
80
79
 
81
80
  | Entity | Tools |
82
81
  |--------|-------|
@@ -103,28 +102,52 @@ The server registers tools for the following PracticePanther entities. Each enti
103
102
  | Time Entries | `get_time_entry`, `list_time_entries` |
104
103
  | Users | `get_me`, `get_user`, `list_users` |
105
104
 
106
- ## Development
105
+ ## Local Development
107
106
 
108
107
  ```sh
109
- yarn start # Run server locally (stdio transport)
110
- yarn build # Bundle with tsup
111
- yarn typecheck # Type-check with tsc --noEmit
112
- yarn spec:generate # Fetch Swagger spec, convert to OpenAPI 3, regenerate typed client
108
+ git clone https://github.com/mjquinlan2000/node-mcps.git
109
+ cd node-mcps
110
+ yarn install
111
+ yarn build
112
+
113
+ # Run the server locally
114
+ yarn workspace @mjquinlan2000/practicepanther-mcp start
115
+
116
+ # Run tests
117
+ yarn workspace @mjquinlan2000/practicepanther-mcp test
118
+ yarn workspace @mjquinlan2000/practicepanther-mcp test:watch
119
+
120
+ # Regenerate typed client from API spec
121
+ yarn workspace @mjquinlan2000/practicepanther-mcp spec:generate
122
+ ```
123
+
124
+ For local dev with an MCP client, use `tsx` directly:
125
+
126
+ ```json
127
+ {
128
+ "mcpServers": {
129
+ "practicepanther": {
130
+ "command": "tsx",
131
+ "args": ["/path/to/node-mcps/practicepanther-mcp/src/server.ts"],
132
+ "env": {
133
+ "PP_ACCESS_TOKEN": "your_token"
134
+ }
135
+ }
136
+ }
137
+ }
113
138
  ```
114
139
 
115
140
  ## Project Structure
116
141
 
117
142
  ```
118
143
  src/
119
- ├── server.ts # MCP server entry point — registers all tools
120
- ├── schemas.ts # Zod schemas for shaping API responses
121
- ├── auth.ts # OAuth2 config (delegates to shared oauth utility)
122
- ├── pp.ts # Configures generated HTTP client with base URL + auth
123
- └── client/ # Auto-generated typed API client (do not edit)
144
+ ├── server.ts # Entry point — CLI dispatch (server vs auth)
145
+ ├── create-server.ts # MCP server setup registers all tools
146
+ ├── tool-handler.ts # Generic tool handler factory
147
+ ├── helpers.ts # Utility functions
148
+ ├── auth.ts # OAuth2 config (delegates to shared oauth utility)
149
+ ├── pp.ts # Configures generated HTTP client with base URL + auth
150
+ ├── client/ # Auto-generated typed API client (do not edit)
151
+ ├── *.test.ts # Tests
152
+ └── ...
124
153
  ```
125
-
126
- ## Adding a New Entity
127
-
128
- 1. Import the SDK functions from `./client/index.js`
129
- 2. Define a Zod schema in `schemas.ts`
130
- 3. Register `get_` and `list_` tools in `server.ts`