@code-context-engine/mcp 0.1.4 → 0.1.5
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/dist/remoteMcpServer.js +14 -2
- package/package.json +1 -1
package/dist/remoteMcpServer.js
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
3
3
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
4
4
|
import { z } from 'zod';
|
|
5
|
+
import { realpathSync } from 'node:fs';
|
|
5
6
|
import { isAbsolute } from 'node:path';
|
|
6
|
-
import { pathToFileURL } from 'node:url';
|
|
7
|
+
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
7
8
|
import { loadConfig, resolveRemoteUrl } from '@code-context-engine/shared';
|
|
8
9
|
import { CodebaseContextInputError, runCodebaseContext } from './codebaseContext.js';
|
|
9
10
|
import { RemoteApiError, remoteQuotaErrorMessage } from './remoteClient.js';
|
|
@@ -143,7 +144,18 @@ export function createRemoteMcpServer() {
|
|
|
143
144
|
async function main() {
|
|
144
145
|
await createRemoteMcpServer().connect(new StdioServerTransport());
|
|
145
146
|
}
|
|
146
|
-
|
|
147
|
+
function isExecutedDirectly() {
|
|
148
|
+
const entry = process.argv[1];
|
|
149
|
+
if (!entry)
|
|
150
|
+
return false;
|
|
151
|
+
try {
|
|
152
|
+
return realpathSync(fileURLToPath(import.meta.url)) === realpathSync(entry);
|
|
153
|
+
}
|
|
154
|
+
catch {
|
|
155
|
+
return import.meta.url === pathToFileURL(entry).href;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
if (isExecutedDirectly()) {
|
|
147
159
|
main().catch((err) => {
|
|
148
160
|
console.error(err);
|
|
149
161
|
process.exit(1);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@code-context-engine/mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "MCP server that gives Claude Code, Cursor, and any MCP client real codebase context without burning tokens — incremental sync, hybrid dense+sparse+symbol-graph retrieval, token-budgeted context packs.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://codesay.ai",
|