marklogic_mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@marklogic_mcpSearch for documents about 'cloud migration' in the 'projects' collection."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
marklogic_mcp
An MCP server for MarkLogic: read, write, search, query, and schema-validate documents across configured environments.
Tools
Tool | Purpose |
| Fetch a document by URI. |
| Insert/replace a document, with collections and permissions. |
| Search by full-text query and/or collection; returns total + URIs. |
| Run XQuery. Updates permitted. |
| Run XQuery with updates rejected. Use for all read/inspect work. |
| Run XQuery and write the results to a local file. |
| Validate stored documents against their in-scope XSD. |
database is required on every tool. server selects the environment and defaults to
default_server from the config.
Related MCP server: MarkLogic MCP Server by CData
Setup
uv sync # or: python -m venv .venv && pip install -e .
cp config.yaml.example config.yaml # then fill in, or export the ${...} vars
cp config-local.yaml.example config-local.yamlBoth real config files are gitignored because they hold credentials. config.py
interpolates ${VAR} from the environment and raises if a referenced variable is unset,
so prefer environment variables over writing passwords into the file.
Select a config with ML_CONFIG_PATH:
ML_CONFIG_PATH=config-local.yaml .venv/bin/python src/server.pyRegister with Claude Code as a stdio server, pointing ML_CONFIG_PATH at the config you
want that entry to use. Two entries against different configs (e.g. local vs
dev/prod) is a convenient way to keep environments apart.
Changes require a restart. The server is a long-lived stdio process; edits to
src/do not take effect until the MCP client restarts it.
Tests
.venv/bin/python tests/test_readonly_enforcement.pyThe suite performs real writes and therefore hard-asserts that the loaded config
declares exactly one server named local on localhost, refusing to run otherwise. It
cannot reach dev or prod. It cleans up after itself and verifies it has done so.
Each blocking test asserts the absence of a side effect, not merely that an exception was raised — an exception alone can come from a syntax error and would pass vacuously. That distinction is what caught the read-only bug described below.
Behaviour worth knowing
Errors are raised, never returned. A call that returns without error succeeded.
Failures surface as MarkLogicError carrying the parsed MarkLogic message code
(XDMP-NOSUCHDB, RESTAPI-NODOCUMENT, XDMP-UPDATEFUNCTIONFROMQUERY, …), the primary
diagnostic, and any stack frames — MarkLogic reports faults as HTML from /v1/eval and as
JSON from /v1/documents, and neither is readable raw. TIMEOUT and CONNECTION are
flagged retryable.
Read-only enforcement uses the <update>false</update> eval option, not a
declare option xdmp:transaction-mode "query" prolog. Do not "simplify" it back; two
separate bugs live down that road, and both are covered by tests:
The prolog does not reach the query body when a database is named — and because
databaseis a required parameter, that was every call, soeval_xquery_readonlysilently permitted writes.The prolog is session-scoped, and the session is bound to the keep-alive HTTP connection — so one read-only query left the connection in query mode and broke every subsequent write on the same client.
XQuery string escaping doubles quotes (" → ""); XQuery has no backslash escapes.
All interpolation goes through _xq_str().
validate_documents needs an XSD loaded in the schema database attached to the target
database (e.g. protein-schemas). If none is loaded, the result carries
schema_in_scope: false plus a warning, because otherwise lax mode would report
invalid: 0 — a clean-looking result that verified nothing. Check schema_in_scope
before trusting a clean run.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceA Model Context Protocol server for MarkLogic that enables CRUD operations and document querying capabilities through a client interface.MIT
- Alicense-qualityDmaintenanceThis read-only MCP Server allows you to connect to MarkLogic data from Claude Desktop through CData JDBC Drivers. Free (beta) read/write servers available at https://www.cdata.com/solutions/mcpMIT
- Alicense-qualityDmaintenanceEnables interaction with MongoDB databases through MCP, supporting database queries, resource reading, and multi-collection operations including aggregation pipelines and lookups.15,142,354Apache 2.0
- AlicenseAqualityDmaintenanceProvides tools for interacting with CouchDB databases, enabling document management, Mango search queries, and database administration. It allows Claude Code and other MCP clients to perform CRUD operations and manage indexes on local or remote CouchDB instances.11MIT
Related MCP Connectors
Query SEC EDGAR filings, XBRL financials, and company data through MCP. STDIO & Streamable HTTP.
Search and fetch Wikidata entities, execute SPARQL queries, and resolve external identifiers.
Build and manage Cloudgate workflow-APIs: controllers, actions, workflow graphs, and databases.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/glinerosuarez/marklogic_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server