@rustledger/mcp-server 0.4.0 → 0.6.0

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
@@ -48,6 +48,8 @@ Add to your Claude Code settings:
48
48
 
49
49
  ## Available Tools
50
50
 
51
+ ### Core Tools
52
+
51
53
  | Tool | Description |
52
54
  |------|-------------|
53
55
  | `validate` | Validate a Beancount ledger for errors |
@@ -59,6 +61,69 @@ Add to your Claude Code settings:
59
61
  | `list_plugins` | List available native plugins |
60
62
  | `run_plugin` | Run a native plugin on a ledger |
61
63
 
64
+ ### Editor Tools (LSP-like)
65
+
66
+ | Tool | Description |
67
+ |------|-------------|
68
+ | `editor_completions` | Get context-aware completions at a position |
69
+ | `editor_hover` | Get hover information for symbols |
70
+ | `editor_definition` | Go to definition for accounts/currencies |
71
+ | `editor_document_symbols` | Get document outline/structure |
72
+ | `editor_references` | Find all references to accounts/currencies/payees |
73
+
74
+ ### Analysis Tools
75
+
76
+ | Tool | Description |
77
+ |------|-------------|
78
+ | `ledger_stats` | Get statistics (directive counts, date range, etc.) |
79
+ | `list_accounts` | List all accounts with open/close dates |
80
+ | `list_commodities` | List all currencies/commodities |
81
+ | `account_activity` | Get activity summary for an account |
82
+
83
+ ### Utility Tools
84
+
85
+ | Tool | Description |
86
+ |------|-------------|
87
+ | `format_check` | Check if ledger is properly formatted |
88
+ | `bql_tables` | Get BQL table documentation |
89
+ | `directive_at_line` | Get directive at a specific line |
90
+ | `find_transactions` | Find transactions by criteria |
91
+
92
+ ### Report Tools
93
+
94
+ | Tool | Description |
95
+ |------|-------------|
96
+ | `report` | Generate balance sheet, income, holdings, networth |
97
+
98
+ ### File Operation Tools
99
+
100
+ | Tool | Description |
101
+ |------|-------------|
102
+ | `validate_file` | Validate a file from filesystem |
103
+ | `query_file` | Run BQL query on a file |
104
+ | `format_file` | Format a file (with optional write-back) |
105
+
106
+ ## Resources
107
+
108
+ The server exposes documentation resources:
109
+
110
+ | Resource | Description |
111
+ |----------|-------------|
112
+ | `rustledger://docs/bql` | BQL Query Language Reference |
113
+ | `rustledger://docs/validation-errors` | All 27 validation error codes |
114
+ | `rustledger://docs/bql-functions` | Complete BQL function reference |
115
+ | `rustledger://docs/directives` | Beancount directive syntax |
116
+
117
+ ## Prompts
118
+
119
+ The server provides helpful prompts:
120
+
121
+ | Prompt | Description |
122
+ |--------|-------------|
123
+ | `analyze_ledger` | Analyze a ledger for insights |
124
+ | `write_query` | Help write BQL queries from natural language |
125
+ | `categorize_transaction` | Help categorize transactions |
126
+
62
127
  ## Example Usage
63
128
 
64
129
  Once configured, you can ask your AI assistant:
@@ -67,12 +132,38 @@ Once configured, you can ask your AI assistant:
67
132
  - "What's my current balance in Assets:Checking?"
68
133
  - "Show me all restaurant expenses this month"
69
134
  - "Format this beancount ledger"
135
+ - "Generate a balance sheet report"
136
+ - "Find all transactions with 'Amazon' in the payee"
137
+ - "What accounts do I have?"
70
138
 
71
- ## Resources
139
+ ## Development
140
+
141
+ To develop the MCP server locally with a local build of the WASM package:
142
+
143
+ ```bash
144
+ # Build the WASM package
145
+ cd crates/rustledger-wasm
146
+ wasm-pack build --target web
147
+
148
+ # Rename package for npm link compatibility
149
+ cd pkg
150
+ sed -i 's/"name": "rustledger-wasm"/"name": "@rustledger\/wasm"/' package.json
151
+ npm link
152
+
153
+ # Link in the MCP server
154
+ cd ../../../packages/mcp-server
155
+ npm link @rustledger/wasm
156
+ npm install
157
+ npm run build
158
+ ```
72
159
 
73
- The server also exposes documentation:
160
+ To unlink and use the published npm package:
74
161
 
75
- - `rustledger://docs/bql` - BQL Query Language Reference
162
+ ```bash
163
+ cd packages/mcp-server
164
+ npm unlink @rustledger/wasm
165
+ npm install
166
+ ```
76
167
 
77
168
  ## License
78
169
 
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/index.test.ts"],"names":[],"mappings":""}