About datamuse-mcp-server
datamuse-mcp-server lets writing, editing, puzzle and naming workflows query Datamuse for English and Spanish word suggestions. Its tools combine meaning, sound, spelling and lexical relations, with returned metadata preserved from the source.
Key features
- 01Find exact and near rhymes
- 02Look up synonyms and related words
- 03Combine meaning, sound and spelling constraints
- 04Retrieve word metadata and reference guidance
- 05Use stdio or Streamable HTTP
Use cases
- 01Find rhymes for a line of writing
- 02Explore alternatives while editing text
- 03Generate word candidates for puzzles or names
MCP support
Exposes five Datamuse-powered tools to MCP clients, including word search, relation lookup, metadata retrieval and static reference guidance. Supports stdio and Streamable HTTP.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
npx -y @cyanheads/datamuse-mcp-serverMCP_LOG_LEVELSets the minimum log level for output (e.g., 'debug', 'info', 'warn').MCP_TRANSPORT_TYPESelects the HTTP transport.MCP_HTTP_HOSTThe hostname for the HTTP server.MCP_HTTP_PORTThe port to run the HTTP server on.MCP_HTTP_ENDPOINT_PATHThe endpoint path for the MCP server.MCP_AUTH_MODESecretAuthentication mode to use: 'none', 'jwt', or 'oauth'.Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.
Tools
5Saved tool list · updated 1w ago
| Parameter | Type | Required | Description |
|---|---|---|---|
| word | string | Yes | Nonblank target word or phrase, at most 200 characters; surrounding whitespace is trimmed. |
| limit | integer | No | Positive safe-integer row limit, default 20; values above 1000 are clamped and disclosed. Whole rows may be cut by the response byte budget. |
| offset | integer | No | Best-effort row offset, 0–999; re-runs the query, so rankings may change. No snapshot or total count. |
| means_like | string | No | Related meaning, at most 500 characters; blank means unset. |
| rhyme_type | enum | No | Exact rhyme or near rhyme; no automatic fallback.exact | near |
| include_ipa | boolean | No | Request IPA tags and imply pronunciation; raw ARPAbet and IPA tags may both be returned. |
| spelled_like | string | No | Upstream spelling pattern, at most 200 characters: * any length, ? one character, //listen anagrams (including phrases), @ English vowel including y, # consonant, +letters restricts allowed letters (repeats/spaces possible), -letters excludes letters. Without syntax, similar spellings. Blank means unset. |
| include_definitions | boolean | No | Include upstream definitions; senses may make the response substantially larger. |
| include_pronunciation | boolean | No | Request raw pronunciation tags; ARPAbet stress digits are 0 unstressed, 1 primary, 2 secondary. May be guessed or omitted. |
Details
From the project README@cyanheads/datamuse-mcp-server
Find rhymes, synonyms, sound-alikes, spelling matches, and word associations with Datamuse via MCP. STDIO or Streamable HTTP.
Overview
Word finding for writing, editing, puzzles, and naming, powered by the Datamuse API. Find a rhyme with a particular meaning, explore lexical alternatives, or combine meaning, sound, spelling, and relation constraints.
Tools
| Tool | Description |
|---|---|
datamuse_find_rhymes | Find exact or near rhymes, optionally constrained by meaning and spelling |
datamuse_find_synonyms | Find synonyms, antonyms, broader categories, or narrower kinds |
datamuse_find_words | Combine meaning, sound, spelling, and named lexical relations, with context and topic hints |
datamuse_list_reference | Read offline guidance on relations, metadata, combinations, and service limitations |
datamuse_get_word_info | Look up raw metadata for supplied spellings, with indexed partial outcomes |
Capability reference
datamuse_find_rhymes tool
- Required
word;rhyme_typeisexact(default) ornear, never blended; optionalmeans_likeandspelled_likenarrow the same search. English only - Shared search controls:
limit(default 20),offset(default 0),include_definitions,include_pronunciation, andinclude_ipa(metadata options defaultfalse). Rows carry whatever metadata Datamuse supplies
datamuse_find_synonyms tool
- Required
word;relationissynonyms(default),antonyms,broader(direct hypernyms), ornarrower(direct hyponyms). English only - Same shared search controls as rhymes; statistical associations are the
associatedrelation ofdatamuse_find_words
datamuse_find_words tool
- At least one of
means_like,sounds_like,spelled_like(upstream spelling patterns), or up to 14relations: [{ relation, word }], all conjoined; repeated relations are kept.left_context,right_context, and up to fivetopics, each a single word, affect ordering only - Relations:
exact_rhyme,near_rhyme,synonyms,antonyms,broader,narrower,parts,wholes,nouns_modified_by,adjectives_describing,followers,predecessors,associated,homophones,consonant_match;datamuse_list_referencegives their directions vocabularyisen(default) ores; Spanish takes meaning, sound, and spelling constraints, not relations. Rejections are typed:missing_constraint,unsupported_vocabulary_relation,invalid_context_hint
Spelling patterns are interpreted by Datamuse using supported OneLook syntax:
| Pattern | Meaning |
|---|---|
*, ? | Any length, or one character |
//listen | Anagrams, including phrases such as lets in |
c@t, s#@p | @ matches one English vowel including y; # one consonant |
*+abc | Restrict letters to a, b, c; repetitions and spaces can occur |
b????-e | Five-character pattern excluding e |
hipopatamus | Similar spellings without wildcard syntax |
For anagrams, call datamuse_find_words with {"spelled_like":"//listen"}. +letters restricts allowed letters and -letters excludes them; neither requires every listed letter.
datamuse_get_word_info tool
Supply 1–100 nonblank words, each at most 200 characters. The first ten are processed sequentially through the shared request budget; later entries return processing_cap. One 20-second deadline includes all requests, retries and pacing. Completed results survive item failures; pending entries return deadline_exceeded. Caller cancellation stops the call.
The same include_definitions, include_pronunciation, and include_ipa options apply. Each indexed outcome contains trimmed caller input and either a complete raw row, a failure reason with recovery, or an unprocessed reason. Only a query-tagged echo matching the supplied spelling under Unicode lowercase is accepted: Ice Cream can return raw row.word='ice cream', while corrections are never substituted. Missing metadata stays absent, and duplicates keep their indices. Lookup output is complete on both MCP surfaces and has no search byte slicing.
datamuse_list_reference tool
topicisall(default),relations,metadata,combinations, orlimitations- Returns static
sections: [{ topic, text }]without a network request
Features
Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.
Datamuse-specific:
- Live queries to Datamuse's fixed HTTPS
/wordsendpoint, with no local mirror or stored queries - One request budget shared by every tool and tenant: one start per second, one request in flight, a bounded queue, and one retry. It is process-local, so it does not account for other processes or other users of the same egress address
- Results are corpus-derived suggestions with sense-dependent, sometimes guessed metadata (parts of speech, syllables,
f:frequency per million words). They do not establish dictionary completeness or poetic suitability
Agent-friendly output:
- Effective-query echo and honest caps: every search returns
effectiveQuery,returnedCount,limitReached, andtruncated, plus relevant notices andnextOffset. Positive safe-integer limits above 1000 are clamped withrequestedLimitand effectivelimitechoed. Invalid integers reject before I/O - Whole-row navigation:
offsetaccepts 0–999. Searches fetchmax=min(1000, offset+limit)and select complete rows under 64,000 bytes per serialized MCP surface, including escaping and enrichment. A local byte cut setstruncated=true; re-run withoffset=nextOffsetwhen supplied. One oversized row is returned intact with a soft-budget notice and offset progress. API-cap notices are separate from byte cuts. Rankings can change between calls, so offsets are best-effort navigation with possible duplicates or gaps, never snapshots, stable pagination, totals, or proof of exhaustion. No continuation beyond index 999 - Phrase relation recovery: phrase targets stay accepted and unchanged. When a relation query returns empty, guidance explains limited phrase coverage and suggests
means_likeorsounds_like; rhyme guidance also suggests explicitly trying the final word - Optional pronunciation:
include_pronunciationappendsrtomd;include_ipaimplies pronunciation and addsipa=1. Rawpron:andipa_pron:tags may both occur. ARPAbet stress digits mean 0 unstressed, 1 primary, 2 secondary; pronunciations may be guessed, sense-dependent, or absent - Lossless rows:
wordplus whateverscore,numSyllables,tags,defs,defHeadword, and other fields Datamuse sent, unchanged and in upstream order, identical instructuredContentand the fenced JSON text.scoreranks results within one query only - Typed failures: declared reasons for access errors, rate limits (
upstream_rate_limitedandpacer_shed, withretryAfter), malformed upstream data, and invalid input, each with a recovery hint
Access, privacy, and attribution
Datamuse currently documents keyless access up to 100,000 requests per day and asks customer-facing applications to contact it. It has announced manually issued API keys for early 2027, with conflicting dates: January 1 in its usage section and February 1 in its banner. No key format is documented yet, so this server uses the keyless API, and access may be interrupted at the switch.
Queries are sent to Datamuse, which keeps a temporary log of them until the end of the following day. Server payload logging and telemetry are optional; review their settings before sending sensitive text.
Word results and lexical metadata come from Datamuse; see its documentation for data sources and attribution requirements. The Apache-2.0 license covers this server's code, not the upstream data.
Getting started
Add the following to your MCP client configuration file.
{
"mcpServers": {
"datamuse-mcp-server": {
"type": "stdio",
"command": "bunx",
"args": ["@cyanheads/datamuse-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info"
}
}
}
}
Or with npx (no Bun required):
{
"mcpServers": {
"datamuse-mcp-server": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@cyanheads/datamuse-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info"
}
}
}
}
Or with Docker:
{
"mcpServers": {
"datamuse-mcp-server": {
"type": "stdio",
"command": "docker",
"args": ["run", "-i", "--rm", "-e", "MCP_TRANSPORT_TYPE=stdio", "ghcr.io/cyanheads/datamuse-mcp-server:latest"]
}
}
}
For Streamable HTTP, set the transport and start the server:
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http
# Server listens at http://localhost:3010/mcp
Prerequisites
- Bun v1.4.0 or higher (or Node.js v24+).
- No Datamuse credentials are currently required; see Access, privacy, and attribution for the announced key transition.
Installation
- Clone the repository:
git clone https://github.com/cyanheads/datamuse-mcp-server.git
- Navigate into the directory:
cd datamuse-mcp-server
- Install dependencies:
bun install
- Configure environment:
cp .env.example .env
# edit .env for transport, authentication, logging, or telemetry overrides
Configuration
| Variable | Description | Default |
|---|---|---|
MCP_TRANSPORT_TYPE | Transport: stdio or http. | stdio |
MCP_HTTP_HOST | HTTP bind address. | 127.0.0.1 |
MCP_HTTP_PORT | HTTP server port. | 3010 |
MCP_SESSION_MODE | HTTP session mode: stateless, stateful, or auto. | stateless |
MCP_AUTH_MODE | Authentication: none, jwt, or oauth. | none |
MCP_LOG_LEVEL | Log level (debug, info, warning, error, etc.). | info |
LOGS_DIR | Directory for log files (Node.js only). | <app-root>/logs |
STORAGE_PROVIDER_TYPE | Storage backend: in-memory, filesystem, supabase, cloudflare-kv/r2/d1. | in-memory |
OTEL_ENABLED | Enable OpenTelemetry. | false |
See .env.example for every server setting and the common framework overrides.
Running the server
Local development
-
Build and run the production version:
# One-time build bun run rebuild # Run the built server bun run start:http # or bun run start:stdio -
Run checks and tests:
bun run devcheck # Lints, formats, type-checks, and more bun run test # Runs the test suite
Project structure
| Directory | Purpose |
|---|---|
src/mcp-server/tools/definitions | Five tool definitions and shared search enrichment. |
src/services/datamuse | Fixed-endpoint client, shared pacing, upstream schemas, and JSON rendering. |
tests/ | Service, tool, and serialization tests. |
docs/ | Surface design and generated directory tree. |
Development guide
See CLAUDE.md for development guidelines and architectural rules. The short version:
- Handlers throw, framework catches — no
try/catchin tool logic - Use
ctx.logfor logging,ctx.statefor storage - Register new tools and resources in the
createApp()arrays insrc/index.ts - Wrap external API calls: validate raw → normalize to domain type → return output schema; never fabricate missing fields
Contributing
Issues are welcome. Run checks and tests before submitting:
bun run devcheck
bun run test
License
This project is licensed under the Apache 2.0 License. See the LICENSE file for details.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.