@code-context-engine/mcp 0.1.3 → 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/README.md +4 -4
- package/dist/remoteMcpServer.js +14 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -7,13 +7,13 @@ Remote MCP server for [Context Engine](https://codesay.ai). One tool — `codeba
|
|
|
7
7
|
MCP clients should invoke via `npx` so each session pulls the current release:
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
npx -y @code-context-engine/mcp
|
|
10
|
+
npx -y @code-context-engine/mcp@latest
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
Or install globally:
|
|
13
|
+
Or install globally (also tracks latest on reinstall):
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
npm install -g @code-context-engine/mcp
|
|
16
|
+
npm install -g @code-context-engine/mcp@latest
|
|
17
17
|
context-engine
|
|
18
18
|
```
|
|
19
19
|
|
|
@@ -28,7 +28,7 @@ context-engine
|
|
|
28
28
|
"mcpServers": {
|
|
29
29
|
"context-engine": {
|
|
30
30
|
"command": "npx",
|
|
31
|
-
"args": ["-y", "@code-context-engine/mcp"],
|
|
31
|
+
"args": ["-y", "@code-context-engine/mcp@latest"],
|
|
32
32
|
"env": {
|
|
33
33
|
"CONTEXT_ENGINE_REMOTE_API_KEY": "<your cek_ key>"
|
|
34
34
|
}
|
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",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
],
|
|
29
29
|
"type": "module",
|
|
30
30
|
"bin": {
|
|
31
|
-
"context-engine": "
|
|
31
|
+
"context-engine": "dist/remoteMcpServer.js"
|
|
32
32
|
},
|
|
33
33
|
"exports": {
|
|
34
34
|
".": {
|