Local LLM MCP server
A Node.js MCP server that exposes utility and sample HRMS tools over Streamable HTTP with shared bearer-token authentication, enabling local LLM gateways to call them in read-only mode.
README
Local LLM MCP server
A trusted-backend MCP server built with Node.js and FastMCP. It exposes tools over the MCP Streamable HTTP transport at http://127.0.0.1:3333/mcp and authenticates every MCP request with one shared bearer token.
There is no OAuth, user login, or browser connect flow. Keep this service on localhost or a private network that only the gateway can reach: possession of the shared token grants access to every registered tool.
Run locally
Requires Node.js 22 or later.
npm install
cp .env.example .env
# Replace MCP_SERVICE_TOKEN in .env with a long random secret.
npm start
For development with file watching, use npm run dev. For a compiled production run, use npm run build followed by npm run start:prod.
The server defaults to HOST=127.0.0.1, PORT=3333, and the fixed endpoint /mcp. Bind to a private interface only when the gateway runs on another machine.
Tools
All current tools are named so the gateway exposes them in its default read_only mode:
get_server_time— returns the current UTC time as an ISO string.get_echo— returns a supplied message to verify tool arguments and results.list_examples— returns sample calls/tools and supports an optionallimit.list_hrms_employees— returns sample employees and supports optional department and employment-status filters. Its isolated mock data source can later be replaced with the real HRMS API.
X-User-Email is accepted when supplied and stored in the FastMCP session as userEmail. It is optional and is not currently used to authorize or scope tools.
Project structure
src/
├── index.ts # Process startup and shutdown
├── config.ts # Environment parsing and validation
├── server.ts # FastMCP server construction
├── auth/
│ └── service-token.ts # Shared bearer-token authentication
└── tools/
├── index.ts # Central tool-group registration
├── basic/
│ ├── index.ts
│ ├── get-server-time.ts
│ ├── get-echo.ts
│ └── list-examples.ts
└── hrms/
├── index.ts
├── list-employees.ts # MCP schema and execution adapter
├── sample-data.ts # Temporary mock data and filtering
└── types.ts
test/
├── index.ts # Test entrypoint
├── auth.test.ts
├── config.test.ts
└── hrms.test.ts
Each domain owns its tools and exports one registration function from its index.ts. The central src/tools/index.ts is the only place that connects tool groups to the server.
When the real HRMS API is available, add an src/integrations/hrms/ client and replace the call to listSampleEmployees inside list-employees.ts. Keep API credentials in environment variables, HTTP handling in the integration client, and the MCP parameter schema in the tool file.
For another domain, create src/tools/<domain>/, export register<Domain>Tools, and add that group to src/tools/index.ts. Use a read-style tool name (get_, list_, search_, and similar) when it should remain visible under the gateway's default read_only policy.
Connect the local LLM gateway
In /home/manoj/newlaptop/projects/python/local-ai-model-gateway/.env, set:
MCP_SERVER_URL=http://localhost:3333/mcp
MCP_AUTH_TOKEN=<the same value as this server's MCP_SERVICE_TOKEN>
MCP_TOOL_MODE=read_only
For write tools added later, switch to MCP_TOOL_MODE=allowlist and set MCP_TOOL_ALLOWLIST to exact comma-separated tool names, or deliberately use all. Restart the gateway after changing its environment.
With a valid gateway JWT, GET /v1/tools should list these tools with backend set to mcp. POST /v1/agent can then select and call them.
Test
npm test
npm run typecheck
For a manual protocol test, start the server and launch MCP Inspector:
npx @modelcontextprotocol/inspector http://localhost:3333/mcp
Configure the Inspector connection to send Authorization: Bearer <the value of MCP_SERVICE_TOKEN>. Missing or incorrect bearer credentials receive HTTP 401.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。