Skip to main content
Glama
GayathriNarayanan1610

MCP Tool Connector

README.md
# MCP Tool Connector

> An MCP server that gives an LLM host (e.g. Claude) two tools: it can **search the
> firm's documents** and **look up a company via an authenticated API** the
> "connect frontier models to our files and data, with auth" use case.

## Demo
Register the server with Claude Desktop, then ask Claude something that triggers
`search_documents`, and something that triggers `lookup_company`. 

<img width="1441" height="840" alt="image" src="https://github.com/user-attachments/assets/9b0b31f5-1caa-49bf-bf7e-cfe72e273912" />


## What it does
Exposes two tools over the Model Context Protocol:
- `search_documents(query, k)` — makes a document folder query-able (no auth).
- `lookup_company(name)` — calls an authenticated external API (bearer token), making
  the **API + authentication** path explicit.

## Authentication (done on purpose)
`lookup_company` reads `DATA_API_TOKEN` from the environment (never hardcoded) and
returns a clear "authentication required" message when it is absent rather than
failing silently. Use a **scoped, read-only** token; full OAuth is the production step.

## Run it
```bash
pip install -r requirements.txt
pytest -q                      # tools work + both register with the MCP server
python server.py               # run as an MCP (stdio) server
```
Then add it to Claude Desktop using `claude_desktop_config.example.json` (use an
absolute path to `server.py`). Confirm the exact MCP SDK usage against the current
docs at modelcontextprotocol.io.

## Built with
Python · MCP Python SDK (FastMCP) · httpx