DemoTool Server
БесплатноНе проверенA modular MCP server that provides custom tools for AI assistants to interact with the DemoTool project codebase, starting with a hello world tool.
Описание
A modular MCP server that provides custom tools for AI assistants to interact with the DemoTool project codebase, starting with a hello world tool.
README
A modular Model Context Protocol (MCP) server for the DemoTool project. This server provides custom tools that AI assistants in Cursor can use to better understand and interact with the codebase.
What is MCP?
Model Context Protocol (MCP) is an open protocol that allows AI assistants to securely interact with external data sources and tools. This server exposes project-specific tools that Cursor can use to enhance development workflows.
Project Structure
The server is organized into a modular architecture for easy maintenance and scalability:
mcp-server/
├── src/
│ ├── config/ # Server configuration
│ │ ├── server.config.ts
│ │ └── index.ts
│ ├── server/ # Server setup and request handlers
│ │ ├── setup.ts
│ │ └── index.ts
│ ├── tools/ # Tool implementations
│ │ ├── tool-registry.ts # Tool registry pattern
│ │ ├── hello-world.tool.ts # Example tool
│ │ └── index.ts
│ ├── types/ # TypeScript type definitions
│ │ ├── tool.types.ts
│ │ ├── server.types.ts
│ │ └── index.ts
│ └── index.ts # Main entry point
├── dist/ # Compiled JavaScript output
├── package.json
└── tsconfig.json
Available Tools
This MCP server currently provides:
- hello_world - Returns a friendly hello world message
- Optional parameter:
name(string) - Name to greet, defaults to "World"
- Optional parameter:
Installation
- Install dependencies:
cd mcp-server
npm install
- Build the server:
npm run build
Configuration in Cursor
To integrate this MCP server with Cursor:
Method 1: Using Cursor Settings UI
- Open Cursor Settings
- Navigate to Features → MCP
- Click + Add New MCP Server
- Configure:
- Name:
kids-daily-tool - Type:
stdio - Command:
node /home/fernando/code/kids-daily-tool/mcp-server/dist/index.js
- Name:
Method 2: Manual Configuration (Advanced)
Edit Cursor's MCP configuration file directly:
Linux/Mac: ~/.config/cursor/mcp.json
Windows: %APPDATA%\Cursor\mcp.json
Add this configuration:
{
"mcpServers": {
"kids-daily-tool": {
"command": "node",
"args": ["/home/fernando/code/kids-daily-tool/mcp-server/dist/index.js"],
"env": {}
}
}
}
Usage in Cursor
Once configured, you can use natural language prompts in Cursor Composer to invoke the tool:
- "Say hello to me!"
- "Use the hello_world tool"
- "Call the hello_world MCP tool with name: Fernando"
Cursor will automatically detect when to use the MCP tool and execute it on your behalf. The tool will return a friendly greeting message.
Development
To modify the server:
- Edit files in
src/ - Rebuild:
npm run build - Restart Cursor to pick up changes
Troubleshooting
Server not showing up in Cursor
- Make sure you've built the server (
npm run build) - Verify the path in your configuration is absolute
- Restart Cursor after making configuration changes
Tool errors
- Check the Cursor Developer Console for error messages
- Verify file permissions on the project directory
- Ensure Node.js is available in your PATH
Extending the Server
The modular architecture makes it easy to add new tools. Follow these steps:
1. Create a New Tool
Create a new file in src/tools/, e.g., my-new-tool.tool.ts:
import {
Tool,
ToolDefinition,
ToolArguments,
ToolResult,
} from "../types/index.js";
export class MyNewTool implements Tool {
getDefinition(): ToolDefinition {
return {
name: "my_new_tool",
description: "Description of what your tool does",
inputSchema: {
type: "object",
properties: {
param1: {
type: "string",
description: "Description of param1",
},
},
required: ["param1"],
},
};
}
async execute(args: ToolArguments): Promise<ToolResult> {
// Implement your tool logic here
const result = `Processing: ${args.param1}`;
return {
content: [
{
type: "text",
text: result,
},
],
};
}
}
2. Register the Tool
Add your tool to src/tools/index.ts:
export * from "./my-new-tool.tool.js";
import { MyNewTool } from "./my-new-tool.tool.js";
export function getAllTools(): Tool[] {
return [
new HelloWorldTool(),
new MyNewTool(), // Add your tool here
];
}
3. Rebuild and Test
npm run build
That's it! The tool registry will automatically pick up your new tool.
Architecture Benefits
- Modularity: Each tool is self-contained in its own file
- Type Safety: Full TypeScript support with proper interfaces
- Scalability: Easy to add new tools without modifying core logic
- Maintainability: Clear separation of concerns
- Testability: Individual tools can be tested in isolation
Security Notes
- This server only provides read-only access to project information
- It runs locally and doesn't send data to external services
- Always review MCP server code before integrating it with your editor
Установка DemoTool Server
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/Fernandocgomez/mcp-serverFAQ
DemoTool Server MCP бесплатный?
Да, DemoTool Server MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для DemoTool Server?
Нет, DemoTool Server работает без API-ключей и переменных окружения.
DemoTool Server — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить DemoTool Server в Claude Desktop, Claude Code или Cursor?
Открой DemoTool Server на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
Fetch
Web content fetching and conversion for efficient LLM usage.
AWS KB Retrieval
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
автор: modelcontextprotocolSpring AI MCP Server
Provides auto-configuration for setting up an MCP server in Spring Boot applications.
llm-analysis-assistant
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also
автор: xuzexin-hzCompare DemoTool Server with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории ai
