Glean Local MCP Server for Testing
Use this local MCP server for experimental testing; prefer Glean's integrated remote MCP server for production and Glean CLI for local workflows.
npx -y @gleanwork/mcp-serverOverview
Glean Local MCP Server is a lightweight, local implementation of a Model Context Protocol (MCP) server intended for experimental testing and development. It provides a local endpoint that mimics the behavior of Glean’s MCP API so you can validate client integrations, exercise configuration changes, and run automated tests without contacting a production service.
This local server is for development scenarios only. For production use and the most seamless experience, prefer Glean’s integrated remote MCP server (see Glean docs) and use the Glean CLI for common local workflows. The local MCP server is useful when you need a controlled, reproducible environment for debugging or CI validation.
Features
- Local MCP API endpoint for testing MCP clients and integrations
- Package-based monorepo with separate modules for running the server and configuring clients
- @gleanwork/local-mcp-server — the server runtime
- @gleanwork/configure-mcp-server — helpers for configuring popular MCP clients
- Run locally with npx or inside a container (Docker)
- Minimal configuration surface to simulate auth, routing, and simple responses
- Intended for ephemeral/test environments—no production guarantees
Installation / Configuration
Run the server directly with npx (good for quick testing):
# Run the local MCP server once via npx
Common flags you might pass (example):
# Start on a specific port with optional verbosity
Docker: run the server in a container for reproducible environments or CI. Replace the image name with the official image referenced in the package README if available.
# Example: run a container mapping port 8080
Docker Compose example:
version: "3.8"
services:
local-mcp:
image: gleanwork/local-mcp-server:latest
ports:
- "8080:8080"
environment:
MCP_LOG_LEVEL: debug
MCP_PORT: 8080
Basic environment variables (typical options — check the package README for the exact list):
| Variable | Purpose | Example |
|---|---|---|
| MCP_PORT | Port the server listens on | 8080 |
| MCP_LOG_LEVEL | Logging verbosity (info/debug/error) | debug |
| MCP_AUTH_KEY | Simple token used to simulate auth | test-token |
Client configuration example (point your MCP client at the local server):
Available Tools / Resources
- Repository: https://github.com/gleanwork/mcp-server — source, issues, and contribution guidelines
- Packages in the monorepo:
- @gleanwork/local-mcp-server — run the local MCP server
- @gleanwork/configure-mcp-server — helpers and presets for common MCP clients
- Documentation: Glean docs for the recommended remote MCP server and admin information
- Support: open issues on the GitHub repo or contact [email protected] for product-level questions
Use Cases
- Local integration testing
- Run the local MCP server in your dev environment and point your MCP client at http://localhost:8080 to verify request/response shapes and basic auth handling.
- Component-level CI tests
- Start the server in your test job (Docker container or npx) to provide a deterministic MCP endpoint for unit and integration tests. Teardown automatically when tests complete.
- Debugging client behavior
- Reproduce a failing request flow without involving network calls to remote services; inspect logs and tweak responses or configuration quickly.
- Prototyping MCP client features
- Implement new client logic against a local server prior to rolling changes to a shared or remote MCP server.
Concrete example: run a quick end-to-end test
- Start the local server:
- Configure your client to use http://localhost:8080 and auth token test-token.
- Run your test suite; the local server will return simulated MCP responses and logs for debugging.
Notes and Recommendations
- This server is designed for experimentation and test scenarios only. For production workloads and ongoing development workflows, use Glean’s integrated remote MCP server and the Glean CLI, which offer automatic updates, managed infrastructure, and production-grade performance.
- Refer to the individual package READMEs in the repository for up-to-date flags, environment variables, Docker images, and advanced configuration options.
- Contributions and issues are handled via the GitHub repository; follow the CONTRIBUTING.md guidelines in the repo to propose changes or report bugs.