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