Note: This project is currently in early research phase. Breaking changes are expected.
MCP Server that allows admins to register custom tools, by installing python packages, to consistently and accurately answer user questions using data.
Sync dependencies:
uv syncRun the tests:
uv run pytestRun the server:
uv run mcp-ckanTo register remote tools just install a Python package that can register MCP tools for your particular datasets. You can see an example at https://github.com/okfn/mcp-ckan-examplepythontools
In a nutshell, you can extend by installing python plugins:
uv pip install "git+https://github.com/okfn/mcp-ckan"
uv pip install "git+https://github.com/okfn/mcp-ckan-examplepythontools"
uv run mcp-ckanThe MCP server is configured to load the tools at startup time by iterating throug all the installed python packages looking for mcp_ckan entrypoints.
The Plugin needs to:
- Be a proper python pip-installable package:
uv init --package mcp-ckan-exampleplugin- Define a
register_tools(mcp)function that register tools in a MCP Server:
def register_tools(mcp):
@mcp.tool()
def greetings_from_examplepythontools():
return "Hello from mcp_ckan_examplepythontools!"- Register a new
mcp_ckanentrypoint in thepyproject.tomlfile that calls theregister_toolsfunction.
[project.entry-points."mcp_ckan"]
mcp-ckan-examplepythontools = "mcp_ckan_examplepythontools:register_tools"This (and other settings) can be configured via the settings.py file (or environment variables if defined).
- Set
MCP_TRANSPORT=stdio(default) for local development and Claude Desktop integration - Set
MCP_TRANSPORT=httpfor remote infrastructure deployment - Set
MCP_HOSTandMCP_PORTto control the server's host and port (default: 127.0.0.1:8063).
Create the file .vscode/mcp.json:
{
"servers": {
"mybcie-server": {
"url": "http://127.0.0.1:8063",
"type": "http"
}
},
"inputs": []
}This tool allows you to test tools locally without any AI model.
npx @modelcontextprotocol/inspector uv run mcp-ckan