- Home
- MCP servers
- MCP Learning
MCP Learning
- javascript
0
GitHub Stars
javascript
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"sadjad-chrono-mcp-learning": {
"command": "npx",
"args": [
"-y",
"@sadjadteh-chrono/mcp-learning"
]
}
}
}You can run an MCP server that provides a simple arithmetic toolset for AI assistants. This server lets clients perform basic additions and exposes an easy way to integrate into MCP workflows, enabling quick, reliable calculations within conversations.
How to use
Use an MCP client to connect to the server and access available tools. After you configure the MCP server, you will see MCP tools surfaced in your client interface (often indicated by an icon like a plug or a hammer). You can then invoke the add tool by asking your assistant to perform arithmetic, for example: “add 5 and 3.” The server returns a structured result that your assistant can present in conversation.
Practical usage patterns include: combining the add tool into multi-step calculations, validating numeric inputs, and chaining results into follow-up questions. You can also build longer workflows by registering additional arithmetic-like tools in the future.
How to install
Prerequisites you need before starting: Node.js 18 or higher, and a package manager such as npm, pnpm, or yarn.
# Clone the MCP server repository
git clone https://github.com/sadjad-chrono/mcp-learning.git
cd mcp-learning
# Install dependencies
pnpm install
# or
npm install
# Build the project
pnpm build
# or
npm run build
Configuration and usage with Claude Desktop
To enable Claude Desktop to use the MCP server, add an MCP server entry to your Claude configuration. There are several ways to run the MCP server depending on how you want to deploy it.
{
"mcpServers": {
"mcp-learning": {
"command": "npx",
"args": [
"-y",
"@sadjadteh-chrono/mcp-learning"
]
}
}
}
{
"mcpServers": {
"mcp-learning": {
"command": "node",
"args": [
"/absolute/path/to/mcp-learning/dist/mcpserver/index.js"
]
}
}
}
{
"mcpServers": {
"mcp-learning": {
"command": "npx",
"args": [
"-y",
"tsx",
"/absolute/path/to/mcp-learning/src/mcpserver/index.ts"
]
}
}
}
Restart and verify
After adding the configuration, restart Claude Desktop to load the new MCP server. Once Claude restarts, open a new conversation and look for the MCP tool indicator (🔌 or hammer icon). Try invoking the add tool by asking Claude to “add 5 and 3.”
Development
If you want to explore or modify the server locally, you can run it in development mode or inspect its source. The project includes a main MCP server implementation and tooling to test tools directly.
Adding New Tools
To extend the MCP server with new tools, edit the core server source and register the new tool with its input and output schemas. The following example shows how a tool named tool-name can be added, including a description and simple input/output handling.
server.registerTool(
"tool-name",
{
title: "Tool Title",
description: "What the tool does",
inputSchema: {
param1: z.string().describe("Description of param1"),
// Add more parameters
},
outputSchema: { result: z.string() },
},
async ({ param1 }) => {
// Tool implementation
return {
content: [{ type: "text", text: "result" }],
structuredContent: { result: "result" },
};
}
);
Development commands
# Build the project
pnpm build
# Run in development mode
pnpm dev
# Run in development mode with auto-reload
pnpm dev:watch
# Run with debugger
pnpm debug
# Clean build artifacts
pnpm clean
Testing the server
You can test the server using a MCP inspector or by running the server locally and invoking the tool through an MCP client. The inspector allows you to interact with the MCP server and validate tool responses in a web interface.
Publishing
When you are ready to publish your server or share it with others, you can package and publish the MCP server according to your preferred distribution workflow. Use standard npm/pnpm workflows to build and distribute your package.
Available tools
add
Adds two numbers and returns a structured result.