mcp oeis
用于OEIS(整数序列在线百科全书)API的MCP服务器
mcp名称:io.github.daedalus/mcp-oeis
  
安装
pip install mcp-oeis用法
作为MCP服务器
在MCP设置中配置:
{
"mcpServers": {
"mcp-oeis": {
"command": "mcp-oeis"
}
}
}Python API
from mcp_oeis import mcp
# Get a sequence by ID
result = mcp.get_sequence_by_id("A000109")
print(result["terms"]) # [1, 1, 1, 2, 5, 14, ...]
# Search by terms
results = mcp.search_by_terms([1, 1, 2, 3, 5, 8])
print(results[0]["name"]) # "Fibonacci numbers"
# Search by name
results = mcp.search_by_name("prime")
print(results[0]["id"]) # "A000040"MCP工具
get_sequence_by_id
通过其OEIS ID获取序列(例如,“A000109”表示单多面体,“A000045”表示斐波那契)。
搜索\_ \_术语
通过提供整数项搜索OEIS序列。例如,搜索\[1,1,2,3,5,8\]将找到斐波那契数列。
search_by_name
按名称或关键字搜索OEIS序列。例如,搜索“Fibonacci”将找到与Fibonacci相关的序列。
发展
git clone https://github.com/daedalus/mcp-oeis.git
cd mcp-oeis
pip install -e ".[test]"
# run tests
pytest
# format
ruff format src/ tests/
# lint
ruff check src/ tests/
# type check
mypy src/