@oga-mcp/server 1.0.0 → 1.0.1

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,8 +1,8 @@
1
1
  # `@oga-mcp/server`
2
2
 
3
- OneGoodArea MCP server — UK area intelligence inside Claude Desktop, Cursor, Windsurf, or any MCP-compatible client.
3
+ OneGoodArea MCP server — UK area intelligence inside Claude Desktop, Cursor, Claude Code, Windsurf, or any MCP-compatible client.
4
4
 
5
- Score any UK postcode (or place name) for residential mortgage origination, retail site selection, property investment, or as a neutral reference baseline. Driven by the same engine that powers https://www.onegoodarea.com five weighted dimensions per preset, confidence per dimension with engine-grounded reasoning, source attribution, public methodology.
5
+ Score UK areas for one of four decision presets, query the signals catalog directly, ask in natural language, find peers, watch portfolios for material change, and generate audience-shaped briefs all server-composed from the deterministic OneGoodArea engine. No client-side prose synthesis: every line of output cites real engine state.
6
6
 
7
7
  ---
8
8
 
@@ -46,71 +46,90 @@ Add to `.cursor/mcp.json` in your project (or global config):
46
46
  }
47
47
  ```
48
48
 
49
+ ### Claude Code (CLI)
50
+
51
+ One command:
52
+
53
+ ```sh
54
+ claude mcp add onegoodarea -e OOGA_API_KEY=oga_xxx -- npx -y @oga-mcp/server
55
+ ```
56
+
49
57
  ---
50
58
 
51
59
  ## Get an API key
52
60
 
53
- 1. Sign up at https://www.onegoodarea.com/sign-up (Sandbox tier is free, 35 calls/month for evaluation).
61
+ 1. Sign up at https://www.onegoodarea.com/sign-up.
54
62
  2. Go to https://www.onegoodarea.com/dashboard.
55
63
  3. Create an API key — it starts with `oga_`.
56
- 4. Paste into the `OOGA_API_KEY` env var above.
57
-
58
- For higher volume, upgrade at https://www.onegoodarea.com/pricing.
64
+ 4. Paste it into the `OOGA_API_KEY` env var above.
59
65
 
60
66
  ---
61
67
 
62
68
  ## Tools
63
69
 
64
- Every tool's response is composed server-side from real engine state. No client-side text synthesis: the prose you see comes from the deterministic engine that produced the score.
70
+ Eleven tools across six surfaces. Every response is composed server-side from the deterministic engine no client-side prose synthesis.
65
71
 
66
- ### `score_postcode(area, preset)`
72
+ ### Scores
67
73
 
68
- Scores a UK postcode (or place name) for one of four decision presets.
74
+ #### `score_postcode(area, preset)`
69
75
 
70
- **Arguments:**
76
+ Score a UK postcode or place name for a preset (`moving`, `business`, `investing`, `research`). Returns the 0-100 score, five weighted dimensions with engine-grounded reasoning + confidence, a one-paragraph summary, recommendations, and data sources.
71
77
 
72
- - `area` (string, required): UK postcode like `"SW1A 1AA"` or place name like `"Manchester city centre"`. Max 100 characters.
73
- - `preset` (string, required): One of:
74
- - `moving` — origination scoring (residential mortgage suitability, demand-side risk)
75
- - `business` — site selection (footfall, competition, commercial viability)
76
- - `investing` — investment scoring (yield, growth, regeneration)
77
- - `research` — reference scoring (neutral baseline, equal weights)
78
+ #### `compare_postcodes(areas, preset)`
78
79
 
79
- **Returns:** Markdown with the overall 0-100 score, five weighted dimensions with the engine's per-dimension reasoning and confidence reason, a server-composed one-paragraph summary, actionable recommendations from low-scoring or low-confidence dimensions, and the list of public datasets that contributed.
80
+ Score 2-8 areas side-by-side for the same preset. Returns a sorted comparison table with per-area summaries. Partial failures surface inline.
80
81
 
81
- ### `compare_postcodes(areas, preset)`
82
+ ### Signals
82
83
 
83
- Scores 2-8 UK areas side-by-side for the same preset.
84
+ #### `get_area_signals(area)`
84
85
 
85
- **Arguments:**
86
+ Full signals catalog across all seven categories (crime, deprivation, property, schools, amenities, transport, environment). Each signal carries value + unit, percentile when store-backed, confidence with engine-grounded reason, source attribution, and observation period.
86
87
 
87
- - `areas` (string[], required): 2-8 UK postcodes or place names.
88
- - `preset` (string, required): Same preset values as `score_postcode`.
88
+ #### `get_signals_by_category(area, category)`
89
89
 
90
- **Returns:** A sorted comparison table (rank, area, score, area type, top dimension) plus per-area summaries from the engine. Partial failures are surfaced inline rather than failing the whole call.
90
+ Same shape as `get_area_signals`, narrowed to one category. Use when the LLM needs to focus on a single data domain.
91
91
 
92
- ### `methodology_for(dimension)`
92
+ ### Intelligence
93
93
 
94
- Explains how a specific scoring dimension is computed. Static lookup — no network, no quota cost.
94
+ #### `find_areas(question)`
95
95
 
96
- ### `engine_version()`
96
+ Ask in natural language. The planner translates the question into a typed plan (one of seven ops: `rank_areas`, `get_area`, `score_area`, `compare_areas`, `find_peers`, `find_insights`, `find_forecast`); the database executes it. The response returns the emitted plan + results so every answer is reproducible.
97
97
 
98
- Returns the current engine version + changelog. Static lookup. The live engine version is also echoed on every `score_postcode` response.
98
+ #### `find_peers(area, k?)`
99
99
 
100
- ---
100
+ k-nearest-neighbour peers for a UK area by normalised signal values. Returns the target's geo_code, the signal dimensions used in the comparison, and a ranked peers list with distance (0 = identical, 1 = maximally distant) and `n_dims_used`.
101
101
 
102
- ## Pricing
102
+ ### Monitor
103
+
104
+ #### `watch_portfolio(name, areas)`
105
+
106
+ One-shot setup: creates a tracked portfolio and adds areas. Returns the new `portfolio_id` and the area list. If the add step fails after the create, the response surfaces the partial state so the LLM can act.
107
+
108
+ #### `get_portfolio_changes(portfolio_id, threshold_pct?, baseline?, min_transactions?)`
103
109
 
104
- The MCP server itself is free. API calls go through your OneGoodArea plan:
110
+ Check a portfolio for material signal changes between two time-series periods. Returns scope, counts, and a per-area table of material moves with direction, from/to values, delta, and percent change. Probe calls don't fire customer webhooks.
105
111
 
106
- - Sandbox £0/mo · 35 API calls — evaluation only
107
- - Starter £49/mo · 1,500 calls
108
- - Build £149/mo · 6,000 calls
109
- - Scale £499/mo · 25,000 calls
110
- - Growth £1,499/mo · 100,000 calls includes MCP server access at no extra cost
111
- - Enterprise from £4,999/mo · 250,000+ calls — includes MCP server access
112
+ ### Brief
113
+
114
+ #### `area_brief(area, audience)` marquee
115
+
116
+ One audience-shaped advisory document per area. Audience ∈ `{lender, insurer, retailer, investor}`. Composes the full signals catalog with the audience's scoring preset (with explain mode), then renders an audience-specific brief: overall verdict, audience-relevant dimensions, audience-relevant signals with provenance, recommendations, and data sources.
117
+
118
+ ### Reference
119
+
120
+ #### `methodology_for(dimension)`
121
+
122
+ Methodology for any scoring dimension: data source, scoring function summary, per-preset weights. Static lookup — no network, no quota cost.
123
+
124
+ #### `engine_version()`
125
+
126
+ Current engine version and changelog. Static lookup. The live engine version is also stamped on every `score_postcode` and `get_area_signals` response.
127
+
128
+ ---
129
+
130
+ ## Pricing
112
131
 
113
- For Sandbox / Starter / Build / Scale, MCP access is a £29/mo add-on.
132
+ The MCP server is **free**. API calls go through your OneGoodArea plan current tiers and any MCP-specific terms live at https://www.onegoodarea.com/pricing.
114
133
 
115
134
  ---
116
135
 
@@ -8,7 +8,7 @@
8
8
  * server-side from real engine state — no client-side text synthesis.
9
9
  */
10
10
  const DEFAULT_BASE = "https://onegoodarea.onrender.com";
11
- const USER_AGENT = "onegoodarea-mcp-server/1.0.0";
11
+ const USER_AGENT = "onegoodarea-mcp-server/1.0.1";
12
12
  /** AR-366: the seven signal categories exposed by /v1/signals/:category.
13
13
  Mirrors @onegoodarea/contracts SIGNAL_CATEGORIES. */
14
14
  export const SIGNAL_CATEGORIES = [
package/dist/server.js CHANGED
@@ -40,7 +40,7 @@ import { findPeersToolDef, findPeersToolName, parseFindPeersArgs, executeFindPee
40
40
  import { watchPortfolioToolDef, watchPortfolioToolName, parseWatchPortfolioArgs, executeWatchPortfolio, } from "./tools/watch-portfolio.js";
41
41
  import { getPortfolioChangesToolDef, getPortfolioChangesToolName, parseGetPortfolioChangesArgs, executeGetPortfolioChanges, } from "./tools/get-portfolio-changes.js";
42
42
  import { areaBriefToolDef, areaBriefToolName, parseAreaBriefArgs, executeAreaBrief, } from "./tools/area-brief.js";
43
- const SERVER_VERSION = "1.0.0";
43
+ const SERVER_VERSION = "1.0.1";
44
44
  function readApiKey() {
45
45
  const key = process.env.OOGA_API_KEY;
46
46
  if (!key) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oga-mcp/server",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "MCP server for OneGoodArea — UK area intelligence inside Claude Desktop, Cursor, and any MCP-compatible client. Returns server-composed briefs (summary + per-dimension reasoning + confidence + data sources) from the deterministic engine.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://www.onegoodarea.com/docs/mcp",