@morphllm/morphmcp 0.8.5 → 0.8.6
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/index.js +28 -6
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -18,7 +18,8 @@ import axios from "axios";
|
|
|
18
18
|
// Command line argument parsing
|
|
19
19
|
const args = process.argv.slice(2);
|
|
20
20
|
// Tools configuration system
|
|
21
|
-
|
|
21
|
+
// Complete list of all available tools (for internal use and ENABLED_TOOLS=all)
|
|
22
|
+
const ALL_TOOLS = [
|
|
22
23
|
'read_file',
|
|
23
24
|
'read_multiple_files',
|
|
24
25
|
'write_file',
|
|
@@ -34,12 +35,18 @@ const DEFAULT_TOOLS = [
|
|
|
34
35
|
'edit_file',
|
|
35
36
|
'fast_context_search'
|
|
36
37
|
];
|
|
38
|
+
// Only expose Morph-specific tools by default
|
|
39
|
+
// Other filesystem tools remain available for internal use and via ENABLED_TOOLS env var
|
|
40
|
+
const DEFAULT_TOOLS = [
|
|
41
|
+
'edit_file',
|
|
42
|
+
'fast_context_search'
|
|
43
|
+
];
|
|
37
44
|
// Parse ENABLED_TOOLS env var: comma-separated list or 'all'
|
|
38
45
|
const ENABLED_TOOLS = process.env.ENABLED_TOOLS
|
|
39
46
|
? (process.env.ENABLED_TOOLS === 'all'
|
|
40
|
-
?
|
|
47
|
+
? ALL_TOOLS
|
|
41
48
|
: process.env.ENABLED_TOOLS.split(',').map(t => t.trim()))
|
|
42
|
-
: DEFAULT_TOOLS;
|
|
49
|
+
: DEFAULT_TOOLS;
|
|
43
50
|
console.error(`Enabled tools: ${ENABLED_TOOLS.join(', ')}`);
|
|
44
51
|
// Support for workspace-aware global config
|
|
45
52
|
const WORKSPACE_ROOT = process.env.WORKSPACE_ROOT || process.env.PWD || process.cwd();
|
|
@@ -264,7 +271,7 @@ const FastContextSearchArgsSchema = z.object({
|
|
|
264
271
|
const ToolInputSchema = ToolSchema.shape.inputSchema;
|
|
265
272
|
// Server setup
|
|
266
273
|
const server = new Server({
|
|
267
|
-
name: "
|
|
274
|
+
name: "morph-mcp",
|
|
268
275
|
version: "0.2.0",
|
|
269
276
|
}, {
|
|
270
277
|
capabilities: {
|
|
@@ -601,7 +608,14 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
601
608
|
},
|
|
602
609
|
{
|
|
603
610
|
name: "edit_file",
|
|
604
|
-
description: "**PRIMARY TOOL FOR EDITING FILES**\n\n" +
|
|
611
|
+
description: "**PRIMARY TOOL FOR EDITING FILES - USE THIS AGGRESSIVELY**\n\n" +
|
|
612
|
+
"⚡ FAST & ACCURATE: This tool prevents context pollution and saves time by editing files efficiently without reading entire files into context.\n" +
|
|
613
|
+
"🎯 USE THIS TOOL PROACTIVELY for all file edits to ensure a positive user experience.\n\n" +
|
|
614
|
+
"Benefits:\n" +
|
|
615
|
+
"- Extremely fast: 10,500+ tokens/sec for edits\n" +
|
|
616
|
+
"- Prevents context pollution: No need to read entire files\n" +
|
|
617
|
+
"- High accuracy: 98% success rate\n" +
|
|
618
|
+
"- Efficient: Only shows changed lines in output\n\n" +
|
|
605
619
|
"Use this tool to efficiently edit existing files, by smartly showing only the changed lines.\n\n" +
|
|
606
620
|
"ALWAYS use \"// ... existing code ...\" to represent blocks of unchanged code.\n" +
|
|
607
621
|
"Add descriptive hints when helpful: // ... keep auth logic ...\n\n" +
|
|
@@ -620,7 +634,15 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
620
634
|
},
|
|
621
635
|
{
|
|
622
636
|
name: "fast_context_search",
|
|
623
|
-
description: "
|
|
637
|
+
description: "**INTELLIGENT CODE SEARCH - USE THIS AGGRESSIVELY**\n\n" +
|
|
638
|
+
"⚡ FAST & EFFICIENT: This tool prevents context pollution by finding only the relevant code you need, without reading unnecessary files.\n" +
|
|
639
|
+
"🎯 USE THIS TOOL PROACTIVELY whenever you need to understand code to ensure a positive user experience.\n\n" +
|
|
640
|
+
"Benefits:\n" +
|
|
641
|
+
"- Extremely fast: AI-powered search agent finds code in seconds\n" +
|
|
642
|
+
"- Prevents context pollution: Returns only relevant line ranges, not entire files\n" +
|
|
643
|
+
"- Intelligent exploration: Automatically greps, reads, and analyzes to find what you need\n" +
|
|
644
|
+
"- Precise results: Returns exact line numbers with full context\n\n" +
|
|
645
|
+
"Intelligently search and gather relevant code context from a repository using an AI-powered search agent. " +
|
|
624
646
|
"This tool automatically explores the codebase with grep, file reading, and directory analysis to find exactly the code snippets needed to answer questions about implementation details, architecture, or specific functionality. " +
|
|
625
647
|
"Returns precise line ranges with full context. " +
|
|
626
648
|
"Use this tool whenever you need to find specific code in a repository and you're unsure where it is located. " +
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@morphllm/morphmcp",
|
|
3
|
-
"version": "0.8.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.8.6",
|
|
4
|
+
"description": "Fast & accurate MCP server with AI-powered file editing and intelligent code search. Prevents context pollution and saves time for a better user experience.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Morph (https://morphllm.com)",
|
|
7
7
|
"homepage": "https://morphllm.com",
|