Skip to content

feat(third_party): add the Lightyear plugin - #1371

Open
rshah2020 wants to merge 1 commit into
mainfrom
add-lightyear-plugin
Open

rshah2020 wants to merge 1 commit into
mainfrom
add-lightyear-plugin

Conversation

@rshah2020

Copy link
Copy Markdown
Contributor

What this wraps

Lightyear's official remote MCP server at the root of https://mcp.lightyear.com (no /mcp suffix; /mcp returns 403). Lightyear is a regulated European brokerage. Through the connection an agent can analyze balances and transactions, manage watchlists and price alerts, draft and edit investment plans, search and screen instruments, and draft order proposals. Order proposals are only drafts: the user must review and approve them in the Lightyear app before anything is submitted, and the README says so prominently.

New files under third_party/lightyear/: .cursor-plugin/plugin.json, mcp.json (type: http), README.md, CHANGELOG.md, LICENSE (MIT, same as sibling plugins), assets/logo.png (Lightyear's 512×512 bolt icon from lightyear.com, cropped to square and resized to 256×256 RGBA). Tail-appended entries in .cursor-plugin/marketplace.json and the root README.md table.

Validation

  • node scripts/validate-plugins.mjs → All plugins validated successfully.
  • node scripts/generate-pstack-harness-trees.mjs --check → up to date.

Smoke test (unauthenticated, from the VM)

  • POST / initialize → clean HTTP 401, WWW-Authenticate: Bearer resource_metadata="https://mcp.lightyear.com/.well-known/oauth-protected-resource". GET / also 401. POST /mcp → 403, so the root URL is correct.
  • PRM (/.well-known/oauth-protected-resource) → 200: resource: https://mcp.lightyear.com/, authorization_servers: ["https://api.lightyear.com"], scopes account:read, investment_plan:read/write, order_proposal:write, price_alert:read/write, watchlist:read/write. The path-suffixed PRM (.../oauth-protected-resource/mcp) is 403.
  • AS metadata (https://api.lightyear.com/.well-known/oauth-authorization-server) → 200: authorization code + refresh token, PKCE S256, token_endpoint_auth_methods_supported: ["none"], client_id_metadata_document_supported: true, no registration_endpoint. No OIDC discovery document (404).
  • Dynamic Client Registration: not available on the advertised authorization server. Probed /register, /oauth/register, /api/v1/public/oauth/register on both hosts → 403. There is an older, unadvertised issuer at https://api.lightyear.com/oauth2/internal-mcp with a registration endpoint; it returns an empty 400 for redirect_uris: ["cursor://anysphere.cursor-mcp/oauth/callback"] and for https://www.cursor.com/agents/mcp/oauth/callback, and only accepted http://localhost:8787/callback. The PRM does not point at that issuer, so a compliant client will not use it.
  • Client ID Metadata Document (the path Lightyear actually supports): GET .../oauth/authorize with client_id=https://cursor.com/oauth/mcp-client.json, PKCE S256, resource=https://mcp.lightyear.com/ and redirect_uri=https://www.cursor.com/agents/mcp/oauth/callback (or http://localhost:8787/callback) → 302 to the Lightyear consent page https://lightyear.com/connect/authorize?.... The same request with redirect_uri=cursor://anysphere.cursor-mcp/oauth/callback → 400 (that URI is not in Cursor's published metadata document), and a bogus client_id → 400. So Lightyear fetches and enforces Cursor's CIMD document correctly.
  • No sign-in was completed. Authenticated tool execution (tools/list, tool count, read/write annotations) was not tested because it requires a Lightyear user account; the README states that the tool list is only available after sign-in and describes capabilities by the advertised scopes and Lightyear's submitted description.

Reviewer note

Because Lightyear is CIMD-only (no DCR), connecting depends on the Cursor client presenting https://cursor.com/oauth/mcp-client.json as its client_id when client_id_metadata_document_supported is advertised. The document is live and Lightyear accepts it; if a given Cursor build still falls back to DCR only, the sign-in will fail at the authorization server rather than in the plugin. Nothing in this PR can work around that without a pre-registered client ID from Lightyear.

Skipped

  • No authenticated tools/list; tool names and counts are not listed in the README.
  • No placement: "server" flag; left to the default like most sibling third-party plugins.

Connect agents to Lightyear's hosted MCP server at the root of
https://mcp.lightyear.com (no /mcp suffix) to analyze balances and
transactions, manage watchlists and price alerts, draft and edit
investment plans, screen instruments, and draft order proposals that
the user approves in the Lightyear app.

Auth is OAuth 2.1 authorization code with PKCE (S256) against
api.lightyear.com. Lightyear offers no dynamic client registration and
identifies clients by OAuth Client ID Metadata Document; its authorize
endpoint accepts Cursor's published client metadata document, so there
is nothing to configure.

Co-authored-by: Rohan Shah <rshah2020@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants