@transita/mcp-server 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 +5 -5
- package/dist/api.js +1 -1
- package/dist/constants.d.ts +16 -0
- package/dist/constants.js +17 -0
- package/dist/constants.js.map +1 -0
- package/dist/server.d.ts +1 -1
- package/dist/server.js +3 -3
- package/dist/server.js.map +1 -1
- package/dist/tools/visa-details.js +2 -3
- package/dist/tools/visa-details.js.map +1 -1
- package/package.json +2 -3
package/README.md
CHANGED
|
@@ -99,17 +99,17 @@ The model will pick the right Transita tool, call it, and synthesise the answer.
|
|
|
99
99
|
| Env var | Default | Purpose |
|
|
100
100
|
|---|---|---|
|
|
101
101
|
| `TRANSITA_API_URL` | `https://transita.app` | Override the API base URL (useful for local dev against `http://localhost:3000`). |
|
|
102
|
-
| `TRANSITA_MCP_USER_AGENT` | `transita-mcp-server/0.1.
|
|
102
|
+
| `TRANSITA_MCP_USER_AGENT` | `transita-mcp-server/0.1.3` | Custom UA string for analytics. |
|
|
103
103
|
|
|
104
104
|
## Free vs paid
|
|
105
105
|
|
|
106
|
-
Everything this MCP server exposes is **free**. The full document checklist + 30-day action plan is part of Transita's
|
|
106
|
+
Everything this MCP server exposes is **free**. The full document checklist + 30-day action plan is part of Transita's paid action plan and lives at `https://transita.app/visa/<id>`. The MCP server's tools include a checklist preview (lead time, ancillary cost, first section) and link to the full plan.
|
|
107
107
|
|
|
108
108
|
## Development
|
|
109
109
|
|
|
110
110
|
```bash
|
|
111
|
-
git clone https://github.com/snenenenenenene/transita.git
|
|
112
|
-
cd transita
|
|
111
|
+
git clone https://github.com/snenenenenenene/transita-mcp-server.git
|
|
112
|
+
cd transita-mcp-server
|
|
113
113
|
bun install
|
|
114
114
|
bun run build
|
|
115
115
|
|
|
@@ -155,5 +155,5 @@ MIT — see LICENSE.
|
|
|
155
155
|
|
|
156
156
|
- Website: <https://transita.app>
|
|
157
157
|
- MCP landing page: <https://transita.app/mcp>
|
|
158
|
-
- Source: <https://github.com/snenenenenenene/transita
|
|
158
|
+
- Source (public mirror): <https://github.com/snenenenenenene/transita-mcp-server>
|
|
159
159
|
- MCP protocol: <https://modelcontextprotocol.io>
|
package/dist/api.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* dev server during testing.
|
|
9
9
|
*/
|
|
10
10
|
export const API_BASE_URL = process.env.TRANSITA_API_URL?.replace(/\/$/, "") ?? "https://transita.app";
|
|
11
|
-
const USER_AGENT = process.env.TRANSITA_MCP_USER_AGENT ?? "transita-mcp-server/0.1.
|
|
11
|
+
const USER_AGENT = process.env.TRANSITA_MCP_USER_AGENT ?? "transita-mcp-server/0.1.3";
|
|
12
12
|
export async function fetchJson(path, opts = {}) {
|
|
13
13
|
const url = `${API_BASE_URL}${path}`;
|
|
14
14
|
const init = {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Product facts this package quotes about the hosted Transita app.
|
|
3
|
+
*
|
|
4
|
+
* This is a separate published npm package (@transita/mcp-server), so it
|
|
5
|
+
* cannot import apps/web/src/lib/pricing.ts directly — that module is
|
|
6
|
+
* private to the Next.js app. Keep this the ONE literal in this package and
|
|
7
|
+
* update it here when the live price changes;
|
|
8
|
+
* apps/web/src/lib/mcpPackagePriceGuard.test.ts reads this file at test time
|
|
9
|
+
* and fails the build if it disagrees with PLAN_PRICE_DISPLAY.
|
|
10
|
+
*
|
|
11
|
+
* That guard only stops the source in this repo from drifting — it does not
|
|
12
|
+
* reach the already-published npm package or the public GitHub mirror. Those
|
|
13
|
+
* are updated by hand; see externalSurfaces.ts's "npm" and "mcp-mirror-repo"
|
|
14
|
+
* entries for how and by whom.
|
|
15
|
+
*/
|
|
16
|
+
export declare const PLAN_PRICE_DISPLAY = "$9";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Product facts this package quotes about the hosted Transita app.
|
|
3
|
+
*
|
|
4
|
+
* This is a separate published npm package (@transita/mcp-server), so it
|
|
5
|
+
* cannot import apps/web/src/lib/pricing.ts directly — that module is
|
|
6
|
+
* private to the Next.js app. Keep this the ONE literal in this package and
|
|
7
|
+
* update it here when the live price changes;
|
|
8
|
+
* apps/web/src/lib/mcpPackagePriceGuard.test.ts reads this file at test time
|
|
9
|
+
* and fails the build if it disagrees with PLAN_PRICE_DISPLAY.
|
|
10
|
+
*
|
|
11
|
+
* That guard only stops the source in this repo from drifting — it does not
|
|
12
|
+
* reach the already-published npm package or the public GitHub mirror. Those
|
|
13
|
+
* are updated by hand; see externalSurfaces.ts's "npm" and "mcp-mirror-repo"
|
|
14
|
+
* entries for how and by whom.
|
|
15
|
+
*/
|
|
16
|
+
export const PLAN_PRICE_DISPLAY = "$9";
|
|
17
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,CAAC"}
|
package/dist/server.d.ts
CHANGED
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
10
10
|
export declare const SERVER_NAME = "transita";
|
|
11
|
-
export declare const SERVER_VERSION = "0.1.
|
|
11
|
+
export declare const SERVER_VERSION = "0.1.3";
|
|
12
12
|
export declare function createTransitaMcpServer(): McpServer;
|
package/dist/server.js
CHANGED
|
@@ -15,13 +15,13 @@ import { registerSearchByNationality } from "./tools/search-by-nationality.js";
|
|
|
15
15
|
import { registerProgrammeStatus } from "./tools/programme-status.js";
|
|
16
16
|
import { registerResources } from "./resources/index.js";
|
|
17
17
|
import { registerPrompts } from "./prompts/index.js";
|
|
18
|
+
import { PLAN_PRICE_DISPLAY } from "./constants.js";
|
|
18
19
|
export const SERVER_NAME = "transita";
|
|
19
|
-
export const SERVER_VERSION = "0.1.
|
|
20
|
+
export const SERVER_VERSION = "0.1.3";
|
|
20
21
|
export function createTransitaMcpServer() {
|
|
21
22
|
const server = new McpServer({ name: SERVER_NAME, version: SERVER_VERSION }, {
|
|
22
23
|
capabilities: { tools: {}, resources: {}, prompts: {}, logging: {} },
|
|
23
|
-
|
|
24
|
-
instructions: "Transita scores immigration eligibility across 100+ visa pathways spanning 15+ countries. Start by calling transita_match_visas with the user's profile, or transita_search_by_nationality if they only know their citizenship. Use transita_visa_details and transita_compare_visas to drill in. Before recommending a round-based pathway (Express Entry, AU SkillSelect, US H-1B), call transita_programme_status to confirm it is currently open and see the last cutoff score. The full document checklist + 30-day plan is paid ($49) and lives at https://transita.app/visa/<id>.",
|
|
24
|
+
instructions: `Transita scores immigration eligibility across 100+ visa pathways spanning 15+ countries. Start by calling transita_match_visas with the user's profile, or transita_search_by_nationality if they only know their citizenship. Use transita_visa_details and transita_compare_visas to drill in. Before recommending a round-based pathway (Express Entry, AU SkillSelect, US H-1B), call transita_programme_status to confirm it is currently open and see the last cutoff score. The full document checklist + 30-day plan is paid (${PLAN_PRICE_DISPLAY}) and lives at https://transita.app/visa/<id>.`,
|
|
25
25
|
});
|
|
26
26
|
registerMatchVisas(server);
|
|
27
27
|
registerVisaDetails(server);
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,2BAA2B,EAA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AAM,CAAC,CAAC;IAC3B,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAC5B,oBAAoB,CAAC,MAAM,CAAC,CAAC;IAC7B,uBAAuB,CAAC,MAAM,CAAC,CAAC;IAChC,2BAA2B,CAAC,MAAM,CAAC,CAAC;IACpC,uBAAuB,CAAC,MAAM,CAAC,CAAC;IAChC,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAC1B,eAAe,CAAC,MAAM,CAAC,CAAC;IAExB,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { z } from "zod/v3";
|
|
2
2
|
import { fetchJson } from "../api.js";
|
|
3
|
+
import { PLAN_PRICE_DISPLAY } from "../constants.js";
|
|
3
4
|
export function registerVisaDetails(server) {
|
|
4
5
|
server.registerTool("transita_visa_details", {
|
|
5
6
|
title: "Visa details",
|
|
6
|
-
description:
|
|
7
|
-
// $49 = keep in sync with apps/web/src/lib/pricing.ts PLAN_PRICE_USD
|
|
8
|
-
"Fetch full details for a single visa pathway: eligibility category, processing time, fees, validity, PR timeline, and a free preview of the document checklist (lead time, ancillary cost, first section). The full multi-section checklist is part of Transita's $49 paid action plan.",
|
|
7
|
+
description: `Fetch full details for a single visa pathway: eligibility category, processing time, fees, validity, PR timeline, and a free preview of the document checklist (lead time, ancillary cost, first section). The full multi-section checklist is part of Transita's ${PLAN_PRICE_DISPLAY} paid action plan.`,
|
|
9
8
|
inputSchema: {
|
|
10
9
|
visa_id: z
|
|
11
10
|
.string()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visa-details.js","sourceRoot":"","sources":["../../src/tools/visa-details.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"visa-details.js","sourceRoot":"","sources":["../../src/tools/visa-details.ts"],"names":[],"mappings":"AAAA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enenenenenene/transita-mcp-server",
|
|
5
5
|
"description": "Model Context Protocol server for Transita — visa eligibility matcher, country comparisons, and immigration intelligence inside Claude Desktop, Cursor, Cline, and any MCP-compatible AI assistant.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -39,8 +39,7 @@
|
|
|
39
39
|
"homepage": "https://transita.app/mcp",
|
|
40
40
|
"repository": {
|
|
41
41
|
"type": "git",
|
|
42
|
-
"url": "git+https://github.com/snenenenenenene/transita.git"
|
|
43
|
-
"directory": "packages/mcp-server"
|
|
42
|
+
"url": "git+https://github.com/snenenenenenene/transita-mcp-server.git"
|
|
44
43
|
},
|
|
45
44
|
"engines": {
|
|
46
45
|
"node": ">=20"
|