@meldocio/mcp-stdio-proxy 1.0.21 → 1.0.22
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.
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"source": "github",
|
|
15
15
|
"repo": "meldoc-io/mcp-stdio-proxy"
|
|
16
16
|
},
|
|
17
|
-
"version": "1.0.
|
|
17
|
+
"version": "1.0.22",
|
|
18
18
|
"description": "Connect Claude Desktop, Claude Code, and other MCP clients to your Meldoc documentation workspace. Read, search, create, and update your documentation directly from AI conversations.",
|
|
19
19
|
"author": {
|
|
20
20
|
"name": "Meldoc",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "meldoc-mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.22",
|
|
4
4
|
"description": "Connect Claude Desktop, Claude Code, and other MCP clients to your Meldoc documentation workspace. Read, search, create, and update your documentation directly from AI conversations through the Model Context Protocol.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Meldoc",
|
package/bin/meldoc-mcp-proxy.js
CHANGED
|
@@ -604,6 +604,16 @@ function getToolsList() {
|
|
|
604
604
|
type: 'object',
|
|
605
605
|
properties: {}
|
|
606
606
|
}
|
|
607
|
+
},
|
|
608
|
+
{
|
|
609
|
+
name: 'auth_login',
|
|
610
|
+
description: 'Start interactive login process. Opens browser for authentication. This is equivalent to running: npx @meldocio/mcp-stdio-proxy@latest auth login',
|
|
611
|
+
inputSchema: {
|
|
612
|
+
type: 'object',
|
|
613
|
+
properties: {
|
|
614
|
+
timeout: { type: 'integer', description: 'Timeout in milliseconds (default: 120000)' }
|
|
615
|
+
}
|
|
616
|
+
}
|
|
607
617
|
}
|
|
608
618
|
];
|
|
609
619
|
}
|
|
@@ -793,7 +803,88 @@ async function handleToolsCall(request) {
|
|
|
793
803
|
}
|
|
794
804
|
return;
|
|
795
805
|
}
|
|
796
|
-
|
|
806
|
+
|
|
807
|
+
if (toolName === 'auth_login') {
|
|
808
|
+
try {
|
|
809
|
+
const timeout = arguments_.timeout || 120000;
|
|
810
|
+
|
|
811
|
+
// Check if we can open browser
|
|
812
|
+
if (!canOpenBrowser()) {
|
|
813
|
+
const response = {
|
|
814
|
+
jsonrpc: '2.0',
|
|
815
|
+
id: request.id,
|
|
816
|
+
result: {
|
|
817
|
+
content: [
|
|
818
|
+
{
|
|
819
|
+
type: 'text',
|
|
820
|
+
text: JSON.stringify({
|
|
821
|
+
success: false,
|
|
822
|
+
error: 'Cannot open browser automatically. Please run the command manually: npx @meldocio/mcp-stdio-proxy@latest auth login'
|
|
823
|
+
}, null, 2)
|
|
824
|
+
}
|
|
825
|
+
]
|
|
826
|
+
}
|
|
827
|
+
};
|
|
828
|
+
process.stdout.write(JSON.stringify(response) + '\n');
|
|
829
|
+
if (process.stdout.isTTY) {
|
|
830
|
+
process.stdout.flush();
|
|
831
|
+
}
|
|
832
|
+
return;
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
// Start interactive login
|
|
836
|
+
await interactiveLogin({
|
|
837
|
+
autoOpen: true,
|
|
838
|
+
showQR: false,
|
|
839
|
+
timeout: timeout,
|
|
840
|
+
apiBaseUrl: apiUrl,
|
|
841
|
+
appUrl: appUrl
|
|
842
|
+
});
|
|
843
|
+
|
|
844
|
+
const response = {
|
|
845
|
+
jsonrpc: '2.0',
|
|
846
|
+
id: request.id,
|
|
847
|
+
result: {
|
|
848
|
+
content: [
|
|
849
|
+
{
|
|
850
|
+
type: 'text',
|
|
851
|
+
text: JSON.stringify({
|
|
852
|
+
success: true,
|
|
853
|
+
message: 'Authentication successful! You are now logged in to Meldoc.'
|
|
854
|
+
}, null, 2)
|
|
855
|
+
}
|
|
856
|
+
]
|
|
857
|
+
}
|
|
858
|
+
};
|
|
859
|
+
process.stdout.write(JSON.stringify(response) + '\n');
|
|
860
|
+
if (process.stdout.isTTY) {
|
|
861
|
+
process.stdout.flush();
|
|
862
|
+
}
|
|
863
|
+
} catch (error) {
|
|
864
|
+
const response = {
|
|
865
|
+
jsonrpc: '2.0',
|
|
866
|
+
id: request.id,
|
|
867
|
+
result: {
|
|
868
|
+
content: [
|
|
869
|
+
{
|
|
870
|
+
type: 'text',
|
|
871
|
+
text: JSON.stringify({
|
|
872
|
+
success: false,
|
|
873
|
+
error: error.message || 'Authentication failed',
|
|
874
|
+
hint: 'You can try again or run: npx @meldocio/mcp-stdio-proxy@latest auth login'
|
|
875
|
+
}, null, 2)
|
|
876
|
+
}
|
|
877
|
+
]
|
|
878
|
+
}
|
|
879
|
+
};
|
|
880
|
+
process.stdout.write(JSON.stringify(response) + '\n');
|
|
881
|
+
if (process.stdout.isTTY) {
|
|
882
|
+
process.stdout.flush();
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
return;
|
|
886
|
+
}
|
|
887
|
+
|
|
797
888
|
// All other tools are forwarded to backend
|
|
798
889
|
log(LOG_LEVELS.DEBUG, `Forwarding tool ${toolName} to backend (not a local tool)`);
|
|
799
890
|
await processSingleRequest(request);
|
package/package.json
CHANGED