I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

davlgd_mcp-js-server
Espejo de https: //github.com/davlgd/mcp-js-server
3 years
Works with Finder
0
Github Watches
1
Github Forks
1
Github Stars
MCP Server - JavaScript SDK
This is an unofficial JavaScript SDK for Model Context Protocol.
Usage
Create files to define the server's prompts, resources, and tools.
Prompts
// prompts.js
export const prompts = {
hello_world: {
description: 'A simple prompt that says hello.',
arguments: [],
messages: [{
role: 'assistant',
content: {
type: 'text',
text: 'Hello, world!'
}
}]
}
};
Resources
// resources.js
export const resources = {
apiReference: {
uri: 'https://api.example.com/openapi.json',
mimeType: 'application/json'
}
};
Tools
// tools.js
export const tools = {
simple_tool: {
description: 'A simple tool',
handler: async () => new Date().toLocaleString(),
schema: {
type: 'object',
properties: {},
required: []
}
},
complex_tool: {
description: 'A complex tool',
handler: async ({ param1, param2 }) => {
return `param1: ${param1}, param2: ${param2}`;
},
schema: {
type: 'object',
properties: {
param1: { type: 'string' },
param2: { type: 'string' }
},
required: ['param1', 'param2']
}
}
};
Server
Then create a server instance with the following code:
// server.js
import { MCP } from 'mcp-server';
import { tools } from './tools.js';
import { prompts } from './prompts.js';
import { resources } from './resources.js';
const infos = {
name: 'mcp-demo-server',
version: '0.1.0'
};
const server = new MCP(infos, prompts, resources, tools);
Debugging
You can find logs of the server in your user system logs directory:
Linux: ~/.local/share/logs
macOS: ~/Library/Logs
Windows: %USERPROFILE%\AppData\Local\Logs
相关推荐
Evaluator for marketplace product descriptions, checks for relevancy and keyword stuffing.
Confidential guide on numerology and astrology, based of GG33 Public information
A geek-themed horoscope generator blending Bitcoin prices, tech jargon, and astrological whimsy.
Converts Figma frames into front-end code for various mobile frameworks.
PR Professional: Guiding You to Get Media Placements and Publicity Quickly and Effectively
Advanced software engineer GPT that excels through nailing the basics.
Descubra la colección más completa y actualizada de servidores MCP en el mercado. Este repositorio sirve como un centro centralizado, que ofrece un extenso catálogo de servidores MCP de código abierto y propietarios, completos con características, enlaces de documentación y colaboradores.
Manipulación basada en Micrypthon I2C del expansor GPIO de la serie MCP, derivada de AdaFruit_MCP230xx
Una puerta de enlace de API unificada para integrar múltiples API de explorador de blockchain similar a Esterscan con soporte de protocolo de contexto modelo (MCP) para asistentes de IA.
Espejo dehttps: //github.com/agentience/practices_mcp_server
Espejo de https: //github.com/bitrefill/bitrefill-mcp-server
Reviews

user_CJx4JTAs
As a dedicated user of the Hello World MCP Server, I am thoroughly impressed with its performance and reliability. The server, crafted by jageenshukla, provides an excellent platform for managing multiple connections with efficiency. It's user-friendly and seamlessly integrates with various applications, making it an essential tool for my projects. Highly recommended!