MCP-BOS is a modular, extensible Model Context Protocol server framework designed for Claude Desktop. It features automatic module discovery, declarative configuration, and support for the FastMCP standard, allowing you to easily extend AI application functionality without modifying core code.
To get started with MCP-BOS, follow these steps:
git clone https://github.com/kinbos/mcp-bos.git
cd mcp-bos
uv pip install mcp[cli]
Edit the config.json
file to configure the server and its modules:
{
"global": {
"server_name": "MCP-BOS",
"debug": true,
"log_level": "INFO",
"transport": "stdio",
"dependencies": ["mcp[cli]"]
},
"modules": {
"hello_world": {
"enabled": true,
"message": "Hello, {}!"
},
"module_name": {
"enabled": false,
"param1": "value1"
}
}
}
The configuration file consists of two main sections:
You can run the MCP-BOS server in several ways:
Simply run the main script:
python main.py
uv run main.py
To install the server for use with Claude Desktop:
mcp install main.py
For testing and debugging, use the MCP Inspector:
mcp inspect main.py
To create a new module:
modules
folder:mkdir modules/my_module
touch modules/my_module/__init__.py
touch modules/my_module/my_module.py
# modules/my_module/my_module.py
from core.module_interface import ModuleInterface
class MyModule(ModuleInterface):
def get_info(self):
return {
"name": "my_module",
"version": "1.0.0",
"description": "My custom module",
"author": "Your Name",
"email": "[email protected]",
"website": "https://www.example.com"
}
def register(self, server):
@server.tool()
def my_tool(param: str) -> str:
"""Custom tool"""
return f"Processing parameter: {param}"
@server.resource("my://resource")
def my_resource() -> str:
"""Custom resource"""
return "Resource content"
__init__.py
file:# modules/my_module/__init__.py
from .my_module import MyModule
# Export the module class
module_class = MyModule
"modules": {
"my_module": {
"enabled": true
}
}
If your module isn't loading properly:
__init__.py
file exports the module classIf you encounter character encoding problems on Windows:
set PYTHONIOENCODING=utf-8
If you have trouble connecting to Claude Desktop:
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "mcp-bos" '{"command":"python","args":["main.py"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"mcp-bos": {
"command": "python",
"args": [
"main.py"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"mcp-bos": {
"command": "python",
"args": [
"main.py"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect