hello-fastmcp-tool-demo-new
v1.0.4
Published
A simple FastMCP tool that returns 'HelloFastMCP!'
Readme
Hello FastMCP Tool Demo New
A simple FastMCP tool that returns "HelloFastMCP!" when called.
Installation
npm install hello-fastmcp-tool-demo-newUsage
As a standalone server
npx hello-fastmcp-tool-demo-newOr add to your package.json scripts:
{
"scripts": {
"start": "hello-fastmcp-tool-demo-new"
}
}As a library
const { createHelloServer, startServer } = require('hello-fastmcp-tool-demo-new');
// Create the server
const server = createHelloServer({ port: 8002 });
// Start the server
startServer(server, { port: 8002 });Programmatic usage
const { createHelloServer } = require('hello-fastmcp-tool-demo-new');
const server = createHelloServer({ port: 8002 });
// Add additional tools if needed
server.addTool({
name: "goodbye",
description: "Outputs 'Goodbye!'",
execute: async () => {
return "Goodbye!";
},
});
server.start({
transportType: "httpStream",
httpStream: {
port: 8002,
},
});MCP Configuration
The package includes an mcp.config.json file that can be used by MCP-compatible agents to discover and connect to the server:
{
"mcpServers": {
"hello-fastmcp": {
"command": "npx",
"args": ["hello-fastmcp-tool-demo-new"]
}
}
}Tool Details
helloFastMCP
- Description: Outputs "HelloFastMCP!"
- Parameters: None
- Returns: "HelloFastMCP!" string
