Skip to content

jim72-commits/MADatabricks-DataSharing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sripad-mcp-server

An Model Context Protocol (MCP) server in Python that supports multiple clients and concurrent agents, using the official python-sdk.

Repository: github.com/sripadlokapure-moodys/MADatabricks-DataSharing

Requirements

  • Python 3.10+
  • MCP SDK 1.2.0+

Setup

Clone (if using Git)

git clone https://github.com/sripadlokapure-moodys/MADatabricks-DataSharing.git
cd MADatabricks-DataSharing

Python environment

python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt

Push this project to the GitHub repo (first-time)

From the project folder, with Git installed and GitHub auth set up:

.\setup-git.ps1

Or manually:

git init
git remote add origin https://github.com/sripadlokapure-moodys/MADatabricks-DataSharing.git
git add .
git commit -m "Initial commit: sripad-mcp-server"
git branch -M main
git push -u origin main

Run the server

Single client (stdio) — for Cursor / Claude Desktop

MCP hosts typically start the server as a subprocess. Default is stdio (one client per process):

python server.py
# or explicitly:
python server.py --transport stdio

The server speaks JSON-RPC over stdin/stdout. Let your MCP host start it; don’t keep it running manually for long.

Multi-client and concurrent agents (streamable HTTP)

To allow multiple clients to connect to one server and multiple agents to call tools at the same time, run with the streamable HTTP transport:

python server.py --transport streamable-http [--host 127.0.0.1] [--port 8000] [--path /mcp]
  • Multiple clients: Many Cursor windows, Claude Desktop instances, or other MCP clients can connect to http://<host>:<port><path> (e.g. http://127.0.0.1:8000/mcp).
  • Concurrent agents: Tools are implemented as async so the server can handle many requests concurrently without blocking.

Example:

python server.py --transport streamable-http --port 8000

Then point clients to http://127.0.0.1:8000/mcp. You can test with MCP Inspector: npx -y @modelcontextprotocol/inspector and connect to that URL.

Add to Cursor

In Cursor settings, open MCP and add a server. Example config (edit paths as needed):

{
  "mcpServers": {
    "sripad-mcp-server": {
      "command": "python",
      "args": ["C:\\Users\\lokapurs\\python-mcp-server\\server.py"],
      "cwd": "C:\\Users\\lokapurs\\python-mcp-server",
      "env": {}
    }
  }
}

If you use a virtualenv, use the venv Python:

"command": "C:\\Users\\lokapurs\\python-mcp-server\\.venv\\Scripts\\python.exe"

Capabilities

Type Name / URI Description
Tool add Add two integers.
Tool greet Return a greeting for a name.
Tool echo Echo a message (for testing).
Resource greeting://{name} Read a greeting for name.
Prompt summarize_prompt Prompt template to summarize a topic.

Extending

  • Tools: Use async def and @mcp.tool() for concurrency; add type hints and docstrings so the SDK can describe them.
  • Resources: Add functions decorated with @mcp.resource("uri://pattern") that return string content.
  • Prompts: Add functions decorated with @mcp.prompt() that return prompt text (e.g. with placeholders).

For stdio transport, avoid writing to stdout (e.g. use print(..., file=sys.stderr) or logging to stderr) so JSON-RPC messages are not corrupted.

About

Provides ability for users to check the Sales Data hosted in COR Databricks application and view Public shared information

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors