fixparser-plugin-mcp 9.1.7-af630b11 → 9.1.7-f34f63d7
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/build/cjs/MCPLocal.js +1 -200
- package/build/cjs/MCPLocal.js.map +2 -2
- package/build/esm/MCPLocal.mjs +1 -202
- package/build/esm/MCPLocal.mjs.map +2 -2
- package/build-examples/cjs/example_mcp_local.js +3 -5
- package/build-examples/cjs/example_mcp_local.js.map +2 -2
- package/build-examples/esm/example_mcp_local.mjs +2 -4
- package/build-examples/esm/example_mcp_local.mjs.map +3 -3
- package/package.json +6 -6
package/build/cjs/MCPLocal.js
CHANGED
|
@@ -1295,17 +1295,7 @@ var MCPLocal = class {
|
|
|
1295
1295
|
version: "1.0.0"
|
|
1296
1296
|
},
|
|
1297
1297
|
{
|
|
1298
|
-
capabilities: {
|
|
1299
|
-
tools: {
|
|
1300
|
-
listChanged: true
|
|
1301
|
-
},
|
|
1302
|
-
prompts: {
|
|
1303
|
-
listChanged: true
|
|
1304
|
-
},
|
|
1305
|
-
resources: {
|
|
1306
|
-
listChanged: true
|
|
1307
|
-
}
|
|
1308
|
-
}
|
|
1298
|
+
capabilities: { tools: {} }
|
|
1309
1299
|
}
|
|
1310
1300
|
);
|
|
1311
1301
|
transport = new import_stdio.StdioServerTransport();
|
|
@@ -1788,195 +1778,6 @@ var MCPLocal = class {
|
|
|
1788
1778
|
throw new Error(`Unknown tool: ${name}`);
|
|
1789
1779
|
}
|
|
1790
1780
|
});
|
|
1791
|
-
this.server.setRequestHandler(import_types.ListPromptsRequestSchema, async () => {
|
|
1792
|
-
return {
|
|
1793
|
-
prompts: [
|
|
1794
|
-
{
|
|
1795
|
-
name: "parse",
|
|
1796
|
-
description: "Parses a FIX message and describes it in plain language",
|
|
1797
|
-
arguments: [
|
|
1798
|
-
{
|
|
1799
|
-
name: "fixString",
|
|
1800
|
-
description: "FIX message string to parse",
|
|
1801
|
-
required: true
|
|
1802
|
-
}
|
|
1803
|
-
]
|
|
1804
|
-
},
|
|
1805
|
-
{
|
|
1806
|
-
name: "parseToJSON",
|
|
1807
|
-
description: "Parses a FIX message into JSON",
|
|
1808
|
-
arguments: [
|
|
1809
|
-
{
|
|
1810
|
-
name: "fixString",
|
|
1811
|
-
description: "FIX message string to parse",
|
|
1812
|
-
required: true
|
|
1813
|
-
}
|
|
1814
|
-
]
|
|
1815
|
-
},
|
|
1816
|
-
{
|
|
1817
|
-
name: "newOrderSingle",
|
|
1818
|
-
description: "Creates and sends a New Order Single",
|
|
1819
|
-
arguments: [
|
|
1820
|
-
{
|
|
1821
|
-
name: "clOrdID",
|
|
1822
|
-
description: "Client Order ID",
|
|
1823
|
-
required: true
|
|
1824
|
-
},
|
|
1825
|
-
{
|
|
1826
|
-
name: "handlInst",
|
|
1827
|
-
description: "Handling instruction",
|
|
1828
|
-
required: false
|
|
1829
|
-
},
|
|
1830
|
-
{
|
|
1831
|
-
name: "quantity",
|
|
1832
|
-
description: "Order quantity",
|
|
1833
|
-
required: true
|
|
1834
|
-
},
|
|
1835
|
-
{
|
|
1836
|
-
name: "price",
|
|
1837
|
-
description: "Order price",
|
|
1838
|
-
required: true
|
|
1839
|
-
},
|
|
1840
|
-
{
|
|
1841
|
-
name: "ordType",
|
|
1842
|
-
description: "Order type",
|
|
1843
|
-
required: false
|
|
1844
|
-
},
|
|
1845
|
-
{
|
|
1846
|
-
name: "side",
|
|
1847
|
-
description: "Order side (1=Buy, 2=Sell)",
|
|
1848
|
-
required: true
|
|
1849
|
-
},
|
|
1850
|
-
{
|
|
1851
|
-
name: "symbol",
|
|
1852
|
-
description: "Trading symbol",
|
|
1853
|
-
required: true
|
|
1854
|
-
},
|
|
1855
|
-
{
|
|
1856
|
-
name: "timeInForce",
|
|
1857
|
-
description: "Time in force",
|
|
1858
|
-
required: false
|
|
1859
|
-
}
|
|
1860
|
-
]
|
|
1861
|
-
},
|
|
1862
|
-
{
|
|
1863
|
-
name: "marketDataRequest",
|
|
1864
|
-
description: "Sends a request for Market Data with the given symbol",
|
|
1865
|
-
arguments: [
|
|
1866
|
-
{
|
|
1867
|
-
name: "mdUpdateType",
|
|
1868
|
-
description: "Market data update type",
|
|
1869
|
-
required: false
|
|
1870
|
-
},
|
|
1871
|
-
{
|
|
1872
|
-
name: "symbol",
|
|
1873
|
-
description: "Trading symbol",
|
|
1874
|
-
required: true
|
|
1875
|
-
},
|
|
1876
|
-
{
|
|
1877
|
-
name: "mdReqID",
|
|
1878
|
-
description: "Market data request ID",
|
|
1879
|
-
required: true
|
|
1880
|
-
},
|
|
1881
|
-
{
|
|
1882
|
-
name: "subscriptionRequestType",
|
|
1883
|
-
description: "Subscription request type",
|
|
1884
|
-
required: false
|
|
1885
|
-
},
|
|
1886
|
-
{
|
|
1887
|
-
name: "mdEntryType",
|
|
1888
|
-
description: "Market data entry type",
|
|
1889
|
-
required: false
|
|
1890
|
-
}
|
|
1891
|
-
]
|
|
1892
|
-
}
|
|
1893
|
-
]
|
|
1894
|
-
};
|
|
1895
|
-
});
|
|
1896
|
-
this.server.setRequestHandler(import_types.GetPromptRequestSchema, async (request) => {
|
|
1897
|
-
const { name, arguments: args } = request.params;
|
|
1898
|
-
switch (name) {
|
|
1899
|
-
case "parse": {
|
|
1900
|
-
const fixString = args?.fixString || "";
|
|
1901
|
-
return {
|
|
1902
|
-
messages: [
|
|
1903
|
-
{
|
|
1904
|
-
role: "user",
|
|
1905
|
-
content: {
|
|
1906
|
-
type: "text",
|
|
1907
|
-
text: `Please parse and explain this FIX message: ${fixString}`
|
|
1908
|
-
}
|
|
1909
|
-
}
|
|
1910
|
-
]
|
|
1911
|
-
};
|
|
1912
|
-
}
|
|
1913
|
-
case "parseToJSON": {
|
|
1914
|
-
const fixString = args?.fixString || "";
|
|
1915
|
-
return {
|
|
1916
|
-
messages: [
|
|
1917
|
-
{
|
|
1918
|
-
role: "user",
|
|
1919
|
-
content: {
|
|
1920
|
-
type: "text",
|
|
1921
|
-
text: `Please parse the FIX message to JSON: ${fixString}`
|
|
1922
|
-
}
|
|
1923
|
-
}
|
|
1924
|
-
]
|
|
1925
|
-
};
|
|
1926
|
-
}
|
|
1927
|
-
case "newOrderSingle": {
|
|
1928
|
-
const { clOrdID, handlInst, quantity, price, ordType, side, symbol, timeInForce } = args || {};
|
|
1929
|
-
return {
|
|
1930
|
-
messages: [
|
|
1931
|
-
{
|
|
1932
|
-
role: "user",
|
|
1933
|
-
content: {
|
|
1934
|
-
type: "text",
|
|
1935
|
-
text: [
|
|
1936
|
-
"Create a New Order Single FIX message with the following parameters:",
|
|
1937
|
-
`- ClOrdID: ${clOrdID}`,
|
|
1938
|
-
`- HandlInst: ${handlInst ?? "default"}`,
|
|
1939
|
-
`- Quantity: ${quantity}`,
|
|
1940
|
-
`- Price: ${price}`,
|
|
1941
|
-
`- OrdType: ${ordType ?? "default (Market)"}`,
|
|
1942
|
-
`- Side: ${side}`,
|
|
1943
|
-
`- Symbol: ${symbol}`,
|
|
1944
|
-
`- TimeInForce: ${timeInForce ?? "default (Day)"}`,
|
|
1945
|
-
"",
|
|
1946
|
-
"Format the response as a JSON object with FIX tag numbers as keys and their corresponding values."
|
|
1947
|
-
].join("\n")
|
|
1948
|
-
}
|
|
1949
|
-
}
|
|
1950
|
-
]
|
|
1951
|
-
};
|
|
1952
|
-
}
|
|
1953
|
-
case "marketDataRequest": {
|
|
1954
|
-
const { mdUpdateType, symbol, mdReqID, subscriptionRequestType, mdEntryType } = args || {};
|
|
1955
|
-
return {
|
|
1956
|
-
messages: [
|
|
1957
|
-
{
|
|
1958
|
-
role: "user",
|
|
1959
|
-
content: {
|
|
1960
|
-
type: "text",
|
|
1961
|
-
text: [
|
|
1962
|
-
"Create a Market Data Request FIX message with the following parameters:",
|
|
1963
|
-
`- MDUpdateType: ${mdUpdateType ?? "default (0 = FullRefresh)"}`,
|
|
1964
|
-
`- Symbol: ${symbol}`,
|
|
1965
|
-
`- MDReqID: ${mdReqID}`,
|
|
1966
|
-
`- SubscriptionRequestType: ${subscriptionRequestType ?? "default (0 = Snapshot + Updates)"}`,
|
|
1967
|
-
`- MDEntryType: ${mdEntryType ?? "default (0 = Bid)"}`,
|
|
1968
|
-
"",
|
|
1969
|
-
"Format the response as a JSON object with FIX tag numbers as keys and their corresponding values."
|
|
1970
|
-
].join("\n")
|
|
1971
|
-
}
|
|
1972
|
-
}
|
|
1973
|
-
]
|
|
1974
|
-
};
|
|
1975
|
-
}
|
|
1976
|
-
default:
|
|
1977
|
-
throw new Error(`Unknown prompt: ${name}`);
|
|
1978
|
-
}
|
|
1979
|
-
});
|
|
1980
1781
|
process.on("SIGINT", async () => {
|
|
1981
1782
|
await this.server.close();
|
|
1982
1783
|
process.exit(0);
|