The MCP Server provides a standardized interface for accessing search tools and performing calculations:
- Search Wikipedia: Query Wikipedia for articles and retrieve titles, summaries, and URLs
- Search GitHub: Query GitHub for repositories, retrieving details like repository name, description, star count, language, and URL
- Calculate Sum: Add two numbers together
MCP Server
A simple Model Context Protocol (MCP) server implementation that provides tool functionality through a standardized interface. This server implements search tools for Wikipedia and GitHub repositories, but is easily extendable.
Overview
This server uses the @modelcontextprotocol/sdk
to create a standardized way of exposing tools to MCP clients. It runs over stdio transport, making it suitable for integration with various client applications.
Features
- Implements MCP Server specification
- Uses stdio transport for communication
- Provides Wikipedia and GitHub search functionality
Available Tools
wikipedia_search
A tool that searches Wikipedia for articles matching the given query.
Input Schema:
Response: The tool returns a formatted text response containing up to 3 matching articles, each with:
- Title
- Summary
- URL
github_search
A tool that searches GitHub for repositories matching the given query.
Input Schema:
Response: The tool returns a formatted text response containing up to 3 matching repositories, each with:
- Repository name (owner/repo)
- Description
- Star count
- Primary language
- Repository URL
Technical Details
- Server Name: mcp-server
- Version: 1.0.0
- Transport: StdioServerTransport
- SDK: @modelcontextprotocol/sdk
Getting Started
- Install dependencies:
- Run the server:
- Meant to be used with an MCP client, for example this one. Usage with that client would look like this:
Error Handling
The server implements standard MCP error handling. If an unknown method is called, it will return a MethodNotFound
error.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Copyright (c) 2024
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
You must be authenticated.
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
A simple Model Context Protocol server that provides standardized tool functionality, currently implementing a basic calculator for adding two numbers together.
Related MCP Servers
- AsecurityFlicenseAqualityA server that provides tools for performing basic arithmetic operations (addition, subtraction, multiplication, division) via the Model Context Protocol.Last updated -4JavaScript
- AsecurityFlicenseAqualityA simple server that provides basic arithmetic operations (addition, subtraction, multiplication, division) as tools that can be called by Large Language Models through the Model Context Protocol.Last updated -4JavaScript
- AsecurityFlicenseAqualityA simple Model Context Protocol server that provides basic arithmetic operations (addition, subtraction, multiplication, division) as tools that can be called by Large Language Models.Last updated -4JavaScript
- AsecurityAlicenseAqualityA Model Context Protocol server that provides basic calculator functionality for LLMs, enabling them to perform mathematical operations like addition, subtraction, multiplication, division, modulo, and square root.Last updated -612512TypeScriptMIT License