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

servidor MCP-JS
Un SDK de JavaScript no oficial para el protocolo de contexto del modelo
3 years
Works with Finder
1
Github Watches
3
Github Forks
2
Github Stars
MCP Server - JavaScript SDK
This is an unofficial JavaScript SDK for Model Context Protocol.
Usage
Import the package to your project:
npm install mcp-js-server
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_jOA2yttK
I've been using mcp-js-server by davlgd, and it's been fantastic! This Node.js server is highly reliable and easy to set up. The comprehensive documentation available at the GitHub link makes it simple to get started, and the project is well-maintained. It's an excellent choice for anyone looking to create robust applications quickly. Highly recommended!